You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2948322 on 2016/04/19 by Nick.Shin update libwebsockets to v1.7.4 part 4 of 4 - doing this in stages for tracking purposes #jira UEPLAT-1246 - Update libWebsockets #jira UEPLAT-1221 - update websocket library #jira UEPLAT-1204 - Rebuild libwebsockets with SSL Change 2970016 on 2016/05/07 by Nick.Shin undo all of the following upgrades: - zlib - openssl - libcurl - libwebsockets and reset webrtc #jira UE-30298 - Fortnite and Orion crash on login Change 3020547 on 2016/06/20 by Jeff.Campeau Support for applocal deployment of binaries -applocaldir added to UAT to specify a per project directory to gather packages for applocal deployment Added ApplocalPrerequisitesDirectory property to packaging settings to set -applocaldir for packages built from the editor. Change 3020552 on 2016/06/20 by Jeff.Campeau Add switch to disable debug symbol cache creation Change 3020567 on 2016/06/20 by Jeff.Campeau constexpr enabled for Xbox One Change 3020568 on 2016/06/20 by Jeff.Campeau Separate setting for debug #jira UEPLAT-1348 Change 3020628 on 2016/06/20 by Jeff.Campeau Use global view instead of relying on current thread (fixes issues if pump message is called from a different thread). Change 3020629 on 2016/06/20 by Jeff.Campeau Use Slate tick to drive message processing during blocking loads (improves PLM). Change 3020633 on 2016/06/20 by Jeff.Campeau Fix Xbox One toolchain pathing to work for environment variables with and without trailing slashes. Pass requested XDK edition to VCVars batch file (fixes issues in building with a newer XDK installed SxS than the engine is configured for). Change 3020873 on 2016/06/21 by Lee.Clark PS4 - Fix missing audio when using A3D. Change 3021225 on 2016/06/21 by Keith.Judge Optimized away a bunch of GetVertexShader() calls in FSplineMeshVertexFactoryShaderParameters::SetMesh(). Saves about 0.9ms across a 100ms capture. Change 3021286 on 2016/06/21 by Dmitry.Rekman Linux: symbolication for memory profiler. - Also repaired/improved finding function name from debug info and overall callstack parsing. #tests Ran Linux editor and TestPAL, crashed multiple times Change 3021512 on 2016/06/21 by Mark.Satterthwaite Compile fixes for new clang version. Change 3021521 on 2016/06/21 by Mark.Satterthwaite Duplicate Fortnite CL #3013418: Don't release Metal buffers directly into the buffer pool, instead defer this until the command-buffer is known to have finished. This prevents the CPU from trying to modify the buffer while the GPU is still reading it if the GPU has fallen so far behind the CPU and therefore eliminates one possible cause of invalid access on the GPU. Change 3021528 on 2016/06/21 by Mark.Satterthwaite Make the Metal buffer pool cull after 30 frames - this will better match Apple's GART which unwires unused allocations after 1sec of idle, making them as expensive to use allocating a new buffer. Change 3021595 on 2016/06/21 by Mark.Satterthwaite Consolidate the way in which optional Metal features are exposed across macOS, iOS & tvOS devices & expose all the available features, unifying more of the code across all three platforms. - Implement Metal Depth-16 and stencil-texture-view support where available. - Use counting queries in Metal when available and expected (i.e. Metal_SM4+ or Metal_MRT+). - On latest iOS devices running Metal export support for GRHISupportsBaseVertexIndex & GRHISupportsFirstInstance when available. - On latest iOS devices running Metal export support for indirect buffer draw and dispatch calls. - Specify Metal layered rendering like any other and change the code so that there aren't preprocessor defines in the code. This lets the Metal MRT path assert if anyone ever tries to issue a layered draw call as its only supported on Mac. - Add support to Metal for setting UAVs from a uniform buffer. - Remove unused GlobalUniform header from MetalRHI. - Remove unnecessary FrameCount delay from Metal resource free lists. Change 3021702 on 2016/06/21 by Mark.Satterthwaite Fix mis-use of FreeListMutex instead of PoolMutex in MetalContext. Change 3022152 on 2016/06/21 by Nick.Shin Back out revision 5 from //UE4/Dev-Platform/Engine/Source/Runtime/NetworkFileSystem/Private/NetworkFileServerHttp.cpp forgot to un-do this when the giant revert (CL: #2970016) was done #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 3022409 on 2016/06/21 by Dmitry.Rekman Fixed inability to run Setup.sh on Ubuntu 14.04 (UE-29289). - Contains PR #2258 (contributed by wshearn). Change 3022541 on 2016/06/22 by Lee.Clark PS4 - Make sure the render target masks are set correctly for disabled render targets. Fixes a validation check for shaders expecting to write to NULL render targets. Change 3022973 on 2016/06/22 by Michael.Trepka Fixed a problem in MacToolChain where both BuildConfiguration.bGeneratedSYMFile and BuildConfiguration.bUsePDBFiles set to false would not disable dSYM generation. Change 3023106 on 2016/06/22 by Dmitry.Rekman Linux: enable code to catch memory stomps during async loading. - Changed FLinuxPlatformMemory::BinnedAllocFrom/FreeToOS() to use mmap()/munmap(). Updated platform function signature accordingly. #tests Ran OrionServer on Linux (and OrionClient on Windows as a zero probe), tested also with running Linux editor with binned malloc. Change 3023256 on 2016/06/22 by Mark.Satterthwaite Fix compile errors from latest Metal changes that broke iOS. Change 3023268 on 2016/06/22 by Mark.Satterthwaite Use the Linux mmap/munmap/mprotect code to implement BinnedAllocFromOS/BinnedFreeToOS/PageProtect on Apple platforms as they are all equivalent. Change 3023651 on 2016/06/22 by Mark.Satterthwaite Make Metal SM5 the default for 10.11.5 or later, this time most of the features should be working on AMD & Nvidia, though tiled-reflections and distance-field AO/Shadows must still be forcibly disabled on Intel. Change 3023777 on 2016/06/22 by Brent.Pease + Update config for Android and iOS Change 3023781 on 2016/06/22 by Chris.Babcock Use mmap/munmap for Android BinnedAllocFromOS #ue4 #android Change 3023947 on 2016/06/22 by Mark.Satterthwaite Added a command-line switch for Mac "-RedirectNSLog" that will capture the output of NSLog using an NSPipe and write it into our log instead when not running under the debugger, thereby capturing output from underlying libraries that would otherwise be lost when outside a debugger. Change 3024434 on 2016/06/23 by Lee.Clark PS4 - Remove Delta Color Compression support Change 3024735 on 2016/06/23 by Mark.Satterthwaite Changes to MetalStatistics module initialisation. Change 3024741 on 2016/06/23 by Mark.Satterthwaite Change the way we test for Metal GPU support to avoid instantiating any MTLDevice's until MetalRHI is loaded so we can properly instantiate optional modules. Change 3025477 on 2016/06/23 by Brent.Pease + Added UnrealPluginLanguage.cs based on AndroidPluginLanguage.cs + Change UEDeployAndroid.cs to use UnrealPluginLanguage Change 3026085 on 2016/06/23 by Jeff.Campeau Separate Xbox One target settings for editor only values Move values that need to be loaded by the editor into the default inis (editor won't load target specific inis) Eliminate circular dependency on Xbox One settings (causing settings to either not load or memory corruption on shutdown) Clean up cached ini sections for UBT/UAT Change 3026093 on 2016/06/23 by Jeff.Campeau Cleanup unused files Change 3026745 on 2016/06/24 by Mark.Satterthwaite + Implemented rudimentary runtime debugging of MetalRHI with several different levels of complexity controlled by the new console-variable "rhi.Metal.RuntimeDebugLevel". + The MetalStateCache must also correctly set the render-pass descriptor when the previous render-target load action was 'Clear' as we will need to switch render targets or we'll mistakenly clear again. + Queries must not reset the MetalStateCache when they overflow the available buffer space, they simply break the encoder. - By default "rhi.Metal.RuntimeDebugLevel" is off & it is compiled out for Shipping - when enabled each higher level collects more data or changes the MetalRHI behaviour to make a command-buffer failure mode debuggable at the expense of performance. In order for this to work the number of command-buffers that may be allocated from the command-queue is also controllable via a console-variable "rhi.Metal.CommandQueueSize" which must be set prior to startup. Change 3026831 on 2016/06/24 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3026940 on 2016/06/24 by Brent.Pease PR #2458: added GetGameBundleId blueprint function (Contributed by derekvanvliet) Change 3027396 on 2016/06/24 by Brent.Pease Add BuildGraph.csproj to get Xamarin .sln builds working again Change 3029211 on 2016/06/27 by Michael.Trepka Added a setting (on by default) to make the game window preserve its content's aspect ratio while being resized by user Change 3029518 on 2016/06/27 by Josh.Adams Rollback //UE4/Dev-Platform/Engine/Build/BatchFiles/Mac/xcodeunlock.sh to revision 1 Change 3030385 on 2016/06/28 by Keith.Judge Fix XB1 deployment issues with AppXManifest for Paragon. Change 3030416 on 2016/06/28 by Lee.Clark PS4 - Fix Mediaplayer IsPlaying Change 3030922 on 2016/06/28 by Keith.Judge XB1 - Add pass through _RenderThread resource creation functions to D3D11.x RHI. Stops the render/RHI threads from stalling so much. Change 3030948 on 2016/06/28 by Jeff.Campeau Revert to using constant chunk indexes instead of polling the OS. (OS API has a bug that will not be fixed.) Change 3031016 on 2016/06/28 by Brent.Pease UEPLAT-1244 - Archive dSYM file UEPLAT-1359 - Support creating dSYM bundle Changes: + Added ios settings flag for dsym bundle + Added ios setting for creating xcode archive + xcode archive is now only put in the mac host or build machine's ~/Library/Developer/Xcode/Archives folder, it is not copied into the -archive folder like the ipa is Change 3031352 on 2016/06/28 by Bob.Tellez Added tps file for xcodeunlock Change 3031604 on 2016/06/28 by Mark.Satterthwaite Add an additional cast to flush-to-zero in the Metal shader translator bounds-checking code to avoid an internal GPU compiler error. Change 3031879 on 2016/06/28 by Brent.Pease + PhysX libraries for bitcode support on tvOS. Change 3032374 on 2016/06/29 by Keith.Judge Enable Oodle Handler Component on Xbox One Change 3032407 on 2016/06/29 by Keith.Judge Xbox One - Disable UpdateBufferStats when STATS is 0. Small perf gain. Change 3032432 on 2016/06/29 by Keith.Judge XB1 CPU Perf - Make CreateVertexDeclaration_RenderThread much faster by implementing a pass through to the RHI function rather than stalling the RHI thread. Change 3033474 on 2016/06/29 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change3033603on 2016/06/29 by Brent.Pease + Support UnrealPluginLanguage for IOS and TVOS builds + Allow ios/tvos UPL files an opportunity to modify a package's info.plist file Change 3034004 on 2016/06/30 by Lee.Clark PS4 - Use SDK 3.508.101 Change 3034007 on 2016/06/30 by Lee.Clark PS4 - VRTracker now uses SCE_VR_TRACKER_ROBUSTNESS_LEVEL_HIGH Change 3034173 on 2016/06/30 by Lee.Clark PS4 - Make sure depth target is null when eliminating fast clears. Fixes a GNM Validation failure Change 3034498 on 2016/06/30 by Jeff.Campeau Use MSBuild version 14 when generating project files. Change 3034943 on 2016/06/30 by Mark.Satterthwaite For Metal modify the MTLVertexDescriptor when calls to SetStreamSource provide different strides than the initial vertex-declaration which then requires compiling a different MTLRenderPipelineState. This silences errors reported by the Metal debug layer where the larger stride would see the shader read beyond the end of the buffer, but the smaller stride provided by SetStreamSource would work correctly. This may eliminate some more causes of Page-Fault GPU restarts. Change 3035416 on 2016/07/01 by Lee.Clark PS4 - Replace export vertex shader check with a CFLAG Change 3036093 on 2016/07/01 by Brent.Pease + Fix dSYM bundle path on Windows ios builds + Search for DeltaCopy directory if its not found from the user settings + Do not build an XCArchive file when building for ios on non-mac platforms Change 3036726 on 2016/07/02 by Brent.Pease + Add missing tvOS bitcode library Change 3037455 on 2016/07/05 by Lee.Clark PS4 - Default SmoothFrameRate to false Change 3037470 on 2016/07/05 by Keith.Judge Xbox One - Allow framerate smoothing, but default to off for consistency with PS4. Change 3038322 on 2016/07/05 by Jeremiah.Waldron Fix for asset packages with Unicode characters in their name not being loaded on Android. Fixing AndroidString's WIDECHAR* Strstr(WIDECHAR*, WIDECHAR*) function - Using an implementation of wcsstr, with a fix integrated for the incorrect implementation in Android ndk master branch, instead of converting the incoming WIDECHAR strings to ANSI strings just to be able to use strstr on them. The previous method was prone to causing the FString's Find and Contains functions to return false positives because when we convert wide to ansi, any character over the value of 255 is just set to '?' This in turn caused any package path strings with one of those characters in it to fail to load since they would be interpreted as having a question mark in their path, which is an invalid path character. #jira UE-18643 #android Change 3038693 on 2016/07/05 by Mark.Satterthwaite Change the way we store debug info for Metal shaders - the KeepDebugInfo flag now does precisely that, storing the shader code into the Metal header along with the path it was generated from. That means if KeepDebugInfo is enabled and Optimise is disabled then we can still access the shader code from within the Metal tools. On iOS/tvOS the shader code will be runtime compiled so that it shows up in the tooling but on Macs it will prefer to load the optimised version and simply unpack the shader code to the path from which it was compiled. This only works if we change the Metal shader compiler to emit temporary Metal files to the OS temporary directory so that the tools can read the file directly. Change 3039880 on 2016/07/06 by Mark.Satterthwaite Implement point-light shadow caching for RHI's that support specifying the render target layer from the vertex shader in lieu of geometry shaders. This requires changing FScreenVSForGS to TScreenVSForGS so that there can be a vertex-shader-layer variant (only compiled on RHI's that use it) whose output matches FCopyShadowMapsCubePS input. This alternative rendering path also requires adding the instance count to DrawRectangle so that we can render to all faces of the cubemap from a single draw call. Change 3040407 on 2016/07/06 by Michael.Trepka Added View->Enter Full Screen menu item for games on Mac Change 3040550 on 2016/07/06 by Mark.Satterthwaite Intel Metal compiler requires bool expressions be cast to 'int' rather than 'uint'. Change 3041098 on 2016/07/07 by Peter.Sauerbrei initial changes to get IOS builds from PC in launcher release of engine Change 3041310 on 2016/07/07 by Keith.Judge Xbox One - Optimize away GetDesc() and checks for D3D11_USAGE_DYNAMIC deep in the state cache as it's impossible for any buffer to have that flag set. Change 3041327 on 2016/07/07 by Keith.Judge Xbox One - Remove pointless memory barrier call in D3D11Query Change 3041352 on 2016/07/07 by Keith.Judge Xbox One - Add _RenderThread version of UpdateTexture2D() that just passes through to the RHI one. Saves a fairly significant chunk of time on the render/RHI thread when this is called a lot. Change 3041419 on 2016/07/07 by Jeff.Campeau Xbox One toolchain fix for VS2015 Update 3 Change 3041635 on 2016/07/07 by Jeff.Campeau Don't change game render resolution in response to WM_SIZE messages when in fullscreen (the game will restore the correct video mode when the window is restored). #jira OR-15578 Change 3041735 on 2016/07/07 by Peter.Sauerbrei re-enabled the build parameters for launcher release builds in IOS Change 3041783 on 2016/07/07 by Joe.Graf Changed bAutpApplyFailed to bAutoApplyFailed (typo) Change 3041784 on 2016/07/07 by Joe.Graf Fixed missing %s from a log message in UResavePackagesCommandlet Change 3042434 on 2016/07/08 by Lee.Clark PS4 - Fix compilation failure when Unsafe Command Buffers are enabled. Change 3042658 on 2016/07/08 by Lee.Clark PS4 - Use SDK 3.508.201 Change 3042970 on 2016/07/08 by Josh.Adams Redoing CL in 3040890 in Dev-Platform Change 3043243 on 2016/07/08 by Chris.Babcock clamped allowed slot range for gameplay debugger's categories copy of CL#3040313from //UE4/Dev-Framework #jira UE-32866 Change 3043500 on 2016/07/08 by Mark.Satterthwaite Downgrade "-Wdelete-non-virtual-dtor " to a warning again for Xcode 8 on iOS/tvOS to match macOS. Change 3044628 on 2016/07/11 by Mark.Satterthwaite Disable ShaderCache by default - it was implemented prior to RHI-thread/parallel-execution so it isn't thread-safe and can't be enabled by default on Mac now that Metal supports these features. #jira UE-32989 Change 3044948 on 2016/07/11 by Dmitry.Rekman Fix editor crash (happened on Linux, but not really specific to it) (UE-32973) - We can pass flags with shadows enabled when rendering asset thumbnails; thus disable shadows always when r.ShadowQuality is 0. (Redoing CL 3029574 by Bob). - Also fix mismatched 'noperspective' qualifier that caused NVidia drivers to refuse to link GL shaders. #jira UE-32973 Change 3045322 on 2016/07/11 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3046028 on 2016/07/12 by Lee.Clark PS4 - Check for correct SDK installation Allow use of 7th core when Morpheus is enabled Change 3046339 on 2016/07/12 by Peter.Sauerbrei fix for incorrect error message when iPhone Plus icon is the correct size [CL 3046645 by Josh Adams in Main branch]
1080 lines
43 KiB
C++
1080 lines
43 KiB
C++
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#include "MainFramePrivatePCH.h"
|
|
#include "MessageLog.h"
|
|
#include "SDockTab.h"
|
|
#include "SNotificationList.h"
|
|
#include "NotificationManager.h"
|
|
#include "GenericCommands.h"
|
|
#include "EngineBuildSettings.h"
|
|
#include "SourceCodeNavigation.h"
|
|
#include "SOutputLogDialog.h"
|
|
#include "IUATHelperModule.h"
|
|
|
|
#include "Settings/EditorSettings.h"
|
|
#include "AnalyticsEventAttribute.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "MainFrameActions"
|
|
|
|
DEFINE_LOG_CATEGORY_STATIC(MainFrameActions, Log, All);
|
|
|
|
|
|
TSharedRef< FUICommandList > FMainFrameCommands::ActionList( new FUICommandList() );
|
|
|
|
TWeakPtr<SNotificationItem> FMainFrameActionCallbacks::ChoosePackagesToCheckInNotification;
|
|
|
|
FMainFrameCommands::FMainFrameCommands()
|
|
: TCommands<FMainFrameCommands>(
|
|
TEXT("MainFrame"), // Context name for fast lookup
|
|
LOCTEXT( "MainFrame", "Main Frame" ), // Localized context name for displaying
|
|
NAME_None, // No parent context
|
|
FEditorStyle::GetStyleSetName() ), // Icon Style Set
|
|
ToggleFullscreenConsoleCommand(
|
|
TEXT( "MainFrame.ToggleFullscreen" ),
|
|
TEXT( "Toggles the editor between \"full screen\" mode and \"normal\" mode. In full screen mode, the task bar and window title area are hidden." ),
|
|
FConsoleCommandDelegate::CreateStatic( &FMainFrameActionCallbacks::ToggleFullscreen_Execute ) )
|
|
{ }
|
|
|
|
|
|
void FMainFrameCommands::RegisterCommands()
|
|
{
|
|
if ( !IsRunningCommandlet() )
|
|
{
|
|
// The global action list was created at static initialization time. Create a handler for otherwise unhandled keyboard input to route key commands through this list.
|
|
FSlateApplication::Get().SetUnhandledKeyDownEventHandler( FOnKeyEvent::CreateStatic( &FMainFrameActionCallbacks::OnUnhandledKeyDownEvent ) );
|
|
}
|
|
|
|
// Make a default can execute action that disables input when in debug mode
|
|
FCanExecuteAction DefaultExecuteAction = FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::DefaultCanExecuteAction );
|
|
|
|
UI_COMMAND( SaveAll, "Save All", "Saves all unsaved levels and assets to disk", EUserInterfaceActionType::Button, FInputChord( EModifierKey::Control, EKeys::S ) );
|
|
ActionList->MapAction( SaveAll, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::SaveAll ), FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::CanSaveWorld ) );
|
|
|
|
UI_COMMAND( ChooseFilesToSave, "Choose Files to Save...", "Opens a dialog with save options for content and levels", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( ChooseFilesToSave, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ChoosePackagesToSave ), FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::CanSaveWorld ) );
|
|
|
|
UI_COMMAND( ChooseFilesToCheckIn, "Submit to Source Control...", "Opens a dialog with check in options for content and levels", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( ChooseFilesToCheckIn, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ChoosePackagesToCheckIn ), FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::CanChoosePackagesToCheckIn ) );
|
|
|
|
UI_COMMAND( ConnectToSourceControl, "Connect To Source Control...", "Connect to source control to allow source control operations to be performed on content and levels.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( ConnectToSourceControl, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ConnectToSourceControl ), DefaultExecuteAction );
|
|
|
|
UI_COMMAND( NewProject, "New Project...", "Opens a dialog to create a new game project", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( NewProject, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::NewProject, false, true), DefaultExecuteAction );
|
|
|
|
UI_COMMAND( OpenProject, "Open Project...", "Opens a dialog to choose a game project to open", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( OpenProject, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::NewProject, true, false), DefaultExecuteAction );
|
|
|
|
UI_COMMAND( AddCodeToProject, "New C++ Class...", "Adds C++ code to the project. The code can only be compiled if you have an appropriate C++ compiler installed.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( AddCodeToProject, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::AddCodeToProject ));
|
|
|
|
UI_COMMAND( RefreshCodeProject, "Refresh code project", "Refreshes your C++ code project.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( RefreshCodeProject, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::RefreshCodeProject ), FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::IsCodeProject ) );
|
|
|
|
UI_COMMAND( OpenIDE, "Open IDE", "Opens your C++ code in an integrated development environment.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( OpenIDE, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::OpenIDE ), FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::IsCodeProject ) );
|
|
|
|
UI_COMMAND( ZipUpProject, "Zip Up Project", "Zips up the project into a zip file.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction(ZipUpProject, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ZipUpProject ), DefaultExecuteAction);
|
|
|
|
UI_COMMAND( PackagingSettings, "Packaging Settings...", "Opens the settings for project packaging", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( PackagingSettings, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::PackagingSettings ), DefaultExecuteAction );
|
|
|
|
//UI_COMMAND( LocalizeProject, "Localize Project...", "Opens the dashboard for managing project localization data.", EUserInterfaceActionType::Button, FInputChord() );
|
|
//ActionList->MapAction( LocalizeProject, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::LocalizeProject ), DefaultExecuteAction );
|
|
|
|
const int32 MaxProjects = 20;
|
|
for( int32 CurProjectIndex = 0; CurProjectIndex < MaxProjects; ++CurProjectIndex )
|
|
{
|
|
// NOTE: The actual label and tool-tip will be overridden at runtime when the command is bound to a menu item, however
|
|
// we still need to set one here so that the key bindings UI can function properly
|
|
FFormatNamedArguments Arguments;
|
|
Arguments.Add(TEXT("CurrentProjectIndex"), CurProjectIndex);
|
|
const FText Message = FText::Format( LOCTEXT( "SwitchProject", "Switch Project {CurrentProjectIndex}" ), Arguments );
|
|
TSharedRef< FUICommandInfo > SwitchProject =
|
|
FUICommandInfoDecl(
|
|
this->AsShared(),
|
|
FName( *FString::Printf( TEXT( "SwitchProject%i" ), CurProjectIndex ) ),
|
|
Message,
|
|
LOCTEXT( "SwitchProjectToolTip", "Restarts the editor and switches to selected project" ) )
|
|
.UserInterfaceType( EUserInterfaceActionType::Button )
|
|
.DefaultChord( FInputChord() );
|
|
SwitchProjectCommands.Add( SwitchProject );
|
|
|
|
ActionList->MapAction( SwitchProjectCommands[ CurProjectIndex ], FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::SwitchProjectByIndex, CurProjectIndex ),
|
|
FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::CanSwitchToProject, CurProjectIndex ),
|
|
FIsActionChecked::CreateStatic( &FMainFrameActionCallbacks::IsSwitchProjectChecked, CurProjectIndex ) );
|
|
}
|
|
|
|
UI_COMMAND( Exit, "Exit", "Exits the application", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( Exit, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::Exit ), DefaultExecuteAction );
|
|
|
|
ActionList->MapAction( FGenericCommands::Get().Undo, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ExecuteExecCommand, FString( TEXT("TRANSACTION UNDO") ) ), FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::Undo_CanExecute ) );
|
|
|
|
ActionList->MapAction( FGenericCommands::Get().Redo, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ExecuteExecCommand, FString( TEXT("TRANSACTION REDO") ) ), FCanExecuteAction::CreateStatic( &FMainFrameActionCallbacks::Redo_CanExecute ) );
|
|
|
|
UI_COMMAND( OpenDeviceManagerApp, "Device Manager", "Opens up the device manager app", EUserInterfaceActionType::Check, FInputChord() );
|
|
ActionList->MapAction( OpenDeviceManagerApp,
|
|
FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::OpenSlateApp, FName( TEXT( "DeviceManager" ) ) ),
|
|
FCanExecuteAction(),
|
|
FIsActionChecked::CreateStatic( &FMainFrameActionCallbacks::OpenSlateApp_IsChecked, FName( TEXT( "DeviceManager" ) ) ) );
|
|
|
|
UI_COMMAND( OpenSessionManagerApp, "Session Manager", "Opens up the session manager app", EUserInterfaceActionType::Check, FInputChord() );
|
|
ActionList->MapAction( OpenSessionManagerApp,
|
|
FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::OpenSlateApp, FName( "SessionFrontend" ) ),
|
|
FCanExecuteAction(),
|
|
FIsActionChecked::CreateStatic( &FMainFrameActionCallbacks::OpenSlateApp_IsChecked, FName("SessionFrontend" ) ) );
|
|
|
|
UI_COMMAND(VisitWiki, "Wiki...", "Go to the Unreal Engine Wiki page to view community-created resources, or to create your own.", EUserInterfaceActionType::Button, FInputChord());
|
|
ActionList->MapAction(VisitWiki, FExecuteAction::CreateStatic(&FMainFrameActionCallbacks::VisitWiki));
|
|
|
|
UI_COMMAND(VisitForums, "Forums...", "Go the the Unreal Engine forums to view announcements and engage in discussions with other developers.", EUserInterfaceActionType::Button, FInputChord());
|
|
ActionList->MapAction(VisitForums, FExecuteAction::CreateStatic(&FMainFrameActionCallbacks::VisitForums));
|
|
|
|
UI_COMMAND( VisitAskAQuestionPage, "Ask a Question...", "Have a question? Go here to ask about anything and everything related to Unreal.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( VisitAskAQuestionPage, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::VisitAskAQuestionPage ) );
|
|
|
|
UI_COMMAND( VisitSearchForAnswersPage, "Answer Hub...", "Go to the AnswerHub to ask questions, search existing answers, and share your knowledge with other UE4 developers.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( VisitSearchForAnswersPage, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::VisitSearchForAnswersPage ) );
|
|
|
|
UI_COMMAND( VisitSupportWebSite, "Unreal Engine Support Web Site...", "Navigates to the Unreal Engine Support web site's main page.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( VisitSupportWebSite, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::VisitSupportWebSite ) );
|
|
|
|
UI_COMMAND( VisitEpicGamesDotCom, "Visit UnrealEngine.com...", "Navigates to UnrealEngine.com where you can learn more about Unreal Technology.", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( VisitEpicGamesDotCom, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::VisitEpicGamesDotCom ) );
|
|
|
|
UI_COMMAND( AboutUnrealEd, "About Editor...", "Displays application credits and copyright information", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( AboutUnrealEd, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::AboutUnrealEd_Execute ) );
|
|
|
|
UI_COMMAND( CreditsUnrealEd, "Credits", "Displays application credits", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( CreditsUnrealEd, FExecuteAction::CreateStatic(&FMainFrameActionCallbacks::CreditsUnrealEd_Execute) );
|
|
|
|
UI_COMMAND( ResetLayout, "Reset Layout...", "Make a backup of your user settings and reset the layout customizations", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( ResetLayout, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ResetLayout) );
|
|
|
|
UI_COMMAND( SaveLayout, "Save Layout", "Save the layout customizations", EUserInterfaceActionType::Button, FInputChord() );
|
|
ActionList->MapAction( SaveLayout, FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::SaveLayout) );
|
|
|
|
UI_COMMAND( ToggleFullscreen, "Enable Fullscreen", "Enables fullscreen mode for the application, expanding across the entire monitor", EUserInterfaceActionType::ToggleButton, FInputChord(EModifierKey::Shift, EKeys::F11) );
|
|
ActionList->MapAction( ToggleFullscreen,
|
|
FExecuteAction::CreateStatic( &FMainFrameActionCallbacks::ToggleFullscreen_Execute ),
|
|
FCanExecuteAction(),
|
|
FIsActionChecked::CreateStatic( &FMainFrameActionCallbacks::FullScreen_IsChecked )
|
|
);
|
|
|
|
UI_COMMAND(OpenWidgetReflector, "Open Widget Reflector", "Opens the Widget Reflector", EUserInterfaceActionType::Button, FInputChord(EModifierKey::Shift | EModifierKey::Control , EKeys::W));
|
|
ActionList->MapAction(OpenWidgetReflector, FExecuteAction::CreateStatic(&FMainFrameActionCallbacks::OpenWidgetReflector_Execute));
|
|
|
|
FGlobalEditorCommonCommands::MapActions(ActionList);
|
|
}
|
|
|
|
FReply FMainFrameActionCallbacks::OnUnhandledKeyDownEvent(const FKeyEvent& InKeyEvent)
|
|
{
|
|
if ( FMainFrameCommands::ActionList->ProcessCommandBindings( InKeyEvent ) )
|
|
{
|
|
return FReply::Handled();
|
|
}
|
|
return FReply::Unhandled();
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::DefaultCanExecuteAction()
|
|
{
|
|
return FSlateApplication::Get().IsNormalExecution();
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::ChoosePackagesToSave()
|
|
{
|
|
const bool bPromptUserToSave = true;
|
|
const bool bSaveMapPackages = true;
|
|
const bool bSaveContentPackages = true;
|
|
const bool bFastSave = false;
|
|
const bool bClosingEditor = false;
|
|
const bool bNotifyNoPackagesSaved = true;
|
|
const bool bCanBeDeclined = false;
|
|
FEditorFileUtils::SaveDirtyPackages( bPromptUserToSave, bSaveMapPackages, bSaveContentPackages, bFastSave, bNotifyNoPackagesSaved, bCanBeDeclined );
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::ChoosePackagesToCheckIn()
|
|
{
|
|
FSourceControlWindows::ChoosePackagesToCheckIn();
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::CanChoosePackagesToCheckIn()
|
|
{
|
|
return FSourceControlWindows::CanChoosePackagesToCheckIn();
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::ConnectToSourceControl()
|
|
{
|
|
ELoginWindowMode::Type Mode = !FSlateApplication::Get().GetActiveModalWindow().IsValid() ? ELoginWindowMode::Modeless : ELoginWindowMode::Modal;
|
|
ISourceControlModule::Get().ShowLoginDialog(FSourceControlLoginClosed(), Mode);
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::CanSaveWorld()
|
|
{
|
|
return FSlateApplication::Get().IsNormalExecution() && (!GUnrealEd || !GUnrealEd->GetPackageAutoSaver().IsAutoSaving());
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::SaveAll()
|
|
{
|
|
const bool bPromptUserToSave = false;
|
|
const bool bSaveMapPackages = true;
|
|
const bool bSaveContentPackages = true;
|
|
const bool bFastSave = false;
|
|
const bool bNotifyNoPackagesSaved = false;
|
|
const bool bCanBeDeclined = false;
|
|
FEditorFileUtils::SaveDirtyPackages( bPromptUserToSave, bSaveMapPackages, bSaveContentPackages, bFastSave, bNotifyNoPackagesSaved, bCanBeDeclined );
|
|
}
|
|
|
|
TArray<FString> FMainFrameActionCallbacks::ProjectNames;
|
|
|
|
void FMainFrameActionCallbacks::CacheProjectNames()
|
|
{
|
|
ProjectNames.Empty();
|
|
|
|
// The switch project menu is filled with recently opened project files
|
|
ProjectNames = GetDefault<UEditorSettings>()->RecentlyOpenedProjectFiles;
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::NewProject( bool bAllowProjectOpening, bool bAllowProjectCreate )
|
|
{
|
|
if (GUnrealEd->WarnIfLightingBuildIsCurrentlyRunning())
|
|
{
|
|
return;
|
|
}
|
|
|
|
FText Title;
|
|
if (bAllowProjectOpening && bAllowProjectCreate)
|
|
{
|
|
Title = LOCTEXT( "SelectProjectWindowHeader", "Select Project");
|
|
}
|
|
else if (bAllowProjectOpening)
|
|
{
|
|
Title = LOCTEXT( "OpenProjectWindowHeader", "Open Project");
|
|
}
|
|
else
|
|
{
|
|
Title = LOCTEXT( "NewProjectWindowHeader", "New Project");
|
|
}
|
|
|
|
TSharedRef<SWindow> NewProjectWindow =
|
|
SNew(SWindow)
|
|
.Title(Title)
|
|
.ClientSize( FMainFrameModule::GetProjectBrowserWindowSize() )
|
|
.SizingRule( ESizingRule::UserSized )
|
|
.SupportsMinimize(false) .SupportsMaximize(false);
|
|
|
|
NewProjectWindow->SetContent( FGameProjectGenerationModule::Get().CreateGameProjectDialog(bAllowProjectOpening, bAllowProjectCreate) );
|
|
|
|
IMainFrameModule& MainFrameModule = FModuleManager::GetModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
|
|
if (MainFrameModule.GetParentWindow().IsValid())
|
|
{
|
|
FSlateApplication::Get().AddWindowAsNativeChild(NewProjectWindow, MainFrameModule.GetParentWindow().ToSharedRef());
|
|
}
|
|
else
|
|
{
|
|
FSlateApplication::Get().AddWindow(NewProjectWindow);
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::AddCodeToProject()
|
|
{
|
|
FGameProjectGenerationModule::Get().OpenAddCodeToProjectDialog();
|
|
}
|
|
|
|
/**
|
|
* Gets compilation flags for UAT for this system.
|
|
*/
|
|
const TCHAR* GetUATCompilationFlags()
|
|
{
|
|
// We never want to compile editor targets when invoking UAT in this context.
|
|
// If we are installed or don't have a compiler, we must assume we have a precompiled UAT.
|
|
return (FApp::GetEngineIsPromotedBuild() || FApp::IsEngineInstalled())
|
|
? TEXT("-nocompile -nocompileeditor")
|
|
: TEXT("-nocompileeditor");
|
|
}
|
|
|
|
FString GetCookingOptionalParams()
|
|
{
|
|
FString OptionalParams;
|
|
/*const UProjectPackagingSettings* const PackagingSettings = GetDefault<UProjectPackagingSettings>();
|
|
if (PackagingSettings->bCookAll)
|
|
{
|
|
OptionalParams += TEXT(" -CookAll");
|
|
// maps only flag only affects cook all
|
|
if (PackagingSettings->bCookMapsOnly)
|
|
{
|
|
OptionalParams += TEXT(" -CookMapsOnly");
|
|
}
|
|
}
|
|
|
|
if (PackagingSettings->bSkipEditorContent)
|
|
{
|
|
OptionalParams += TEXT(" -SKIPEDITORCONTENT");
|
|
}*/
|
|
return OptionalParams;
|
|
}
|
|
|
|
|
|
void FMainFrameActionCallbacks::CookContent(const FName InPlatformInfoName)
|
|
{
|
|
const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(InPlatformInfoName);
|
|
check(PlatformInfo);
|
|
|
|
if (FInstalledPlatformInfo::Get().IsPlatformMissingRequiredFile(PlatformInfo->BinaryFolderName))
|
|
{
|
|
if (!FInstalledPlatformInfo::OpenInstallerOptions())
|
|
{
|
|
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("MissingPlatformFilesCook", "Missing required files to cook for this platform."));
|
|
}
|
|
return;
|
|
}
|
|
|
|
FString OptionalParams;
|
|
|
|
if (!FModuleManager::LoadModuleChecked<IProjectTargetPlatformEditorModule>("ProjectTargetPlatformEditor").ShowUnsupportedTargetWarning(PlatformInfo->VanillaPlatformName))
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (PlatformInfo->SDKStatus == PlatformInfo::EPlatformSDKStatus::NotInstalled)
|
|
{
|
|
IMainFrameModule& MainFrameModule = FModuleManager::GetModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
|
|
MainFrameModule.BroadcastMainFrameSDKNotInstalled(PlatformInfo->TargetPlatformName.ToString(), PlatformInfo->SDKTutorial);
|
|
return;
|
|
}
|
|
|
|
// Append any extra UAT flags specified for this platform flavor
|
|
if (!PlatformInfo->UATCommandLine.IsEmpty())
|
|
{
|
|
OptionalParams += TEXT(" ");
|
|
OptionalParams += PlatformInfo->UATCommandLine;
|
|
}
|
|
else
|
|
{
|
|
OptionalParams += TEXT(" -targetplatform=");
|
|
OptionalParams += *PlatformInfo->TargetPlatformName.ToString();
|
|
}
|
|
|
|
OptionalParams += GetCookingOptionalParams();
|
|
|
|
const bool bRunningDebug = FParse::Param(FCommandLine::Get(), TEXT("debug"));
|
|
|
|
if (bRunningDebug)
|
|
{
|
|
OptionalParams += TEXT(" -UseDebugParamForEditorExe");
|
|
}
|
|
|
|
FString ProjectPath = FPaths::IsProjectFilePathSet() ? FPaths::ConvertRelativePathToFull(FPaths::GetProjectFilePath()) : FPaths::RootDir() / FApp::GetGameName() / FApp::GetGameName() + TEXT(".uproject");
|
|
FString CommandLine = FString::Printf(TEXT("BuildCookRun %s%s -nop4 -project=\"%s\" -cook -ue4exe=%s %s"),
|
|
GetUATCompilationFlags(),
|
|
FApp::IsEngineInstalled() ? TEXT(" -installed") : TEXT(""),
|
|
*ProjectPath,
|
|
*FUnrealEdMisc::Get().GetExecutableForCommandlets(),
|
|
*OptionalParams
|
|
);
|
|
|
|
IUATHelperModule::Get().CreateUatTask(CommandLine, PlatformInfo->DisplayName, LOCTEXT("CookingContentTaskName", "Cooking content"), LOCTEXT("CookingTaskName", "Cooking"), FEditorStyle::GetBrush(TEXT("MainFrame.CookContent")));
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::CookContentCanExecute( const FName PlatformInfoName )
|
|
{
|
|
return true;
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::PackageBuildConfiguration( EProjectPackagingBuildConfigurations BuildConfiguration )
|
|
{
|
|
UProjectPackagingSettings* PackagingSettings = Cast<UProjectPackagingSettings>(UProjectPackagingSettings::StaticClass()->GetDefaultObject());
|
|
PackagingSettings->BuildConfiguration = BuildConfiguration;
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::CanPackageBuildConfiguration( EProjectPackagingBuildConfigurations BuildConfiguration )
|
|
{
|
|
UProjectPackagingSettings* PackagingSettings = Cast<UProjectPackagingSettings>(UProjectPackagingSettings::StaticClass()->GetDefaultObject());
|
|
if (PackagingSettings->ForDistribution && BuildConfiguration != PPBC_Shipping)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::PackageBuildConfigurationIsChecked( EProjectPackagingBuildConfigurations BuildConfiguration )
|
|
{
|
|
return (GetDefault<UProjectPackagingSettings>()->BuildConfiguration == BuildConfiguration);
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::PackageProject( const FName InPlatformInfoName )
|
|
{
|
|
GUnrealEd->CancelPlayingViaLauncher();
|
|
TArray<FString> Packages;
|
|
GUnrealEd->SaveWorldForPlay(Packages);
|
|
|
|
// does the project have any code?
|
|
FGameProjectGenerationModule& GameProjectModule = FModuleManager::LoadModuleChecked<FGameProjectGenerationModule>(TEXT("GameProjectGeneration"));
|
|
bool bProjectHasCode = GameProjectModule.Get().ProjectRequiresBuild(InPlatformInfoName);
|
|
|
|
const PlatformInfo::FPlatformInfo* const PlatformInfo = PlatformInfo::FindPlatformInfo(InPlatformInfoName);
|
|
check(PlatformInfo);
|
|
|
|
if (FInstalledPlatformInfo::Get().IsPlatformMissingRequiredFile(PlatformInfo->BinaryFolderName))
|
|
{
|
|
if (!FInstalledPlatformInfo::OpenInstallerOptions())
|
|
{
|
|
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("MissingPlatformFilesPackage", "Missing required files to package this platform."));
|
|
}
|
|
return;
|
|
}
|
|
|
|
if (PlatformInfo->SDKStatus == PlatformInfo::EPlatformSDKStatus::NotInstalled || (bProjectHasCode && PlatformInfo->bUsesHostCompiler && !FSourceCodeNavigation::IsCompilerAvailable()))
|
|
{
|
|
IMainFrameModule& MainFrameModule = FModuleManager::GetModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
|
|
MainFrameModule.BroadcastMainFrameSDKNotInstalled(PlatformInfo->TargetPlatformName.ToString(), PlatformInfo->SDKTutorial);
|
|
TArray<FAnalyticsEventAttribute> ParamArray;
|
|
ParamArray.Add(FAnalyticsEventAttribute(TEXT("Time"), 0.0));
|
|
FEditorAnalytics::ReportEvent(TEXT("Editor.Package.Failed"), PlatformInfo->TargetPlatformName.ToString(), bProjectHasCode, EAnalyticsErrorCodes::SDKNotFound, ParamArray);
|
|
return;
|
|
}
|
|
|
|
{
|
|
const ITargetPlatform* const Platform = GetTargetPlatformManager()->FindTargetPlatform(PlatformInfo->TargetPlatformName.ToString());
|
|
if (Platform)
|
|
{
|
|
FString NotInstalledTutorialLink;
|
|
FString ProjectPath = FPaths::IsProjectFilePathSet() ? FPaths::ConvertRelativePathToFull(FPaths::GetProjectFilePath()) : FPaths::RootDir() / FApp::GetGameName() / FApp::GetGameName() + TEXT(".uproject");
|
|
int32 Result = Platform->CheckRequirements(ProjectPath, bProjectHasCode, NotInstalledTutorialLink);
|
|
|
|
// report to analytics
|
|
FEditorAnalytics::ReportBuildRequirementsFailure(TEXT("Editor.Package.Failed"), PlatformInfo->TargetPlatformName.ToString(), bProjectHasCode, Result);
|
|
|
|
// report to message log
|
|
if ((Result & ETargetPlatformReadyStatus::SDKNotFound) != 0)
|
|
{
|
|
AddMessageLog(
|
|
LOCTEXT("SdkNotFoundMessage", "Software Development Kit (SDK) not found."),
|
|
FText::Format(LOCTEXT("SdkNotFoundMessageDetail", "Please install the SDK for the {0} target platform!"), Platform->DisplayName()),
|
|
NotInstalledTutorialLink
|
|
);
|
|
}
|
|
|
|
if ((Result & ETargetPlatformReadyStatus::ProvisionNotFound) != 0)
|
|
{
|
|
AddMessageLog(
|
|
LOCTEXT("ProvisionNotFoundMessage", "Provision not found."),
|
|
LOCTEXT("ProvisionNotFoundMessageDetail", "A provision is required for deploying your app to the device."),
|
|
NotInstalledTutorialLink
|
|
);
|
|
}
|
|
|
|
if ((Result & ETargetPlatformReadyStatus::SigningKeyNotFound) != 0)
|
|
{
|
|
AddMessageLog(
|
|
LOCTEXT("SigningKeyNotFoundMessage", "Signing key not found."),
|
|
LOCTEXT("SigningKeyNotFoundMessageDetail", "The app could not be digitally signed, because the signing key is not configured."),
|
|
NotInstalledTutorialLink
|
|
);
|
|
}
|
|
|
|
if ((Result & ETargetPlatformReadyStatus::ManifestNotFound) != 0)
|
|
{
|
|
AddMessageLog(
|
|
LOCTEXT("ManifestNotFound", "Manifest not found."),
|
|
LOCTEXT("ManifestNotFoundMessageDetail", "The generated application manifest could not be found."),
|
|
NotInstalledTutorialLink
|
|
);
|
|
}
|
|
|
|
// report to main frame
|
|
bool UnrecoverableError = false;
|
|
|
|
if ((Result & ETargetPlatformReadyStatus::CodeUnsupported) != 0)
|
|
{
|
|
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("NotSupported_SelectedPlatform", "Sorry, packaging a code-based project for the selected platform is currently not supported. This feature may be available in a future release."));
|
|
UnrecoverableError = true;
|
|
}
|
|
else if ((Result & ETargetPlatformReadyStatus::PluginsUnsupported) != 0)
|
|
{
|
|
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("NotSupported_ThirdPartyPlugins", "Sorry, packaging a project with third-party plugins is currently not supported for the selected platform. This feature may be available in a future release."));
|
|
UnrecoverableError = true;
|
|
}
|
|
|
|
if (UnrecoverableError)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (!FModuleManager::LoadModuleChecked<IProjectTargetPlatformEditorModule>("ProjectTargetPlatformEditor").ShowUnsupportedTargetWarning(PlatformInfo->VanillaPlatformName))
|
|
{
|
|
return;
|
|
}
|
|
|
|
UProjectPackagingSettings* PackagingSettings = Cast<UProjectPackagingSettings>(UProjectPackagingSettings::StaticClass()->GetDefaultObject());
|
|
|
|
// let the user pick a target directory
|
|
if (PackagingSettings->StagingDirectory.Path.IsEmpty())
|
|
{
|
|
PackagingSettings->StagingDirectory.Path = FPaths::GameDir();
|
|
}
|
|
|
|
FString OutFolderName;
|
|
|
|
void* ParentWindowWindowHandle = nullptr;
|
|
IMainFrameModule& MainFrameModule = FModuleManager::LoadModuleChecked<IMainFrameModule>(TEXT("MainFrame"));
|
|
const TSharedPtr<SWindow>& MainFrameParentWindow = MainFrameModule.GetParentWindow();
|
|
if ( MainFrameParentWindow.IsValid() && MainFrameParentWindow->GetNativeWindow().IsValid() )
|
|
{
|
|
ParentWindowWindowHandle = MainFrameParentWindow->GetNativeWindow()->GetOSWindowHandle();
|
|
}
|
|
|
|
if (!FDesktopPlatformModule::Get()->OpenDirectoryDialog(ParentWindowWindowHandle, LOCTEXT("PackageDirectoryDialogTitle", "Package project...").ToString(), PackagingSettings->StagingDirectory.Path, OutFolderName))
|
|
{
|
|
return;
|
|
}
|
|
|
|
PackagingSettings->StagingDirectory.Path = OutFolderName;
|
|
PackagingSettings->SaveConfig();
|
|
|
|
// create the packager process
|
|
FString OptionalParams;
|
|
|
|
if (PackagingSettings->FullRebuild)
|
|
{
|
|
OptionalParams += TEXT(" -clean");
|
|
}
|
|
|
|
if ( PackagingSettings->bCompressed )
|
|
{
|
|
OptionalParams += TEXT(" -compressed");
|
|
}
|
|
|
|
OptionalParams += GetCookingOptionalParams();
|
|
|
|
if (PackagingSettings->UsePakFile)
|
|
{
|
|
if (PlatformInfo->TargetPlatformName != FName("HTML5"))
|
|
{
|
|
OptionalParams += TEXT(" -pak");
|
|
}
|
|
}
|
|
|
|
if (PackagingSettings->IncludePrerequisites)
|
|
{
|
|
OptionalParams += TEXT(" -prereqs");
|
|
}
|
|
|
|
if (!PackagingSettings->ApplocalPrerequisitesDirectory.Path.IsEmpty())
|
|
{
|
|
OptionalParams += FString::Printf(TEXT(" -applocaldir=\"%s\""), *(PackagingSettings->ApplocalPrerequisitesDirectory.Path));
|
|
}
|
|
|
|
if (PackagingSettings->ForDistribution)
|
|
{
|
|
OptionalParams += TEXT(" -distribution");
|
|
}
|
|
|
|
if (!PackagingSettings->IncludeDebugFiles)
|
|
{
|
|
OptionalParams += TEXT(" -nodebuginfo");
|
|
}
|
|
|
|
if (PackagingSettings->bNativizeBlueprintAssets)
|
|
{
|
|
OptionalParams += TEXT(" -nativizeAssets");
|
|
}
|
|
|
|
if (PackagingSettings->bGenerateChunks)
|
|
{
|
|
OptionalParams += TEXT(" -manifests");
|
|
}
|
|
|
|
bool bTargetPlatformCanUseCrashReporter = true;
|
|
if (PlatformInfo->TargetPlatformName == FName("WindowsNoEditor") && PlatformInfo->PlatformFlavor == TEXT("Win32"))
|
|
{
|
|
FString MinumumSupportedWindowsOS;
|
|
GConfig->GetString(TEXT("/Script/WindowsTargetPlatform.WindowsTargetSettings"), TEXT("MinimumOSVersion"), MinumumSupportedWindowsOS, GEngineIni);
|
|
if (MinumumSupportedWindowsOS == TEXT("MSOS_XP"))
|
|
{
|
|
OptionalParams += TEXT(" -SpecifiedArchitecture=_xp");
|
|
bTargetPlatformCanUseCrashReporter = false;
|
|
}
|
|
}
|
|
|
|
// Append any extra UAT flags specified for this platform flavor
|
|
if (!PlatformInfo->UATCommandLine.IsEmpty())
|
|
{
|
|
OptionalParams += TEXT(" ");
|
|
OptionalParams += PlatformInfo->UATCommandLine;
|
|
}
|
|
else
|
|
{
|
|
OptionalParams += TEXT(" -targetplatform=");
|
|
OptionalParams += *PlatformInfo->TargetPlatformName.ToString();
|
|
}
|
|
|
|
// only build if the project has code that might need to be built
|
|
if (bProjectHasCode || (!FApp::GetEngineIsPromotedBuild() && !FApp::IsEngineInstalled()) || PackagingSettings->bNativizeBlueprintAssets)
|
|
{
|
|
OptionalParams += TEXT(" -build");
|
|
}
|
|
|
|
// Whether to include the crash reporter.
|
|
if (PackagingSettings->IncludeCrashReporter && bTargetPlatformCanUseCrashReporter)
|
|
{
|
|
OptionalParams += TEXT( " -CrashReporter" );
|
|
}
|
|
|
|
if (PackagingSettings->bBuildHttpChunkInstallData)
|
|
{
|
|
OptionalParams += FString::Printf(TEXT(" -manifests -createchunkinstall -chunkinstalldirectory=\"%s\" -chunkinstallversion=%s"), *(PackagingSettings->HttpChunkInstallDataDirectory.Path), *(PackagingSettings->HttpChunkInstallDataVersion));
|
|
}
|
|
|
|
int32 NumCookers = GetDefault<UEditorExperimentalSettings>()->MultiProcessCooking;
|
|
if (NumCookers > 0 )
|
|
{
|
|
OptionalParams += FString::Printf(TEXT(" -NumCookersToSpawn=%d"), NumCookers);
|
|
}
|
|
|
|
const bool bRunningDebug = FParse::Param(FCommandLine::Get(), TEXT("debug"));
|
|
|
|
if (bRunningDebug)
|
|
{
|
|
OptionalParams += TEXT(" -UseDebugParamForEditorExe");
|
|
}
|
|
|
|
FString Configuration = FindObject<UEnum>(ANY_PACKAGE, TEXT("EProjectPackagingBuildConfigurations"))->GetEnumName(PackagingSettings->BuildConfiguration);
|
|
Configuration = Configuration.Replace(TEXT("PPBC_"), TEXT(""));
|
|
|
|
FString ProjectPath = FPaths::IsProjectFilePathSet() ? FPaths::ConvertRelativePathToFull(FPaths::GetProjectFilePath()) : FPaths::RootDir() / FApp::GetGameName() / FApp::GetGameName() + TEXT(".uproject");
|
|
FString CommandLine = FString::Printf(TEXT("-ScriptsForProject=\"%s\" BuildCookRun %s%s -nop4 -project=\"%s\" -cook -stage -archive -archivedirectory=\"%s\" -package -clientconfig=%s -ue4exe=%s %s -utf8output"),
|
|
*ProjectPath,
|
|
GetUATCompilationFlags(),
|
|
FApp::IsEngineInstalled() ? TEXT(" -installed") : TEXT(""),
|
|
*ProjectPath,
|
|
*PackagingSettings->StagingDirectory.Path,
|
|
*Configuration,
|
|
*FUnrealEdMisc::Get().GetExecutableForCommandlets(),
|
|
*OptionalParams
|
|
);
|
|
|
|
IUATHelperModule::Get().CreateUatTask( CommandLine, PlatformInfo->DisplayName, LOCTEXT("PackagingProjectTaskName", "Packaging project"), LOCTEXT("PackagingTaskName", "Packaging"), FEditorStyle::GetBrush(TEXT("MainFrame.PackageProject")) );
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::PackageProjectCanExecute( const FName PlatformInfoName )
|
|
{
|
|
return true;
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::RefreshCodeProject()
|
|
{
|
|
if ( !FSourceCodeNavigation::IsCompilerAvailable() )
|
|
{
|
|
// Attempt to trigger the tutorial if the user doesn't have a compiler installed for the project.
|
|
FSourceCodeNavigation::AccessOnCompilerNotFound().Broadcast();
|
|
}
|
|
|
|
FText FailReason, FailLog;
|
|
if(!FGameProjectGenerationModule::Get().UpdateCodeProject(FailReason, FailLog))
|
|
{
|
|
SOutputLogDialog::Open(LOCTEXT("RefreshProject", "Refresh Project"), FailReason, FailLog, FText::GetEmpty());
|
|
}
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::IsCodeProject()
|
|
{
|
|
// Not particularly rigorous, but assume it's a code project if it can find a Source directory
|
|
const bool bIsCodeProject = IFileManager::Get().DirectoryExists(*FPaths::GameSourceDir());
|
|
return bIsCodeProject;
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::OpenIDE()
|
|
{
|
|
if ( !FSourceCodeNavigation::IsCompilerAvailable() )
|
|
{
|
|
// Attempt to trigger the tutorial if the user doesn't have a compiler installed for the project.
|
|
FSourceCodeNavigation::AccessOnCompilerNotFound().Broadcast();
|
|
}
|
|
else
|
|
{
|
|
if ( !FSourceCodeNavigation::OpenModuleSolution() )
|
|
{
|
|
FString SolutionPath;
|
|
if(FDesktopPlatformModule::Get()->GetSolutionPath(SolutionPath))
|
|
{
|
|
const FString FullPath = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead( *SolutionPath );
|
|
const FText Message = FText::Format( LOCTEXT( "OpenIDEFailed_MissingFile", "Could not open {0} for project {1}" ), FSourceCodeNavigation::GetSuggestedSourceCodeIDE(), FText::FromString( FullPath ) );
|
|
FMessageDialog::Open( EAppMsgType::Ok, Message );
|
|
}
|
|
else
|
|
{
|
|
FMessageDialog::Open( EAppMsgType::Ok, LOCTEXT("OpenIDEFailed_MissingSolution", "Couldn't find solution"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::ZipUpProject()
|
|
{
|
|
#if PLATFORM_WINDOWS
|
|
FText PlatformName = LOCTEXT("PlatformName_Windows", "Windows");
|
|
#elif PLATFORM_MAC
|
|
FText PlatformName = LOCTEXT("PlatformName_Mac", "Mac");
|
|
#elif PLATFORM_LINUX
|
|
FText PlatformName = LOCTEXT("PlatformName_Linux", "Linux");
|
|
#else
|
|
FText PlatformName = LOCTEXT("PlatformName_Other", "Other OS");
|
|
#endif
|
|
|
|
bool bOpened = false;
|
|
TArray<FString> SaveFilenames;
|
|
IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();
|
|
if (DesktopPlatform != NULL)
|
|
{
|
|
bOpened = DesktopPlatform->SaveFileDialog(
|
|
NULL,
|
|
NSLOCTEXT("UnrealEd", "ZipUpProject", "Zip file location").ToString(),
|
|
FPaths::GameDir(),
|
|
FApp::GetGameName(),
|
|
TEXT("Zip file|*.zip"),
|
|
EFileDialogFlags::None,
|
|
SaveFilenames);
|
|
}
|
|
|
|
if (bOpened)
|
|
{
|
|
for (FString FileName : SaveFilenames)
|
|
{
|
|
// Ensure path is full rather than relative (for macs)
|
|
FString FinalFileName = FPaths::ConvertRelativePathToFull(FileName);
|
|
FString ProjectPath = FPaths::IsProjectFilePathSet() ? FPaths::ConvertRelativePathToFull(FPaths::GameDir()) : FPaths::RootDir() / FApp::GetGameName();
|
|
|
|
FString CommandLine = FString::Printf(TEXT("ZipProjectUp -project=\"%s\" -install=\"%s\""), *ProjectPath, *FinalFileName);
|
|
|
|
IUATHelperModule::Get().CreateUatTask( CommandLine, PlatformName, LOCTEXT("ZipTaskName", "Zipping Up Project"),
|
|
LOCTEXT("ZipTaskShortName", "Zip Project Task"), FEditorStyle::GetBrush(TEXT("MainFrame.CookContent")));
|
|
}
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::PackagingSettings()
|
|
{
|
|
FModuleManager::LoadModuleChecked<ISettingsModule>("Settings").ShowViewer("Project", "Project", "Packaging");
|
|
}
|
|
|
|
//void FMainFrameActionCallbacks::LocalizeProject()
|
|
//{
|
|
// FModuleManager::LoadModuleChecked<ILocalizationDashboardModule>("LocalizationDashboard").Show();
|
|
//}
|
|
|
|
void FMainFrameActionCallbacks::SwitchProjectByIndex( int32 ProjectIndex )
|
|
{
|
|
FUnrealEdMisc::Get().SwitchProject( ProjectNames[ ProjectIndex ] );
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::SwitchProject(const FString& GameOrProjectFileName)
|
|
{
|
|
FUnrealEdMisc::Get().SwitchProject( GameOrProjectFileName );
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::OpenBackupDirectory( FString BackupFile )
|
|
{
|
|
FPlatformProcess::LaunchFileInDefaultExternalApplication(*FPaths::GetPath(FPaths::ConvertRelativePathToFull(BackupFile)));
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::ResetLayout()
|
|
{
|
|
if(EAppReturnType::Ok != OpenMsgDlgInt(EAppMsgType::OkCancel, LOCTEXT( "ActionRestartMsg", "This action requires the editor to restart; you will be prompted to save any changes. Continue?" ), LOCTEXT( "ResetUILayout_Title", "Reset UI Layout" ) ) )
|
|
{
|
|
return;
|
|
}
|
|
|
|
// make a backup
|
|
GetMutableDefault<UEditorPerProjectUserSettings>()->SaveConfig();
|
|
|
|
FString BackupEditorLayoutIni = FString::Printf(TEXT("%s_Backup.ini"), *FPaths::GetBaseFilename(GEditorLayoutIni, false));
|
|
|
|
if( COPY_Fail == IFileManager::Get().Copy(*BackupEditorLayoutIni, *GEditorLayoutIni) )
|
|
{
|
|
FMessageLog EditorErrors("EditorErrors");
|
|
if(!FPaths::FileExists(GEditorLayoutIni))
|
|
{
|
|
FFormatNamedArguments Arguments;
|
|
Arguments.Add(TEXT("FileName"), FText::FromString(GEditorLayoutIni));
|
|
EditorErrors.Warning(FText::Format(LOCTEXT("UnsuccessfulBackup_NoExist_Notification", "Unsuccessful backup! {FileName} does not exist!"), Arguments));
|
|
}
|
|
else if(IFileManager::Get().IsReadOnly(*BackupEditorLayoutIni))
|
|
{
|
|
FFormatNamedArguments Arguments;
|
|
Arguments.Add(TEXT("FileName"), FText::FromString(FPaths::ConvertRelativePathToFull(BackupEditorLayoutIni)));
|
|
EditorErrors.Warning(FText::Format(LOCTEXT("UnsuccessfulBackup_ReadOnly_Notification", "Unsuccessful backup! {FileName} is read-only!"), Arguments));
|
|
}
|
|
else
|
|
{
|
|
// We don't specifically know why it failed, this is a fallback.
|
|
FFormatNamedArguments Arguments;
|
|
Arguments.Add(TEXT("SourceFileName"), FText::FromString(GEditorLayoutIni));
|
|
Arguments.Add(TEXT("BackupFileName"), FText::FromString(FPaths::ConvertRelativePathToFull(BackupEditorLayoutIni)));
|
|
EditorErrors.Warning(FText::Format(LOCTEXT("UnsuccessfulBackup_Fallback_Notification", "Unsuccessful backup of {SourceFileName} to {BackupFileName}"), Arguments));
|
|
}
|
|
EditorErrors.Notify(LOCTEXT("BackupUnsuccessful_Title", "Backup Unsuccessful!"));
|
|
}
|
|
else
|
|
{
|
|
FNotificationInfo ErrorNotification( FText::GetEmpty() );
|
|
ErrorNotification.bFireAndForget = true;
|
|
ErrorNotification.ExpireDuration = 3.0f;
|
|
ErrorNotification.bUseThrobber = true;
|
|
ErrorNotification.Hyperlink = FSimpleDelegate::CreateStatic(&FMainFrameActionCallbacks::OpenBackupDirectory, BackupEditorLayoutIni);
|
|
ErrorNotification.HyperlinkText = LOCTEXT("SuccessfulBackup_Notification_Hyperlink", "Open Directory");
|
|
ErrorNotification.Text = LOCTEXT("SuccessfulBackup_Notification", "Backup Successful!");
|
|
ErrorNotification.Image = FEditorStyle::GetBrush(TEXT("NotificationList.SuccessImage"));
|
|
FSlateNotificationManager::Get().AddNotification(ErrorNotification);
|
|
}
|
|
|
|
// reset layout & restart Editor
|
|
FUnrealEdMisc::Get().AllowSavingLayoutOnClose(false);
|
|
FUnrealEdMisc::Get().RestartEditor(false);
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::SaveLayout()
|
|
{
|
|
FGlobalTabmanager::Get()->SaveAllVisualState();
|
|
|
|
// Write the saved state's config to disk
|
|
GConfig->Flush( false, GEditorLayoutIni );
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::ToggleFullscreen_Execute()
|
|
{
|
|
if ( GIsEditor && FApp::HasGameName() )
|
|
{
|
|
static TWeakPtr<SDockTab> LevelEditorTabPtr = FGlobalTabmanager::Get()->InvokeTab(FTabId("LevelEditor"));
|
|
const TSharedPtr<SWindow> LevelEditorWindow = FSlateApplication::Get().FindWidgetWindow( LevelEditorTabPtr.Pin().ToSharedRef() );
|
|
|
|
if (LevelEditorWindow->GetWindowMode() == EWindowMode::Windowed)
|
|
{
|
|
LevelEditorWindow->SetWindowMode(EWindowMode::WindowedFullscreen);
|
|
}
|
|
else
|
|
{
|
|
LevelEditorWindow->SetWindowMode(EWindowMode::Windowed);
|
|
}
|
|
}
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::FullScreen_IsChecked()
|
|
{
|
|
const TSharedPtr<SDockTab> LevelEditorTabPtr = FModuleManager::Get().GetModuleChecked<FLevelEditorModule>( "LevelEditor" ).GetLevelEditorTab();
|
|
|
|
const TSharedPtr<SWindow> LevelEditorWindow = LevelEditorTabPtr.IsValid()
|
|
? LevelEditorTabPtr->GetParentWindow()
|
|
: TSharedPtr<SWindow>();
|
|
|
|
return (LevelEditorWindow.IsValid())
|
|
? (LevelEditorWindow->GetWindowMode() != EWindowMode::Windowed)
|
|
: false;
|
|
}
|
|
|
|
|
|
bool FMainFrameActionCallbacks::CanSwitchToProject( int32 InProjectIndex )
|
|
{
|
|
if (FApp::HasGameName() && ProjectNames[InProjectIndex].StartsWith(FApp::GetGameName()))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if ( FPaths::IsProjectFilePathSet() && ProjectNames[ InProjectIndex ] == FPaths::GetProjectFilePath() )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::IsSwitchProjectChecked( int32 InProjectIndex )
|
|
{
|
|
return CanSwitchToProject( InProjectIndex ) == false;
|
|
}
|
|
|
|
|
|
void FMainFrameActionCallbacks::Exit()
|
|
{
|
|
FSlateApplication::Get().LeaveDebuggingMode();
|
|
// Shut down the editor
|
|
// NOTE: We can't close the editor from within this stack frame as it will cause various DLLs
|
|
// (such as MainFrame) to become unloaded out from underneath the code pointer. We'll shut down
|
|
// as soon as it's safe to do so.
|
|
GEngine->DeferredCommands.Add( TEXT("CLOSE_SLATE_MAINFRAME"));
|
|
}
|
|
|
|
|
|
bool FMainFrameActionCallbacks::Undo_CanExecute()
|
|
{
|
|
return GUnrealEd->Trans->CanUndo() && FSlateApplication::Get().IsNormalExecution();
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::Redo_CanExecute()
|
|
{
|
|
return GUnrealEd->Trans->CanRedo() && FSlateApplication::Get().IsNormalExecution();
|
|
}
|
|
|
|
|
|
void FMainFrameActionCallbacks::ExecuteExecCommand( FString Command )
|
|
{
|
|
GUnrealEd->Exec( GEditor->GetEditorWorldContext(false).World(), *Command );
|
|
}
|
|
|
|
|
|
void FMainFrameActionCallbacks::OpenSlateApp_ViaModule( FName AppName, FName ModuleName )
|
|
{
|
|
FModuleManager::Get().LoadModule( ModuleName );
|
|
OpenSlateApp( AppName );
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::OpenSlateApp( FName AppName )
|
|
{
|
|
FGlobalTabmanager::Get()->InvokeTab(FTabId(AppName));
|
|
}
|
|
|
|
bool FMainFrameActionCallbacks::OpenSlateApp_IsChecked( FName AppName )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::VisitAskAQuestionPage()
|
|
{
|
|
FString AskAQuestionURL;
|
|
if(FUnrealEdMisc::Get().GetURL( TEXT("AskAQuestionURL"), AskAQuestionURL, true ))
|
|
{
|
|
FPlatformProcess::LaunchURL( *AskAQuestionURL, NULL, NULL );
|
|
}
|
|
}
|
|
|
|
|
|
void FMainFrameActionCallbacks::VisitSearchForAnswersPage()
|
|
{
|
|
FString SearchForAnswersURL;
|
|
if(FUnrealEdMisc::Get().GetURL( TEXT("SearchForAnswersURL"), SearchForAnswersURL, true ))
|
|
{
|
|
FPlatformProcess::LaunchURL( *SearchForAnswersURL, NULL, NULL );
|
|
}
|
|
}
|
|
|
|
|
|
void FMainFrameActionCallbacks::VisitSupportWebSite()
|
|
{
|
|
FString SupportWebsiteURL;
|
|
if(FUnrealEdMisc::Get().GetURL( TEXT("SupportWebsiteURL"), SupportWebsiteURL, true ))
|
|
{
|
|
FPlatformProcess::LaunchURL( *SupportWebsiteURL, NULL, NULL );
|
|
}
|
|
}
|
|
|
|
|
|
void FMainFrameActionCallbacks::VisitEpicGamesDotCom()
|
|
{
|
|
FString EpicGamesURL;
|
|
if(FUnrealEdMisc::Get().GetURL( TEXT("EpicGamesURL"), EpicGamesURL ))
|
|
{
|
|
FPlatformProcess::LaunchURL( *EpicGamesURL, NULL, NULL );
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::VisitWiki()
|
|
{
|
|
FString URL;
|
|
if (FUnrealEdMisc::Get().GetURL(TEXT("WikiURL"), URL))
|
|
{
|
|
FPlatformProcess::LaunchURL(*URL, NULL, NULL);
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::VisitForums()
|
|
{
|
|
FString URL;
|
|
if (FUnrealEdMisc::Get().GetURL(TEXT("ForumsURL"), URL))
|
|
{
|
|
FPlatformProcess::LaunchURL(*URL, NULL, NULL);
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::AboutUnrealEd_Execute()
|
|
{
|
|
const FText AboutWindowTitle = LOCTEXT( "AboutUnrealEditor", "About Unreal Editor" );
|
|
|
|
TSharedPtr<SWindow> AboutWindow =
|
|
SNew(SWindow)
|
|
.Title( AboutWindowTitle )
|
|
.ClientSize(FVector2D(600.f, 200.f))
|
|
.SupportsMaximize(false) .SupportsMinimize(false)
|
|
.SizingRule( ESizingRule::FixedSize )
|
|
[
|
|
SNew(SAboutScreen)
|
|
];
|
|
|
|
IMainFrameModule& MainFrame = FModuleManager::LoadModuleChecked<IMainFrameModule>( "MainFrame" );
|
|
TSharedPtr<SWindow> ParentWindow = MainFrame.GetParentWindow();
|
|
|
|
if ( ParentWindow.IsValid() )
|
|
{
|
|
FSlateApplication::Get().AddModalWindow(AboutWindow.ToSharedRef(), ParentWindow.ToSharedRef());
|
|
}
|
|
else
|
|
{
|
|
FSlateApplication::Get().AddWindow(AboutWindow.ToSharedRef());
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::CreditsUnrealEd_Execute()
|
|
{
|
|
const FText CreditsWindowTitle = LOCTEXT("CreditsUnrealEditor", "Credits");
|
|
|
|
TSharedPtr<SWindow> CreditsWindow =
|
|
SNew(SWindow)
|
|
.Title(CreditsWindowTitle)
|
|
.ClientSize(FVector2D(600.f, 700.f))
|
|
.SupportsMaximize(false)
|
|
.SupportsMinimize(false)
|
|
.SizingRule(ESizingRule::FixedSize)
|
|
[
|
|
SNew(SCreditsScreen)
|
|
];
|
|
|
|
IMainFrameModule& MainFrame = FModuleManager::LoadModuleChecked<IMainFrameModule>("MainFrame");
|
|
TSharedPtr<SWindow> ParentWindow = MainFrame.GetParentWindow();
|
|
|
|
if ( ParentWindow.IsValid() )
|
|
{
|
|
FSlateApplication::Get().AddModalWindow(CreditsWindow.ToSharedRef(), ParentWindow.ToSharedRef());
|
|
}
|
|
else
|
|
{
|
|
FSlateApplication::Get().AddWindow(CreditsWindow.ToSharedRef());
|
|
}
|
|
}
|
|
|
|
void FMainFrameActionCallbacks::OpenWidgetReflector_Execute()
|
|
{
|
|
FGlobalTabmanager::Get()->InvokeTab(FTabId("WidgetReflector"));
|
|
}
|
|
|
|
|
|
/* FMainFrameActionCallbacks implementation
|
|
*****************************************************************************/
|
|
|
|
void FMainFrameActionCallbacks::AddMessageLog( const FText& Text, const FText& Detail, const FString& TutorialLink )
|
|
{
|
|
TSharedRef<FTokenizedMessage> Message = FTokenizedMessage::Create(EMessageSeverity::Error);
|
|
Message->AddToken(FTextToken::Create(Text));
|
|
Message->AddToken(FTextToken::Create(Detail));
|
|
Message->AddToken(FTutorialToken::Create(TutorialLink));
|
|
Message->AddToken(FDocumentationToken::Create(TEXT("Platforms/iOS/QuickStart/6")));
|
|
|
|
FMessageLog MessageLog("PackagingResults");
|
|
MessageLog.AddMessage(Message);
|
|
MessageLog.Open();
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|