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 3292215 on 2017/02/08 by Nick.Shin HTML5 emscripten: wasm and wbegl2 support - emscripten toolchain #jira UEPLAT-1437 Switch [to] web assembly #rb none Change 3293994 on 2017/02/09 by Nick.Shin HTML5 emscripten: wasm and webgl2 support - OSX toolchain #jira UEPLAT-1437 Switch [to] web assembly #rb none Change 3317951 on 2017/02/22 by Nick.Shin HTML5 emscripten: wasm & webgl2 support - RC1 - emscripten toolchain WARNING: emscripten/incoming/source/include/libc/bit (the file) might need to be deleted first #jira UEMOB-263 Switch [to] web assembly #jira UEMOB-201 Support ES3 / WebGL2 in HTML5 #rb none Change 3318669 on 2017/02/23 by Nick.Shin HTML5 emscripten: wasm & webgl2 support - RC1 - OSX toolchain #jira UEMOB-263 Switch [to] web assembly #jira UEMOB-201 Support ES3 / WebGL2 in HTML5 #rb none Change 3462146 on 2017/05/26 by Nick.Shin HTML5 - merge from Release-4.16 to Dev-Mobile #jira none #rb none #rnx Change 3504996 on 2017/06/22 by Cosmin.Sulea UEMOB-362 - Add per-texture and per-format compression quality override settings #rb Dmitriy.Dyomin #jira UEMOB-362 #codereview Dmitriy.Dyomin #codereview Jack.Porter Change 3505056 on 2017/06/22 by Cosmin.Sulea Back out changelist 3504996 - due to errors generated in xboxOne, PS4 and Switch versions #rb none Change 3508049 on 2017/06/23 by Nick.Shin HTML5 toolchain notes corrections #jira none #rb none #rnx Change 3508663 on 2017/06/24 by Nick.Shin HTML5LaunchHelper.exe on linux - redo - it seems that i need to also check-in the exe and pdb file instead of having CIS make and checking-in them itself... - modified c# program to output a version number to help track which version of HTML5LaunchHelper is running... #jira UE-45302 HTML5LaunchHelper.exe hosts the files in the current working directory on Linux #rnx #rb none Change 3509210 on 2017/06/26 by Dmitriy.Dyomin ExposureScale will be applied during tonemap pass when MobileHDR is on #rb jack.porter #codereview Allan.Bentham Change 3511058 on 2017/06/27 by Cosmin.Sulea UEMOB-362 - Add per-texture and per-format compression quality override settings - resubmitted #rb Dmitriy.Dyomin #jira UEMOB-362 #codereview Dmitriy.Dyomin Change 3511069 on 2017/06/27 by Jack.Porter PS4, XboxOne and Switch fixes for changes to ITextureFormat interface #rb Dmitriy.Dyomin #jira UEMOB-362 Change 3513028 on 2017/06/28 by Jack.Porter Merging //UE4/Dev-Main to Dev-Mobile (//UE4/Dev-Mobile) #rb None Change 3517409 on 2017/06/30 by Jack.Porter Merging //UE4/Dev-Main to Dev-Mobile (//UE4/Dev-Mobile) #rb None Change 3517730 on 2017/06/30 by Cosmin.Sulea UEMOB-328 - Improve handling of iOS signing key on remote Mac system keychain when using remote toolchain #rb Jack.Porter #jira UEMOB-328 #codereview: peter.sauerbrei Change 3517757 on 2017/06/30 by Cosmin.Sulea UE-46245 - Building with remote toolchain does not use Project Setting for iOS signing identity which can cause signing errors #rb Jack.Porter #jira UE-46245 #codereview: peter.sauerbrei Change 3518149 on 2017/06/30 by Adrian.Chelu UE-43035 Tilt axis for X and Z are not consistent between Android and iOS devices #rb Jack.Porter #jira UE-46245 #codereview: Chris Babcock <chris.babcock@epicgames.com> Change 3524242 on 2017/07/06 by Nick.Shin HTML5 - refraction shader note: this CL also contains fixes to webgl2 [float4 vs half2] and a [% vs Mod()] material custom function changes to some TM-ShaderModels shaders specifically: fixes to and similar with: DitherTemporalAA #jria UE-46434 No Refraction in QA Game TM-Shadermodels HTML5 #rb none #rn #codereview jack.porter dmitriy.dyomin Change 3535295 on 2017/07/13 by Allan.Bentham #jira UEMOB-390 Add Android cpu stats. add 'stat AndroidCPU' to android's console spinner UI. increase GetCPUState's core count support to 16. #jira UE-45888 Use cvar value to limit android cpu stat update rate. #rb none Change 3535306 on 2017/07/13 by Allan.Bentham Add missing pragma once #rb none Change 3537047 on 2017/07/13 by Ben.Marsh Fixing case of iOS directories, pt1 #rb none Change 3537051 on 2017/07/13 by Ben.Marsh Fixing case of iOS directories, pt2 #rb none Change 3537373 on 2017/07/14 by Allan.Bentham Add scope level android egl error verification. work around minor issue with invalid egl config property. #rb chris.babcock Change3541735on 2017/07/18 by Allan.Bentham Add 'sustained performance mode' support for API 24+ devices. #jira UEMOB-386 #rb chris.babcock Change 3543001 on 2017/07/18 by Sorin.Gradinaru #jira UE-45766 Improved Virtual Keyboard cannot receive non-English characters. - for Android, add an native EditBox above the virtual keyboard to receive the text and pass it to the object from the slate #rb Chris.Babcock Change 3554399 on 2017/07/25 by Nick.Shin STATS disabled for non multi-threaded platforms #jira UE-47485 ( Pri:1 - 4.18 ) Crash running Stat Command test in TM-Core on Firefox #rnx #rb none Change 3554402 on 2017/07/25 by Nick.Shin STATS TaskGraph disabled for non multi-threaded platforms #jira UE-47486 ( Pri:1 - 4.18 ) QAGame hard locks on Firefox when triggering Task Graph Benchmark test #rb none #rnx Change 3556957 on 2017/07/26 by Nick.Shin HTML5 - WASM enabled by default - part 1 -- commenting out asmjs stuff begin sunsetting ASM.JS note to self: CL#3462146 "backout" asmjs #jira UEMOB-416 WASM enabled by default #rnx #rb none Change 3557654 on 2017/07/26 by Nick.Shin HTML5 - WASM enabled by default - part 2 -- remove asmjs code sunsetting ASM.JS note to self: CL#3462146 "backout" asmjs #jira UEMOB-416 WASM enabled by default #rn #rb none Change 3557910 on 2017/07/27 by Jack.Porter Support Client configuration when packaging in the editor #jira UE-39973 #rb Dmitriy.Dyomin Change3557917on 2017/07/27 by Jack.Porter Missing file from CL 3557910 #rb trivial Change 3559642 on 2017/07/27 by Nick.Shin STATS TaskGraph disabled for non multi-threaded platforms - both "LockFree stress test" and "task graph benchmark" are disabled - no multi-threading for WASM exist yet (note: ASM.JS has been sunsetted) - stat command crash "fixed" - but, font size are totally broken - i can look at this (much) later... - new bug: physx will crash on "gc and level load stress test" -- please bug this as a new jira #jira UE-47486 ( Pri:1 - 4.18 ) QAGame hard locks on Firefox when triggering Task Graph Benchmark test #rb none #rnx Change 3565656 on 2017/07/31 by Dmitriy.Dyomin Added a way to lock level position in Word Composition #jira UE-47713 #rb none Change 3565757 on 2017/08/01 by Dmitriy.Dyomin compile fix #rb none Change 3567446 on 2017/08/01 by Chris.Babcock Allow addElement and addElements to only insert once with once="true" attribute in UPL #jira UE-47951 #ue4 #android #rb Peter.Sauerbrei Change 3567592 on 2017/08/01 by Chris.Babcock Use absolute path for repositories for Gradle #jira UE-47952 #ue4 #android #rb Tim.Lincoln Change 3568690 on 2017/08/02 by Chris.Babcock Removed warnings for once attribute in UPL #ue4 #android #rb none Change 3569975 on 2017/08/02 by Chris.Babcock Add <baseBuildGradleAdditions> to UPL to allow additions to the root-level build.gradle #jira UE-47995 #ue4 #android #rb Tim.Lincoln Change 3570117 on 2017/08/02 by Chris.Babcock Add <setBoolFromPropertyContains> to UPL - sets bool to true if string list in ini matches contains attribute #jira UE-47996 #ue4 #android #rb Jack.Porter Change 3571552 on 2017/08/03 by Chris.Babcock Removed unneeded settings.gradle file (generated) #jira UE-48041 #ue4 #android #rb none Change 3572224 on 2017/08/04 by Dmitriy.Dyomin Better selection tracking in world composition #rb none Change 3573662 on 2017/08/04 by Nick.Shin HTML5 remove PreLoadMap "feature" (was only available/used with HTML5) - asyncronous loads are not allowed during UEngine::LoadMap() - the files/code will be repurposed for pakfile CHUNK support #jira UEMOB-425 HTML5 streaming content investigation (part 1 of 2) #rn #rb none Change 3574471 on 2017/08/07 by Dmitriy.Dyomin Export ULevelStreamingKismet::LoadLevelInstance function #rb none Change 3576262 on 2017/08/08 by Dmitriy.Dyomin Fixed: widget clipping issues in world composition #rb none Change 3576845 on 2017/08/08 by Nick.Shin set HTML5LaunchHelper application's icon to UE4.ico #jira UE-19225 HTML5LaunchHelper application does not have an unreal icon #rb none #rnx Change 3578313 on 2017/08/09 by Dmitriy.Dyomin Added: an RHI call to invalidate/clear cached state, RHIInvalidateCachedState #jira UEMOB-435 #rb jack.porter Change 3578364 on 2017/08/09 by Dmitriy.Dyomin Vertex Fog is disabled on mobile by default. If scene uses vertex fog - Mobile preview and device will show on screen message: PROJECT HAS VERTEX FOG ON MOBILE DISABLED This saves about 90 instructions in VS and a few in PS #jira UEMOB-166 #rb jack.porter Change 3578703 on 2017/08/09 by Nick.Shin set HTML5LaunchHelper application's icon to UE4.ico forgot to check in exe and pdb file #jira UE-19225 HTML5LaunchHelper application does not have an unreal icon #rb none #rnx Change 3578961 on 2017/08/09 by Peter.Sauerbrei deprecate IOS 8 as the minimum OS supported. #jira UEMOB-429 #rb chris.babcock Change 3579319 on 2017/08/09 by Peter.Sauerbrei fixes for compile errors with Xcode 9 beta 4 #rb none Change 3579356 on 2017/08/09 by Peter.Sauerbrei modified minimum IOS to build with #rb chris.babcock Change 3579687 on 2017/08/09 by Chris.Babcock Fix GoogleVR Gradle packaging #jira UE-48239 #ue4 #android #rb none Change 3579921 on 2017/08/10 by Dmitriy.Dyomin GitHub 3670 : More zoom levels for World Composition (300) #contributedby: user37337 #jira UE-45977 #3670 #rb none Change 3580576 on 2017/08/10 by Peter.Sauerbrei detection of iPad Pro 10.5 and IPad Pro 12.9 (2nd Gen) #rb chris.babcock Change 3580611 on 2017/08/10 by Chris.Babcock Set online provider back to GooglePlay and remove forcing IAP permission (contributed by umerov1999) #jira UE-48185 #PR #3876 #ue4 #android #rb Peter.Sauerbrei Change 3582166 on 2017/08/11 by Nick.Shin nuke PLATFORM_HTML5_WIN32 PLATFORM_HTML5_WIN32 code removal tested successfully with (force rebuild and repackaging): * Win64 server (WindowsServer) * Win64 client (WindowsNoEditor) * HTML5 client all playing together via websocket net driver (i've attached a screen shot of this in jira) code changes touches: physics, audio and main build files #jira UEMOB-433 Remove Win32 SDL "HTML5 Simulator" code #rb ben.marsh #rnx #codereview josh.adams #fyi ori.cohen, aaron.mclera Change 3582474 on 2017/08/11 by Chris.Babcock Don't use V2 signing for Gear VR APKs #jira UE-48354 #ue4 #android #rb Peter.Sauerbrei Change 3582614 on 2017/08/11 by Chris.Babcock Filter out unneeded architectures from APK for Gradle builds #jira UE-48355 #ue4 #android #rb Peter.Sauerbrei Change 3582923 on 2017/08/11 by Nick.Shin backport release 4.17 to dev-mobile #jira none #rb none #rnx Change 3582924 on 2017/08/11 by Nick.Shin FNetworkFileServerHttp - error gracefully when port is already in use #jira UE-46409 [CrashReport] Assertion on Mac: Could not create a libwebsocket - FNetworkFileServerHttp::Init() #rnx #rb none Change 3582925 on 2017/08/11 by Nick.Shin HTML5 - turn off pak file compression in favor of gzip packages #jira UE-46729 HTML5 - on shipping builds - turn off pak file compression in favor of gzip packages #rn #rb none Change 3583943 on 2017/08/14 by Cosmin.Sulea UEMOB-363 - second iteration - Project wide texture quality control by texture group #rb Dmitriy Dyomin #jira UEMOB-363 Change 3583967 on 2017/08/14 by Cosmin.Sulea Back out changelist 3583943 #rb none Change 3584121 on 2017/08/14 by Peter.Sauerbrei fix for mac compile failure #rb none Change 3587877 on 2017/08/15 by Peter.Sauerbrei josh's suggested fix is not working for Xcode 8.3, so brute forcing for now #rb none Change 3588612 on 2017/08/15 by Peter.Sauerbrei Xcode 9 project compatbility updates #rb chris.babcock #codereview michael.trepka Change 3589223 on 2017/08/15 by Dmitriy.Dyomin Fixed: bNavigationAutoUpdateEnabled was not always working when reopeinig the map Fixed: Navigation Build was not clearing some mesh tiles when bNavigationAutoUpdateEnabled is enabled Fixed: Streaming out a level in editor was not always updating NavMesh debug draw #rb lukasz.furman Change 3589900 on 2017/08/16 by Dmitriy.Dyomin Support vulkan validation layers on Android, only in Debug and Development configuration (requires r.Vulkan.EnableValidation=1) #codereview chris.babcock, rolando.caloca #rb none Change 3590592 on 2017/08/16 by Nick.Shin HTML5 emscripten 1.37.19 OSX #jira UE-47813 #rb none #rn HTML5 emscripten 1.37.19 OSX Change 3590597 on 2017/08/16 by Nick.Shin HTML5 emscripten 1.37.19 Linux #jira UE-47813 #rb none #rn HTML5 emscripten 1.37.19 Linux Change 3590624 on 2017/08/16 by Nick.Shin HTML5 emscripten 1.37.19 toolchain #jira UE-47813 #rb none #rn HTML5 emscripten 1.37.19 toolchain Change 3591720 on 2017/08/16 by Chris.Babcock Enable Gradle by default and add button to accept Android SDK license to project settings #jira UE-48519 #ue4 #android #rb Tim.Lincoln #fyi Peter.Sauerbrei Change 3591998 on 2017/08/16 by Chris.Babcock Fix nonunity build #ue4 #android #rb none Change 3592407 on 2017/08/17 by Nick.Shin HTML5 emscripten 1.37.19 Win64 #jira UE-47813 #rb none #rn HTML5 emscripten 1.37.19 Win64 Change 3592479 on 2017/08/17 by Nick.Shin HTML5 3rd Party Libs - compiled with emscripten 1.37.19 #jira UE-47813 #rb none #rn HTML5 3rd Party Libs - compiled with emscripten 1.37.19 toolchain Change 3592480 on 2017/08/17 by Nick.Shin HTML5 emscripten 1.37.19 toolchain Epic edits as well as setting UE4 HTML c# scripts to use new toolchain #jira UE-47813 #rb none #rn HTML5 emscripten 1.37.19 toolchain Epic edits Change 3592481 on 2017/08/17 by Nick.Shin HTML5 remove old emscripten toolchain #jira UE-47813 #rb none #rn HTML5 remove old emscripten toolchain Change 3592485 on 2017/08/17 by Nick.Shin HTML5 undo CanUseXGE - this might be breaking CIS for HTML5 builds... #jira UE-47813 #rb none #rnx Change 3592549 on 2017/08/17 by Dmitriy.Dyomin Added GetDiskTotalAndFreeSpace for IOS and Android #jira UE-46479 #codereview chris.babcock, peter.sauerbrei #rb none Change 3594045 on 2017/08/17 by Peter.Sauerbrei comment about potential failure case in the remote tool chain #rb none Change 3594342 on 2017/08/17 by Peter.Sauerbrei Merging //UE4/Main/... to //UE4/Dev-Mobile/... #rb none Change 3594920 on 2017/08/17 by Peter.Sauerbrei fix for non-unity builds (accidentally merged something incorrectly) #rb none Change 3595347 on 2017/08/17 by Chris.Babcock merge fixes for Android #ue4 #android #rb Peter.Sauerbrei #lockdown Peter.Sauerbrei Change 3595752 on 2017/08/17 by Chris.Babcock Update Facebook plugin to support Gradle #jira UE-48569 #ue4 #android #fyi Josh.Markiewicz #rb none #lockdown Peter.Sauerbrei Change 3595849 on 2017/08/17 by Chris.Babcock Fix issue with libovrplatformloader.so for non armv7 targets #jira UE-48533 #ue4 #android #rb none #lockdown Peter.Sauerbrei Change 3596419 on 2017/08/18 by Peter.Sauerbrei fix for Mac Editor build failure #rb none Change 3597023 on 2017/08/18 by Peter.Sauerbrei fix for game editor build failure #rb none Change 3597032 on 2017/08/18 by Peter.Sauerbrei fix for app bundle id in Info-Editor.plist #rb none Change 3597034 on 2017/08/18 by Peter.Sauerbrei put back the info.plist, found the real problem #rb none Change 3597197 on 2017/08/18 by Peter.Sauerbrei pull Info.plist from the build products #rb none [CL 3600450 by Chris Babcock in Main branch]
866 lines
35 KiB
C++
866 lines
35 KiB
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AndroidTargetSettingsCustomization.h"
|
|
#include "Misc/Paths.h"
|
|
#include "Layout/Margin.h"
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
#include "Engine/GameViewportClient.h"
|
|
#include "Widgets/SBoxPanel.h"
|
|
#include "Engine/GameEngine.h"
|
|
#include "Framework/Text/SlateHyperlinkRun.h"
|
|
#include "Widgets/Layout/SBorder.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
#include "Widgets/Text/SRichTextBlock.h"
|
|
#include "Widgets/Layout/SBox.h"
|
|
#include "Widgets/Input/SButton.h"
|
|
#include "EditorStyleSet.h"
|
|
#include "AndroidRuntimeSettings.h"
|
|
#include "PropertyHandle.h"
|
|
#include "DetailLayoutBuilder.h"
|
|
#include "DetailWidgetRow.h"
|
|
#include "IDetailPropertyRow.h"
|
|
#include "DetailCategoryBuilder.h"
|
|
|
|
#include "SExternalImageReference.h"
|
|
#include "SHyperlinkLaunchURL.h"
|
|
#include "SPlatformSetupMessage.h"
|
|
#include "PlatformIconInfo.h"
|
|
#include "SourceControlHelpers.h"
|
|
#include "ManifestUpdateHelper.h"
|
|
#include "Framework/Notifications/NotificationManager.h"
|
|
#include "Widgets/Notifications/SNotificationList.h"
|
|
#include "Misc/EngineBuildSettings.h"
|
|
#include "InstalledPlatformInfo.h"
|
|
|
|
#include "AndroidLicenseDialog.h"
|
|
#include "Interfaces/IMainFrameModule.h"
|
|
#include "Framework/Application/SlateApplication.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "AndroidRuntimeSettings"
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// FAndroidTargetSettingsCustomization
|
|
namespace FAndroidTargetSettingsCustomizationConstants
|
|
{
|
|
const FText DisabledTip = LOCTEXT("GitHubSourceRequiredToolTip", "This requires GitHub source.");
|
|
}
|
|
|
|
TSharedRef<IDetailCustomization> FAndroidTargetSettingsCustomization::MakeInstance()
|
|
{
|
|
return MakeShareable(new FAndroidTargetSettingsCustomization);
|
|
}
|
|
|
|
FAndroidTargetSettingsCustomization::FAndroidTargetSettingsCustomization()
|
|
: LastLicenseChecktime(-1.0)
|
|
, AndroidRelativePath(TEXT(""))
|
|
, EngineAndroidPath(FPaths::EngineDir() + TEXT("Build/Android/Java"))
|
|
, GameAndroidPath(FPaths::ProjectDir() + TEXT("Build/Android"))
|
|
, EngineGooglePlayAppIDPath(EngineAndroidPath / TEXT("res") / TEXT("values") / TEXT("GooglePlayAppID.xml"))
|
|
, GameGooglePlayAppIDPath(GameAndroidPath / TEXT("res") / TEXT("values") / TEXT("GooglePlayAppID.xml"))
|
|
, EngineProguardPath(EngineAndroidPath / TEXT("proguard-project.txt"))
|
|
, GameProguardPath(GameAndroidPath / TEXT("proguard-project.txt"))
|
|
, EngineProjectPropertiesPath(EngineAndroidPath / TEXT("project.properties"))
|
|
, GameProjectPropertiesPath(GameAndroidPath / TEXT("project.properties"))
|
|
{
|
|
new (IconNames) FPlatformIconInfo(TEXT("res/drawable/icon.png"), LOCTEXT("SettingsIcon", "Icon"), FText::GetEmpty(), 48, 48, FPlatformIconInfo::Required);
|
|
new (IconNames) FPlatformIconInfo(TEXT("res/drawable-ldpi/icon.png"), LOCTEXT("SettingsIcon_LDPI", "LDPI Icon"), FText::GetEmpty(), 36, 36, FPlatformIconInfo::Required);
|
|
new (IconNames) FPlatformIconInfo(TEXT("res/drawable-mdpi/icon.png"), LOCTEXT("SettingsIcon_MDPI", "MDPI Icon"), FText::GetEmpty(), 48, 48, FPlatformIconInfo::Required);
|
|
new (IconNames) FPlatformIconInfo(TEXT("res/drawable-hdpi/icon.png"), LOCTEXT("SettingsIcon_HDPI", "HDPI Icon"), FText::GetEmpty(), 72, 72, FPlatformIconInfo::Required);
|
|
new (IconNames) FPlatformIconInfo(TEXT("res/drawable-xhdpi/icon.png"), LOCTEXT("SettingsIcon_XHDPI", "XHDPI Icon"), FText::GetEmpty(), 96, 96, FPlatformIconInfo::Required);
|
|
|
|
new (LaunchImageNames)FPlatformIconInfo(TEXT("res/drawable/downloadimagev.png"), LOCTEXT("SettingsIcon_DownloadImageV", "Download Background Vertical Image"), FText::GetEmpty(), 720, 1280, FPlatformIconInfo::Required);
|
|
new (LaunchImageNames)FPlatformIconInfo(TEXT("res/drawable/downloadimageh.png"), LOCTEXT("SettingsIcon_DownloadImageH", "Download Background Horizontal Image"), FText::GetEmpty(), 1280, 720, FPlatformIconInfo::Required);
|
|
new (LaunchImageNames)FPlatformIconInfo(TEXT("res/drawable/splashscreen_portrait.png"), LOCTEXT("LaunchImage_Portrait", "Launch Portrait"), FText::GetEmpty(), 360, 640, FPlatformIconInfo::Required);
|
|
new (LaunchImageNames)FPlatformIconInfo(TEXT("res/drawable/splashscreen_landscape.png"), LOCTEXT("LaunchImage_Landscape", "Launch Landscape"), FText::GetEmpty(), 640, 360, FPlatformIconInfo::Required);
|
|
|
|
new (DaydreamAppTileImageNames) FPlatformIconInfo(TEXT("res/drawable-nodpi/vr_icon.png"), LOCTEXT("AppTile_Icon", "App Tile Icon"), FText::GetEmpty(), 512, 512, FPlatformIconInfo::Optional);
|
|
new (DaydreamAppTileImageNames) FPlatformIconInfo(TEXT("res/drawable-nodpi/vr_icon_background.png"), LOCTEXT("AppTile_Icon_Background", "App Tile Icon Background"), FText::GetEmpty(), 512, 512, FPlatformIconInfo::Optional);
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailLayout)
|
|
{
|
|
SavedLayoutBuilder = &DetailLayout;
|
|
|
|
BuildAppManifestSection(DetailLayout);
|
|
BuildIconSection(DetailLayout);
|
|
BuildLaunchImageSection(DetailLayout);
|
|
BuildDaydreamAppTileImageSection(DetailLayout);
|
|
BuildGraphicsDebuggerSection(DetailLayout);
|
|
}
|
|
|
|
static void OnBrowserLinkClicked(const FSlateHyperlinkRun::FMetadata& Metadata)
|
|
{
|
|
const FString* URL = Metadata.Find(TEXT("href"));
|
|
|
|
if(URL)
|
|
{
|
|
FPlatformProcess::LaunchURL(**URL, nullptr, nullptr);
|
|
}
|
|
}
|
|
|
|
|
|
void FAndroidTargetSettingsCustomization::BuildAppManifestSection(IDetailLayoutBuilder& DetailLayout)
|
|
{
|
|
// Cache some categories
|
|
IDetailCategoryBuilder& APKPackagingCategory = DetailLayout.EditCategory(TEXT("APKPackaging"));
|
|
IDetailCategoryBuilder& BuildCategory = DetailLayout.EditCategory(TEXT("Build"));
|
|
IDetailCategoryBuilder& AdvancedBuildCategory = DetailLayout.EditCategory(TEXT("AdvancedBuild"));
|
|
AdvancedBuildCategory.InitiallyCollapsed(true);
|
|
|
|
IDetailCategoryBuilder& SigningCategory = DetailLayout.EditCategory(TEXT("DistributionSigning"));
|
|
|
|
TSharedRef<SPlatformSetupMessage> PlatformSetupMessage = SNew(SPlatformSetupMessage, GameProjectPropertiesPath)
|
|
.PlatformName(LOCTEXT("AndroidPlatformName", "Android"))
|
|
.OnSetupClicked(this, &FAndroidTargetSettingsCustomization::CopySetupFilesIntoProject);
|
|
|
|
SetupForPlatformAttribute = PlatformSetupMessage->GetReadyToGoAttribute();
|
|
|
|
APKPackagingCategory.AddCustomRow(LOCTEXT("Warning", "Warning"), false)
|
|
.WholeRowWidget
|
|
[
|
|
PlatformSetupMessage
|
|
];
|
|
|
|
APKPackagingCategory.AddCustomRow(LOCTEXT("UpgradeInfo", "Upgrade Info"), false)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBorder)
|
|
.Padding(1)
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+ SHorizontalBox::Slot()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
.FillWidth(1.0f)
|
|
[
|
|
SNew(SRichTextBlock)
|
|
.Text(LOCTEXT("UpgradeInfoMessage", "<RichTextBlock.TextHighlight>Note to users from 4.6 or earlier</>: We now <RichTextBlock.TextHighlight>GENERATE</> an AndroidManifest.xml when building, so if you have customized your .xml file, you will need to put all of your changes into the below settings. Note that we don't touch your AndroidManifest.xml that is in your project directory.\nAdditionally, we no longer use SigningConfig.xml, the settings are now set in the Distribution Signing section."))
|
|
.TextStyle(FEditorStyle::Get(), "MessageLog")
|
|
.DecoratorStyleSet(&FEditorStyle::Get())
|
|
.AutoWrapText(true)
|
|
+ SRichTextBlock::HyperlinkDecorator(TEXT("browser"), FSlateHyperlinkRun::FOnClick::CreateStatic(&OnBrowserLinkClicked))
|
|
]
|
|
]
|
|
];
|
|
|
|
APKPackagingCategory.AddCustomRow(LOCTEXT("AndroidSDKLicenses", "Android SDK Licenses"), false)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+ SHorizontalBox::Slot()
|
|
.Padding(FMargin(0, 5, 5, 5))
|
|
.AutoWidth()
|
|
[
|
|
SNew(SButton)
|
|
.HAlign(HAlign_Center)
|
|
.VAlign(VAlign_Center)
|
|
.OnClicked(this, &FAndroidTargetSettingsCustomization::OnAcceptSDKLicenseClicked)
|
|
.IsEnabled(this, &FAndroidTargetSettingsCustomization::IsLicenseInvalid)
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(LOCTEXT("AcceptSDKLicense", "Accept SDK License"))
|
|
]
|
|
]
|
|
];
|
|
|
|
APKPackagingCategory.AddCustomRow(LOCTEXT("BuildFolderLabel", "Build Folder"), false)
|
|
.IsEnabled(SetupForPlatformAttribute)
|
|
.NameContent()
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+ SHorizontalBox::Slot()
|
|
.Padding(FMargin(0, 1, 0, 1))
|
|
.FillWidth(1.0f)
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(LOCTEXT("BuildFolderLabel", "Build Folder"))
|
|
.Font(DetailLayout.GetDetailFont())
|
|
]
|
|
]
|
|
.ValueContent()
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+SHorizontalBox::Slot()
|
|
.AutoWidth()
|
|
[
|
|
SNew(SButton)
|
|
.Text(LOCTEXT("OpenBuildFolderButton", "Open Build Folder"))
|
|
.ToolTipText(LOCTEXT("OpenManifestFolderButton_Tooltip", "Opens the folder containing the build files in Explorer or Finder (it's recommended you check these in to source control to share with your team)"))
|
|
.OnClicked(this, &FAndroidTargetSettingsCustomization::OpenBuildFolder)
|
|
]
|
|
];
|
|
|
|
// Signing category
|
|
SigningCategory.AddCustomRow(LOCTEXT("SigningHyperlink", "Signing Hyperlink"), false)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBox)
|
|
.HAlign(HAlign_Center)
|
|
[
|
|
SNew(SHyperlinkLaunchURL, TEXT("http://developer.android.com/tools/publishing/app-signing.html#releasemode"))
|
|
.Text(LOCTEXT("AndroidDeveloperSigningPage", "Android Developer page on Signing for Distribution"))
|
|
.ToolTipText(LOCTEXT("AndroidDeveloperSigningPageTooltip", "Opens a page that discusses the signing using keytool"))
|
|
]
|
|
];
|
|
|
|
// Google Play category
|
|
IDetailCategoryBuilder& GooglePlayCategory = DetailLayout.EditCategory(TEXT("GooglePlayServices"));
|
|
|
|
TSharedRef<SPlatformSetupMessage> GooglePlaySetupMessage = SNew(SPlatformSetupMessage, GameGooglePlayAppIDPath)
|
|
.PlatformName(LOCTEXT("GooglePlayPlatformName", "Google Play services"))
|
|
.OnSetupClicked(this, &FAndroidTargetSettingsCustomization::CopyGooglePlayAppIDFileIntoProject);
|
|
|
|
SetupForGooglePlayAttribute = GooglePlaySetupMessage->GetReadyToGoAttribute();
|
|
|
|
GooglePlayCategory.AddCustomRow(LOCTEXT("Warning", "Warning"), false)
|
|
.WholeRowWidget
|
|
[
|
|
GooglePlaySetupMessage
|
|
];
|
|
|
|
GooglePlayCategory.AddCustomRow(LOCTEXT("AppIDHyperlink", "App ID Hyperlink"), false)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBox)
|
|
.HAlign(HAlign_Center)
|
|
[
|
|
SNew(SHyperlinkLaunchURL, TEXT("http://developer.android.com/google/index.html"))
|
|
.Text(LOCTEXT("GooglePlayDeveloperPage", "Android Developer Page on Google Play services"))
|
|
.ToolTipText(LOCTEXT("GooglePlayDeveloperPageTooltip", "Opens a page that discusses Google Play services"))
|
|
]
|
|
];
|
|
|
|
TSharedRef<IPropertyHandle> EnabledProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, bEnableGooglePlaySupport));
|
|
GooglePlayCategory.AddProperty(EnabledProperty)
|
|
.EditCondition(SetupForGooglePlayAttribute, NULL);
|
|
|
|
TSharedRef<IPropertyHandle> AppIDProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, GamesAppID));
|
|
AppIDProperty->SetOnPropertyValueChanged(FSimpleDelegate::CreateRaw(this, &FAndroidTargetSettingsCustomization::OnAppIDModified));
|
|
GooglePlayCategory.AddProperty(AppIDProperty)
|
|
.EditCondition(SetupForGooglePlayAttribute, NULL);
|
|
|
|
TSharedRef<IPropertyHandle> AdMobAdUnitIDProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, AdMobAdUnitID));
|
|
AdMobAdUnitIDProperty->MarkHiddenByCustomization();
|
|
|
|
TSharedRef<IPropertyHandle> AdMobAdUnitIDsProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, AdMobAdUnitIDs));
|
|
GooglePlayCategory.AddProperty(AdMobAdUnitIDsProperty)
|
|
.EditCondition(SetupForGooglePlayAttribute, NULL);
|
|
|
|
TSharedRef<IPropertyHandle> GooglePlayLicenseKeyProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, GooglePlayLicenseKey));
|
|
GooglePlayCategory.AddProperty(GooglePlayLicenseKeyProperty)
|
|
.EditCondition(SetupForGooglePlayAttribute, NULL);
|
|
|
|
#define SETUP_ANDROIDARCH_PROP(ArchFragment, PropName, Category, Tip) \
|
|
{ \
|
|
TSharedRef<IPropertyHandle> PropertyHandle = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, PropName)); \
|
|
Category.AddProperty(PropertyHandle) \
|
|
.IsEnabled(FInstalledPlatformInfo::Get().IsValidPlatformArchitecture(TEXT("Android"), ArchFragment)) \
|
|
.ToolTip(FInstalledPlatformInfo::Get().IsValidPlatformArchitecture(TEXT("Android"), ArchFragment) ? Tip : FAndroidTargetSettingsCustomizationConstants::DisabledTip); \
|
|
}
|
|
|
|
#define SETUP_SOURCEONLY_PROP(PropName, Category, Tip) \
|
|
{ \
|
|
TSharedRef<IPropertyHandle> PropertyHandle = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, PropName)); \
|
|
Category.AddProperty(PropertyHandle) \
|
|
.IsEnabled(FEngineBuildSettings::IsSourceDistribution()) \
|
|
.ToolTip(FEngineBuildSettings::IsSourceDistribution() ? Tip : FAndroidTargetSettingsCustomizationConstants::DisabledTip); \
|
|
}
|
|
SETUP_ANDROIDARCH_PROP(TEXT("-armv7"), bBuildForArmV7, BuildCategory, LOCTEXT("BuildForArmV7ToolTip", "Enable ArmV7 CPU architecture support? (this will be used if all CPU architecture types are unchecked)"));
|
|
SETUP_ANDROIDARCH_PROP(TEXT("-arm64"), bBuildForArm64, BuildCategory, LOCTEXT("BuildForArm64ToolTip", "Enable Arm64 CPU architecture support? (use at least NDK r11c, requires Lollipop (android-21) minimum)"));
|
|
SETUP_ANDROIDARCH_PROP(TEXT("-x86"), bBuildForX86, BuildCategory, LOCTEXT("BuildForX86ToolTip", "Enable X86 CPU architecture support?"));
|
|
SETUP_ANDROIDARCH_PROP(TEXT("-x64"), bBuildForX8664, BuildCategory, LOCTEXT("BuildForX8664ToolTip", "Enable X86-64 CPU architecture support?"));
|
|
SETUP_ANDROIDARCH_PROP(TEXT("-es2"), bBuildForES2, BuildCategory, LOCTEXT("BuildForES2ToolTip", "Enable OpenGL ES2 rendering support? (this will be used if rendering types are unchecked)"));
|
|
SETUP_ANDROIDARCH_PROP(TEXT("-esdeferred"), bBuildForESDeferred, BuildCategory, LOCTEXT("BuildForESDeferredToolTip", "Enable the Deferred Shading Renderer using OpenGL ES 3.1+AEP (Android Extension Pack)? This setting is not recommended for general use and is supported only on Nvidia K1 and X1 devices."));
|
|
|
|
// @todo android fat binary: Put back in when we expose those
|
|
// SETUP_SOURCEONLY_PROP(bSplitIntoSeparateApks, BuildCategory, LOCTEXT("SplitIntoSeparateAPKsToolTip", "If checked, CPU architectures and rendering types will be split into separate .apk files"));
|
|
|
|
// check for Gradle change
|
|
TSharedRef<IPropertyHandle> EnableGradleProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, bEnableGradle));
|
|
FSimpleDelegate EnableGradleChange = FSimpleDelegate::CreateSP(this, &FAndroidTargetSettingsCustomization::OnEnableGradleChange);
|
|
EnableGradleProperty->SetOnPropertyValueChanged(EnableGradleChange);
|
|
}
|
|
|
|
bool FAndroidTargetSettingsCustomization::IsLicenseInvalid() const
|
|
{
|
|
static bool bInvalid = true;
|
|
|
|
// only check every 30 seconds after first time
|
|
double CurrentTime = FApp::GetCurrentTime();
|
|
if (LastLicenseChecktime < 0.0 || CurrentTime - LastLicenseChecktime >= 30.0)
|
|
{
|
|
const_cast<FAndroidTargetSettingsCustomization *>(this)->LastLicenseChecktime = CurrentTime;
|
|
|
|
TSharedPtr<SAndroidLicenseDialog> LicenseDialog = SNew(SAndroidLicenseDialog);
|
|
bInvalid = !LicenseDialog->HasLicense();
|
|
}
|
|
|
|
return bInvalid;
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::OnLicenseAccepted()
|
|
{
|
|
LastLicenseChecktime = -1.0;
|
|
}
|
|
|
|
FReply FAndroidTargetSettingsCustomization::OnAcceptSDKLicenseClicked()
|
|
{
|
|
// only show if don't have a valid license
|
|
TSharedPtr<SAndroidLicenseDialog> LicenseDialog = SNew(SAndroidLicenseDialog);
|
|
if (!LicenseDialog->HasLicense())
|
|
{
|
|
FSimpleDelegate LicenseAcceptedCallback = FSimpleDelegate::CreateSP(this, &FAndroidTargetSettingsCustomization::OnLicenseAccepted);
|
|
LicenseDialog->SetLicenseAcceptedCallback(LicenseAcceptedCallback);
|
|
|
|
const FText AndroidLicenseWindowTitle = LOCTEXT("AndroidLicenseUnrealEditor", "Android SDK License");
|
|
|
|
TSharedPtr<SWindow> AndroidLicenseWindow =
|
|
SNew(SWindow)
|
|
.Title(AndroidLicenseWindowTitle)
|
|
.ClientSize(FVector2D(600.f, 700.f))
|
|
.SupportsMaximize(false)
|
|
.SupportsMinimize(false)
|
|
.SizingRule(ESizingRule::FixedSize)
|
|
[
|
|
LicenseDialog.ToSharedRef()
|
|
];
|
|
|
|
IMainFrameModule& MainFrame = FModuleManager::LoadModuleChecked<IMainFrameModule>("MainFrame");
|
|
TSharedPtr<SWindow> ParentWindow = MainFrame.GetParentWindow();
|
|
|
|
if (ParentWindow.IsValid())
|
|
{
|
|
FSlateApplication::Get().AddModalWindow(AndroidLicenseWindow.ToSharedRef(), ParentWindow.ToSharedRef());
|
|
}
|
|
else
|
|
{
|
|
FSlateApplication::Get().AddWindow(AndroidLicenseWindow.ToSharedRef());
|
|
}
|
|
}
|
|
|
|
LastLicenseChecktime = -1.0;
|
|
|
|
return FReply::Handled();
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::OnEnableGradleChange()
|
|
{
|
|
// only need to do this if enabling
|
|
if (!GetDefault<UAndroidRuntimeSettings>()->bEnableGradle)
|
|
{
|
|
return;
|
|
}
|
|
|
|
// only show if don't have a valid license
|
|
TSharedPtr<SAndroidLicenseDialog> LicenseDialog = SNew(SAndroidLicenseDialog);
|
|
if (!LicenseDialog->HasLicense())
|
|
{
|
|
FSimpleDelegate LicenseAcceptedCallback = FSimpleDelegate::CreateSP(this, &FAndroidTargetSettingsCustomization::OnLicenseAccepted);
|
|
LicenseDialog->SetLicenseAcceptedCallback(LicenseAcceptedCallback);
|
|
|
|
const FText AndroidLicenseWindowTitle = LOCTEXT("AndroidLicenseUnrealEditor", "Android SDK License");
|
|
|
|
TSharedPtr<SWindow> AndroidLicenseWindow =
|
|
SNew(SWindow)
|
|
.Title(AndroidLicenseWindowTitle)
|
|
.ClientSize(FVector2D(600.f, 700.f))
|
|
.HasCloseButton(false)
|
|
.SupportsMaximize(false)
|
|
.SupportsMinimize(false)
|
|
.SizingRule(ESizingRule::FixedSize)
|
|
[
|
|
LicenseDialog.ToSharedRef()
|
|
];
|
|
|
|
IMainFrameModule& MainFrame = FModuleManager::LoadModuleChecked<IMainFrameModule>("MainFrame");
|
|
TSharedPtr<SWindow> ParentWindow = MainFrame.GetParentWindow();
|
|
|
|
if (ParentWindow.IsValid())
|
|
{
|
|
FSlateApplication::Get().AddModalWindow(AndroidLicenseWindow.ToSharedRef(), ParentWindow.ToSharedRef());
|
|
}
|
|
else
|
|
{
|
|
FSlateApplication::Get().AddWindow(AndroidLicenseWindow.ToSharedRef());
|
|
}
|
|
}
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::BuildIconSection(IDetailLayoutBuilder& DetailLayout)
|
|
{
|
|
// Icon category
|
|
IDetailCategoryBuilder& IconCategory = DetailLayout.EditCategory(TEXT("Icons"));
|
|
|
|
IconCategory.AddCustomRow(LOCTEXT("IconsHyperlink", "Icons Hyperlink"), false)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBox)
|
|
.HAlign(HAlign_Center)
|
|
[
|
|
SNew(SHyperlinkLaunchURL, TEXT("http://developer.android.com/design/style/iconography.html"))
|
|
.Text(LOCTEXT("AndroidDeveloperIconographyPage", "Android Developer Page on Iconography"))
|
|
.ToolTipText(LOCTEXT("AndroidDeveloperIconographyPageTooltip", "Opens a page on Android Iconography"))
|
|
]
|
|
];
|
|
|
|
for (const FPlatformIconInfo& Info : IconNames)
|
|
{
|
|
const FString AutomaticImagePath = EngineAndroidPath / Info.IconPath;
|
|
const FString TargetImagePath = GameAndroidPath / Info.IconPath;
|
|
|
|
IconCategory.AddCustomRow(Info.IconName)
|
|
.NameContent()
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+SHorizontalBox::Slot()
|
|
.Padding( FMargin( 0, 1, 0, 1 ) )
|
|
.FillWidth(1.0f)
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(Info.IconName)
|
|
.Font(DetailLayout.GetDetailFont())
|
|
]
|
|
]
|
|
.ValueContent()
|
|
.MaxDesiredWidth(400.0f)
|
|
.MinDesiredWidth(100.0f)
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+SHorizontalBox::Slot()
|
|
.FillWidth(1.0f)
|
|
.VAlign(VAlign_Center)
|
|
[
|
|
SNew(SExternalImageReference, AutomaticImagePath, TargetImagePath)
|
|
.FileDescription(Info.IconDescription)
|
|
.RequiredSize(Info.IconRequiredSize)
|
|
.MaxDisplaySize(FVector2D(FMath::Min(96, Info.IconRequiredSize.X), FMath::Min(96, Info.IconRequiredSize.Y)))
|
|
]
|
|
];
|
|
}
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::BuildLaunchImageSection(IDetailLayoutBuilder& DetailLayout)
|
|
{
|
|
// Add the launch images
|
|
IDetailCategoryBuilder& LaunchImageCategory = DetailLayout.EditCategory(TEXT("LaunchImages"));
|
|
LaunchImageCategory.AddCustomRow(LOCTEXT("LaunchImageInfo", "Launch Image Info"), false)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBorder)
|
|
.Padding(1)
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+ SHorizontalBox::Slot()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
.FillWidth(1.0f)
|
|
[
|
|
SNew(SRichTextBlock)
|
|
.Text(LOCTEXT("LaunchImageInfoMessage", "The <RichTextBlock.TextHighlight>Download Background</> image is used as the background for OBB downloading. The <RichTextBlock.TextHighlight>Launch Portrait</> image is used as a splash screen for applications with Portrait, Reverse Portrait, Sensor Portrait, Sensor, or Full Sensor orientation. The <RichTextBlock.TextHighlight>Launch Landscape</> image is used as a splash screen for applications with Landscape, Sensor Landscape, Reverse Landscape, Sensor, or Full Sensor orientation.\n\nThe launch images will be scaled to fit the device in the active orientation. Additional optional launch images may be provided as overrides for LDPI, MDPI, HDPI, and XHDPI by placing them in the project's corresponding Build/Android/res/drawable-* directory."))
|
|
.TextStyle(FEditorStyle::Get(), "MessageLog")
|
|
.DecoratorStyleSet(&FEditorStyle::Get())
|
|
.AutoWrapText(true)
|
|
+ SRichTextBlock::HyperlinkDecorator(TEXT("browser"), FSlateHyperlinkRun::FOnClick::CreateStatic(&OnBrowserLinkClicked))
|
|
]
|
|
]
|
|
];
|
|
|
|
const FVector2D LaunchImageMaxSize(150.0f, 150.0f);
|
|
|
|
for (const FPlatformIconInfo& Info : LaunchImageNames)
|
|
{
|
|
const FString AutomaticImagePath = EngineAndroidPath / Info.IconPath;
|
|
const FString TargetImagePath = GameAndroidPath / Info.IconPath;
|
|
|
|
LaunchImageCategory.AddCustomRow(Info.IconName)
|
|
.NameContent()
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+ SHorizontalBox::Slot()
|
|
.Padding(FMargin(0, 1, 0, 1))
|
|
.FillWidth(1.0f)
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(Info.IconName)
|
|
.Font(DetailLayout.GetDetailFont())
|
|
]
|
|
]
|
|
.ValueContent()
|
|
.MaxDesiredWidth(400.0f)
|
|
.MinDesiredWidth(100.0f)
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+ SHorizontalBox::Slot()
|
|
.FillWidth(1.0f)
|
|
.VAlign(VAlign_Center)
|
|
[
|
|
SNew(SExternalImageReference, AutomaticImagePath, TargetImagePath)
|
|
.FileDescription(Info.IconDescription)
|
|
// .RequiredSize(Info.IconRequiredSize)
|
|
.MaxDisplaySize(LaunchImageMaxSize)
|
|
]
|
|
];
|
|
}
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::BuildDaydreamAppTileImageSection(IDetailLayoutBuilder& DetailLayout)
|
|
{
|
|
// Daydream App Tile Category
|
|
IDetailCategoryBuilder& DaydreamAppTileCategory = DetailLayout.EditCategory(TEXT("DaydreamAppTile"));
|
|
|
|
for (const FPlatformIconInfo& Info : DaydreamAppTileImageNames)
|
|
{
|
|
const FString AutomaticImagePath = EngineAndroidPath / Info.IconPath;
|
|
const FString TargetImagePath = GameAndroidPath / Info.IconPath;
|
|
|
|
DaydreamAppTileCategory.AddCustomRow(Info.IconName)
|
|
.NameContent()
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+SHorizontalBox::Slot()
|
|
.Padding( FMargin( 0, 1, 0, 1 ) )
|
|
.FillWidth(1.0f)
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(Info.IconName)
|
|
.Font(DetailLayout.GetDetailFont())
|
|
]
|
|
]
|
|
.ValueContent()
|
|
.MaxDesiredWidth(400.0f)
|
|
.MinDesiredWidth(100.0f)
|
|
[
|
|
SNew(SHorizontalBox)
|
|
+SHorizontalBox::Slot()
|
|
.FillWidth(1.0f)
|
|
.VAlign(VAlign_Center)
|
|
[
|
|
SNew(SExternalImageReference, AutomaticImagePath, TargetImagePath)
|
|
.FileDescription(Info.IconDescription)
|
|
.RequiredSize(Info.IconRequiredSize)
|
|
.MaxDisplaySize(FVector2D(FMath::Min(96, Info.IconRequiredSize.X), FMath::Min(96, Info.IconRequiredSize.Y)))
|
|
]
|
|
];
|
|
}
|
|
}
|
|
|
|
FReply FAndroidTargetSettingsCustomization::OpenBuildFolder()
|
|
{
|
|
const FString BuildFolder = FPaths::ConvertRelativePathToFull(FPaths::GetPath(GameProjectPropertiesPath));
|
|
FPlatformProcess::ExploreFolder(*BuildFolder);
|
|
|
|
return FReply::Handled();
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::CopySetupFilesIntoProject()
|
|
{
|
|
// First copy the manifest, it must get copied
|
|
FText ErrorMessage;
|
|
if (!SourceControlHelpers::CopyFileUnderSourceControl(GameProjectPropertiesPath, EngineProjectPropertiesPath, LOCTEXT("ProjectProperties", "Project Properties"), /*out*/ ErrorMessage))
|
|
{
|
|
FNotificationInfo Info(ErrorMessage);
|
|
Info.ExpireDuration = 3.0f;
|
|
FSlateNotificationManager::Get().AddNotification(Info);
|
|
}
|
|
else
|
|
{
|
|
// Now try to copy all of the icons, etc... (these can be ignored if the file already exists)
|
|
for (const FPlatformIconInfo& Info : IconNames)
|
|
{
|
|
const FString EngineImagePath = EngineAndroidPath / Info.IconPath;
|
|
const FString ProjectImagePath = GameAndroidPath / Info.IconPath;
|
|
|
|
if (!FPaths::FileExists(ProjectImagePath))
|
|
{
|
|
SourceControlHelpers::CopyFileUnderSourceControl(ProjectImagePath, EngineImagePath, Info.IconName, /*out*/ ErrorMessage);
|
|
}
|
|
}
|
|
|
|
// Now try to copy all of the launch images... (these can be ignored if the file already exists)
|
|
for (const FPlatformIconInfo& Info : LaunchImageNames)
|
|
{
|
|
const FString EngineImagePath = EngineAndroidPath / Info.IconPath;
|
|
const FString ProjectImagePath = GameAndroidPath / Info.IconPath;
|
|
|
|
if (!FPaths::FileExists(ProjectImagePath))
|
|
{
|
|
SourceControlHelpers::CopyFileUnderSourceControl(ProjectImagePath, EngineImagePath, Info.IconName, /*out*/ ErrorMessage);
|
|
}
|
|
}
|
|
|
|
// Now try to copy all of the launch images... (these can be ignored if the file already exists)
|
|
for (const FPlatformIconInfo& Info : DaydreamAppTileImageNames)
|
|
{
|
|
const FString EngineImagePath = EngineAndroidPath / Info.IconPath;
|
|
const FString ProjectImagePath = GameAndroidPath / Info.IconPath;
|
|
|
|
if (!FPaths::FileExists(ProjectImagePath))
|
|
{
|
|
SourceControlHelpers::CopyFileUnderSourceControl(ProjectImagePath, EngineImagePath, Info.IconName, /*out*/ ErrorMessage);
|
|
}
|
|
}
|
|
|
|
// and copy the other files (aren't required)
|
|
//SourceControlHelpers::CopyFileUnderSourceControl(GameProguardPath, EngineProguardPath, LOCTEXT("Proguard", "Proguard Settings"), /*out*/ ErrorMessage);
|
|
}
|
|
|
|
SavedLayoutBuilder->ForceRefreshDetails();
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::CopyGooglePlayAppIDFileIntoProject()
|
|
{
|
|
FText ErrorMessage;
|
|
if (!SourceControlHelpers::CopyFileUnderSourceControl(GameGooglePlayAppIDPath, EngineGooglePlayAppIDPath, LOCTEXT("GooglePlayAppID", "GooglePlayAppID.xml"), /*out*/ ErrorMessage))
|
|
{
|
|
FNotificationInfo Info(ErrorMessage);
|
|
Info.ExpireDuration = 3.0f;
|
|
FSlateNotificationManager::Get().AddNotification(Info);
|
|
}
|
|
|
|
SavedLayoutBuilder->ForceRefreshDetails();
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::OnAppIDModified()
|
|
{
|
|
const FString NewIDString = GetDefault<UAndroidRuntimeSettings>()->GamesAppID;
|
|
|
|
if (NewIDString.Len() > 0 && !FCString::IsNumeric(*NewIDString))
|
|
{
|
|
FNotificationInfo Info(LOCTEXT("InvalidGamesAppID", "The Games App ID you provided is invalid"));
|
|
Info.ExpireDuration = 3.0f;
|
|
FSlateNotificationManager::Get().AddNotification(Info);
|
|
|
|
return;
|
|
}
|
|
|
|
if (FPaths::FileExists(GameGooglePlayAppIDPath))
|
|
{
|
|
FManifestUpdateHelper Updater(GameGooglePlayAppIDPath);
|
|
|
|
const FString AppIDTag(TEXT("name=\"app_id\">"));
|
|
const FString ClosingTag(TEXT("</string>"));
|
|
Updater.ReplaceKey(AppIDTag, ClosingTag, NewIDString);
|
|
|
|
Updater.Finalize(GameGooglePlayAppIDPath);
|
|
}
|
|
}
|
|
|
|
static EVisibility GraphicsDebuggerSettingsVisibility(EAndroidGraphicsDebugger::Type DebuggerType, TSharedPtr<IPropertyHandle> AndroidGraphicsDebuggerProperty)
|
|
{
|
|
uint8 ValueAsByte = 0;
|
|
FPropertyAccess::Result Result = AndroidGraphicsDebuggerProperty->GetValue(ValueAsByte);
|
|
if (Result == FPropertyAccess::Success && ValueAsByte == static_cast<uint8>(DebuggerType))
|
|
{
|
|
return EVisibility::Visible;
|
|
}
|
|
|
|
return EVisibility::Hidden;
|
|
}
|
|
|
|
static FText GetMaliGraphicsDebuggerHelpText()
|
|
{
|
|
const static FText InstallText(LOCTEXT("MGDInstallText", "Run the following command from a host command line from the target/unrooted directory located in the installation directory of the MGD tool, to install the MGD Daemon application on your device."));
|
|
const static FString InstallCommand(TEXT("adb install -r MGD.apk"));
|
|
const static FText RunText1(LOCTEXT("MGDIRunText1", "Run the following command from your host to establish a tunnel between your PC and the MGD Daemon. This needs to be done each time you connect your device by USB."));
|
|
const static FString RunCommand(TEXT("adb forward tcp:5002 tcp:5002"));
|
|
const static FText RunText2(LOCTEXT("MGDIRunText2", "Next, ensure you are running the daemon. Run the MGD Daemon application and switch it to the \"ON\" state"));
|
|
|
|
FFormatOrderedArguments Args;
|
|
Args.Add(InstallText);
|
|
Args.Add(FText::FromString(InstallCommand));
|
|
Args.Add(RunText1);
|
|
Args.Add(FText::FromString(RunCommand));
|
|
Args.Add(RunText2);
|
|
|
|
return FText::Format(LOCTEXT("MaliGraphicsDebuggerHelpText","<RichTextBlock.TextHighlight>Installation</>\n{0}\n{1}\n\n<RichTextBlock.TextHighlight>Run</>\n{2}\n{3}\n{4}"),
|
|
Args);
|
|
}
|
|
|
|
static FText GetAdrenoProfilerHelpText()
|
|
{
|
|
const static FText RunText(LOCTEXT("AdrenoRunText", "Before profiling, and after rebooting your Android device, you must enable debug mode by setting the following property from the command line:"));
|
|
const static FString RunCommand(TEXT("adb shell setprop debug.egl.profiler 1"));
|
|
|
|
FFormatOrderedArguments Args;
|
|
Args.Add(RunText);
|
|
Args.Add(FText::FromString(RunCommand));
|
|
|
|
return FText::Format(LOCTEXT("AdrenoHelpText","{0}\n{1}"), Args);
|
|
}
|
|
|
|
static FText GetRenderDocHelpText()
|
|
{
|
|
const static FText InstallText(LOCTEXT("RDOCInstallText", "Run the following command from a host command line from the android/apk/32 directory located in the installation directory of the RenderDoc tool, to install the RenderDocCmd application on your device."));
|
|
const static FString InstallCommand(TEXT("adb install -r RenderDocCmd.apk"));
|
|
|
|
const static FText RunText0(LOCTEXT("RDOCRunText0", "Open RenderDoc on the host"));
|
|
const static FText RunText1(LOCTEXT("RDOCRunText1", "1. In Tools -> Options -> Android, set the path to your adb executable."));
|
|
const static FText RunText2(LOCTEXT("RDOCRunText2", "2. Start the Remote Server using Tools -> Start Android Remote Server."));
|
|
const static FText RunText3(LOCTEXT("RDOCRunText3", "3. Check your device screen and 'Allow' RenderDocCmd to access files on your device."));
|
|
const static FText RunText4(LOCTEXT("RDOCRunText4", "4. Change your current Replay Context to your device using the bottom left menu, which should now show your device as Online."));
|
|
const static FText RunText5(LOCTEXT("RDOCRunText5", "5. In the capture executable tab, there is a button on the right of Executable Path that lets you select an installed Android package for capture."));
|
|
const static FText RunText6(LOCTEXT("RDOCRunText6", "6. Select your package and press the Launch button in the bottom right of the tab to start the package on the device."));
|
|
const static FText RunText7(LOCTEXT("RDOCRunText7", "7. If everything went well, a new tab will open with a button to Trigger captures."));
|
|
|
|
const static FText NoteText(LOCTEXT("RDOCNoteText", "If the latest RenderDoc release does not have Android functionality, download the latest nightly build."));
|
|
|
|
FFormatOrderedArguments Args;
|
|
Args.Add(InstallText);
|
|
Args.Add(FText::FromString(InstallCommand));
|
|
Args.Add(RunText0);
|
|
Args.Add(RunText1);
|
|
Args.Add(RunText2);
|
|
Args.Add(RunText3);
|
|
Args.Add(RunText4);
|
|
Args.Add(RunText5);
|
|
Args.Add(RunText6);
|
|
Args.Add(RunText7);
|
|
Args.Add(NoteText);
|
|
|
|
return FText::Format(LOCTEXT("RDOCHelpText","<RichTextBlock.TextHighlight>Installation</>\n{0}\n{1}\n\n<RichTextBlock.TextHighlight>Run</>\n{2}\n{3}\n{4}\n{5}\n{6}\n{7}\n{8}\n{9}\n\n<RichTextBlock.TextHighlight>Note</>\n{10}"),
|
|
Args);
|
|
}
|
|
|
|
void FAndroidTargetSettingsCustomization::BuildGraphicsDebuggerSection(IDetailLayoutBuilder& DetailLayout)
|
|
{
|
|
IDetailCategoryBuilder& GraphicsDebuggerCategory = DetailLayout.EditCategory(TEXT("GraphicsDebugger"));
|
|
|
|
TSharedPtr<IPropertyHandle> AndroidGraphicsDebuggerProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, AndroidGraphicsDebugger));
|
|
GraphicsDebuggerCategory.AddProperty(AndroidGraphicsDebuggerProperty);
|
|
|
|
// Mali Graphics Debugger settings
|
|
{
|
|
TAttribute<EVisibility> MaliSettingsVisibility(
|
|
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateStatic(GraphicsDebuggerSettingsVisibility, EAndroidGraphicsDebugger::Mali, AndroidGraphicsDebuggerProperty))
|
|
);
|
|
|
|
TSharedPtr<IPropertyHandle> MaliGraphicsDebuggerPathProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, MaliGraphicsDebuggerPath));
|
|
DetailLayout.HideProperty(MaliGraphicsDebuggerPathProperty);
|
|
GraphicsDebuggerCategory.AddProperty(MaliGraphicsDebuggerPathProperty).Visibility(MaliSettingsVisibility);
|
|
|
|
FText MGDHelpText = GetMaliGraphicsDebuggerHelpText();
|
|
|
|
GraphicsDebuggerCategory.AddCustomRow(LOCTEXT("MaliGraphicsDebuggerInfo", "Mali Graphics Debugger Info"), false)
|
|
.Visibility(MaliSettingsVisibility)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBorder)
|
|
.Padding(1)
|
|
[
|
|
SNew(SVerticalBox)
|
|
+ SVerticalBox::Slot()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
.AutoHeight()
|
|
[
|
|
SNew(SRichTextBlock)
|
|
.Text(MGDHelpText)
|
|
.TextStyle(FEditorStyle::Get(), "MessageLog")
|
|
.DecoratorStyleSet(&FEditorStyle::Get())
|
|
.AutoWrapText(true)
|
|
]
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
[
|
|
SNew(SBox)
|
|
.HAlign(HAlign_Left)
|
|
[
|
|
SNew(SHyperlinkLaunchURL, TEXT("http://malideveloper.arm.com/resources/tools/mali-graphics-debugger/"))
|
|
.Text(LOCTEXT("MaliGraphicsDebuggerPage", "Mali Graphics Debugger home page"))
|
|
.ToolTipText(LOCTEXT("MaliGraphicsDebuggerPageTooltip", "Opens the Mali Graphics Debugger home page on ARM's website"))
|
|
]
|
|
]
|
|
]
|
|
];
|
|
}
|
|
// Adreno Profiler settings
|
|
{
|
|
TAttribute<EVisibility> AdrenoSettingsVisibility(
|
|
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateStatic(GraphicsDebuggerSettingsVisibility, EAndroidGraphicsDebugger::Adreno, AndroidGraphicsDebuggerProperty))
|
|
);
|
|
|
|
FText AdrenoHelpText = GetAdrenoProfilerHelpText();
|
|
|
|
GraphicsDebuggerCategory.AddCustomRow(LOCTEXT("AdrenoProfilerInfo", "Adreno Profiler Info"), false)
|
|
.Visibility(AdrenoSettingsVisibility)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBorder)
|
|
.Padding(1)
|
|
[
|
|
SNew(SVerticalBox)
|
|
+ SVerticalBox::Slot()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
.AutoHeight()
|
|
[
|
|
SNew(SRichTextBlock)
|
|
.Text(AdrenoHelpText)
|
|
.TextStyle(FEditorStyle::Get(), "MessageLog")
|
|
.DecoratorStyleSet(&FEditorStyle::Get())
|
|
.AutoWrapText(true)
|
|
]
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
[
|
|
SNew(SBox)
|
|
.HAlign(HAlign_Left)
|
|
[
|
|
SNew(SHyperlinkLaunchURL, TEXT("https://developer.qualcomm.com/software/adreno-gpu-profiler"))
|
|
.Text(LOCTEXT("AdrenoProfilerPage", "Adreno Profiler home page"))
|
|
.ToolTipText(LOCTEXT("AdrenoProfilerPageTooltip", "Opens the Adreno Profiler home page on the Qualcomm website"))
|
|
]
|
|
]
|
|
]
|
|
];
|
|
}
|
|
|
|
// RenderDoc settings
|
|
{
|
|
TAttribute<EVisibility> RenderDocSettingsVisibility(
|
|
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateStatic(GraphicsDebuggerSettingsVisibility, EAndroidGraphicsDebugger::RenderDoc, AndroidGraphicsDebuggerProperty))
|
|
);
|
|
|
|
TSharedPtr<IPropertyHandle> RenderDocPathProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UAndroidRuntimeSettings, RenderDocPath));
|
|
DetailLayout.HideProperty(RenderDocPathProperty);
|
|
GraphicsDebuggerCategory.AddProperty(RenderDocPathProperty).Visibility(RenderDocSettingsVisibility);
|
|
|
|
FText RenderDocHelpText = GetRenderDocHelpText();
|
|
|
|
GraphicsDebuggerCategory.AddCustomRow(LOCTEXT("RenderDocInfo", "RenderDoc Info"), false)
|
|
.Visibility(RenderDocSettingsVisibility)
|
|
.WholeRowWidget
|
|
[
|
|
SNew(SBorder)
|
|
.Padding(1)
|
|
[
|
|
SNew(SVerticalBox)
|
|
+ SVerticalBox::Slot()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
.AutoHeight()
|
|
[
|
|
SNew(SRichTextBlock)
|
|
.Text(RenderDocHelpText)
|
|
.TextStyle(FEditorStyle::Get(), "MessageLog")
|
|
.DecoratorStyleSet(&FEditorStyle::Get())
|
|
.AutoWrapText(true)
|
|
]
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
.Padding(FMargin(10, 10, 10, 10))
|
|
[
|
|
SNew(SBox)
|
|
.HAlign(HAlign_Left)
|
|
[
|
|
SNew(SHyperlinkLaunchURL, TEXT("https://renderdoc.org/"))
|
|
.Text(LOCTEXT("RenderDocPage", "RenderDoc home page"))
|
|
.ToolTipText(LOCTEXT("RenderDocPageTooltip", "Opens the RenderDoc home page"))
|
|
]
|
|
]
|
|
]
|
|
];
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
#undef LOCTEXT_NAMESPACE
|