2014-12-07 19:09:38 -05:00
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
2014-03-14 14:13:41 -04:00
# include "AndroidPlatformEditorPrivatePCH.h"
# include "AndroidTargetSettingsCustomization.h"
# include "DetailLayoutBuilder.h"
# include "DetailCategoryBuilder.h"
# include "PropertyEditing.h"
# include "ScopedTransaction.h"
# include "SExternalImageReference.h"
# include "SHyperlinkLaunchURL.h"
# include "SPlatformSetupMessage.h"
# include "PlatformIconInfo.h"
# include "SourceControlHelpers.h"
# include "ManifestUpdateHelper.h"
2014-10-14 22:50:06 -04:00
# include "SNotificationList.h"
# include "NotificationManager.h"
2014-03-14 14:13:41 -04:00
# define LOCTEXT_NAMESPACE "AndroidRuntimeSettings"
//////////////////////////////////////////////////////////////////////////
// FAndroidTargetSettingsCustomization
2014-12-11 13:44:41 -05:00
namespace FAndroidTargetSettingsCustomizationConstants
{
const FText DisabledTip = LOCTEXT ( " GitHubSourceRequiredToolTip " , " This requires GitHub source. " ) ;
}
2014-03-14 14:13:41 -04:00
TSharedRef < IDetailCustomization > FAndroidTargetSettingsCustomization : : MakeInstance ( )
{
return MakeShareable ( new FAndroidTargetSettingsCustomization ) ;
}
FAndroidTargetSettingsCustomization : : FAndroidTargetSettingsCustomization ( )
2014-11-06 15:24:06 -05:00
: AndroidRelativePath ( TEXT ( " " ) )
, EngineAndroidPath ( FPaths : : EngineDir ( ) + TEXT ( " Build/Android/Java " ) )
2014-03-14 14:13:41 -04:00
, GameAndroidPath ( FPaths : : GameDir ( ) + TEXT ( " Build/Android " ) )
2014-04-23 19:40:10 -04:00
, EngineGooglePlayAppIDPath ( EngineAndroidPath / TEXT ( " res " ) / TEXT ( " values " ) / TEXT ( " GooglePlayAppID.xml " ) )
, GameGooglePlayAppIDPath ( GameAndroidPath / TEXT ( " res " ) / TEXT ( " values " ) / TEXT ( " GooglePlayAppID.xml " ) )
2014-03-14 14:13:41 -04:00
, 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 ) ;
}
void FAndroidTargetSettingsCustomization : : CustomizeDetails ( IDetailLayoutBuilder & DetailLayout )
{
SavedLayoutBuilder = & DetailLayout ;
BuildAppManifestSection ( DetailLayout ) ;
BuildIconSection ( DetailLayout ) ;
}
2015-01-27 10:57:03 -05:00
static void OnBrowserLinkClicked ( const FSlateHyperlinkRun : : FMetadata & Metadata )
{
const FString * URL = Metadata . Find ( TEXT ( " href " ) ) ;
if ( URL )
{
FPlatformProcess : : LaunchURL ( * * URL , nullptr , nullptr ) ;
}
}
2014-03-14 14:13:41 -04:00
void FAndroidTargetSettingsCustomization : : BuildAppManifestSection ( IDetailLayoutBuilder & DetailLayout )
{
2014-12-11 13:44:41 -05:00
// Cache some categories
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
IDetailCategoryBuilder & APKPackagingCategory = DetailLayout . EditCategory ( TEXT ( " APKPackaging " ) ) ;
2014-12-11 13:44:41 -05:00
IDetailCategoryBuilder & BuildCategory = DetailLayout . EditCategory ( TEXT ( " Build " ) ) ;
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
IDetailCategoryBuilder & SigningCategory = DetailLayout . EditCategory ( TEXT ( " DistributionSigning " ) ) ;
2014-03-14 14:13:41 -04:00
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
TSharedRef < SPlatformSetupMessage > PlatformSetupMessage = SNew ( SPlatformSetupMessage , GameProjectPropertiesPath )
2014-03-14 14:13:41 -04:00
. PlatformName ( LOCTEXT ( " AndroidPlatformName " , " Android " ) )
. OnSetupClicked ( this , & FAndroidTargetSettingsCustomization : : CopySetupFilesIntoProject ) ;
SetupForPlatformAttribute = PlatformSetupMessage - > GetReadyToGoAttribute ( ) ;
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
APKPackagingCategory . AddCustomRow ( LOCTEXT ( " Warning " , " Warning " ) , false )
2014-03-14 14:13:41 -04:00
. WholeRowWidget
[
PlatformSetupMessage
] ;
2015-01-27 10:57:03 -05:00
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. \n Additionally, we no longer use SigningConfig.xml, the settings are now set in the Distribution Signing section. \n \n There is currently no .obb file downloader support in the engine, so if you don't package your data into your .apk (see the below setting and its tooltip about 50MB limit), device is not guaranteed to have the .obb file downloaded in all cases. Until Unreal Engine v4.8, there won't be a way for your app to download the .obb file from the Google Play Store. See <a id= \" browser \" href= \" http://developer.android.com/google/play/expansion-files.html#Downloading \" style= \" HoverOnlyHyperlink \" >http://developer.android.com/google/play/expansion-files.html</> for more information. " ) )
. TextStyle ( FEditorStyle : : Get ( ) , " MessageLog " )
. DecoratorStyleSet ( & FEditorStyle : : Get ( ) )
. AutoWrapText ( true )
+ SRichTextBlock : : HyperlinkDecorator ( TEXT ( " browser " ) , FSlateHyperlinkRun : : FOnClick : : CreateStatic ( & OnBrowserLinkClicked ) )
]
]
] ;
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
APKPackagingCategory . AddCustomRow ( LOCTEXT ( " BuildFolderLabel " , " Build Folder " ) , false )
2014-03-14 14:13:41 -04:00
. IsEnabled ( SetupForPlatformAttribute )
. NameContent ( )
[
SNew ( SHorizontalBox )
+ SHorizontalBox : : Slot ( )
. Padding ( FMargin ( 0 , 1 , 0 , 1 ) )
. FillWidth ( 1.0f )
[
SNew ( STextBlock )
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
. Text ( LOCTEXT ( " BuildFolderLabel " , " Build Folder " ) )
2014-03-14 14:13:41 -04:00
. Font ( DetailLayout . GetDetailFont ( ) )
]
]
. ValueContent ( )
[
SNew ( SHorizontalBox )
+ SHorizontalBox : : Slot ( )
. AutoWidth ( )
[
SNew ( SButton )
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
. 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 )
2014-03-14 14:13:41 -04:00
]
] ;
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
// 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 " ) )
]
] ;
2014-04-23 19:40:10 -04:00
// 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 ( ) ;
2014-12-01 11:19:41 -05:00
GooglePlayCategory . AddCustomRow ( LOCTEXT ( " Warning " , " Warning " ) , false )
2014-04-23 19:40:10 -04:00
. WholeRowWidget
[
GooglePlaySetupMessage
] ;
2014-12-01 11:19:41 -05:00
GooglePlayCategory . AddCustomRow ( LOCTEXT ( " AppIDHyperlink " , " App ID Hyperlink " ) , false )
2014-04-23 19:40:10 -04:00
. 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 ) ;
2014-04-28 12:19:40 -04:00
TSharedRef < IPropertyHandle > AdMobAdUnitIDProperty = DetailLayout . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAndroidRuntimeSettings , AdMobAdUnitID ) ) ;
GooglePlayCategory . AddProperty ( AdMobAdUnitIDProperty )
. EditCondition ( SetupForGooglePlayAttribute , NULL ) ;
2014-11-19 05:18:19 -05:00
TSharedRef < IPropertyHandle > GooglePlayLicenseKeyProperty = DetailLayout . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAndroidRuntimeSettings , GooglePlayLicenseKey ) ) ;
GooglePlayCategory . AddProperty ( GooglePlayLicenseKeyProperty )
. EditCondition ( SetupForGooglePlayAttribute , NULL ) ;
2014-12-11 13:44:41 -05:00
# define SETUP_NONROCKET_PROP(PropName, Category, Tip) \
{ \
TSharedRef < IPropertyHandle > PropertyHandle = DetailLayout . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAndroidRuntimeSettings , PropName ) ) ; \
Category . AddProperty ( PropertyHandle ) \
. IsEnabled ( ! FRocketSupport : : IsRocket ( ) ) \
. ToolTip ( ! FRocketSupport : : IsRocket ( ) ? Tip : FAndroidTargetSettingsCustomizationConstants : : DisabledTip ) ; \
}
SETUP_NONROCKET_PROP ( bBuildForArmV7 , BuildCategory , LOCTEXT ( " BuildForArmV7ToolTip " , " Enable ArmV7 CPU architecture support? (this will be used if all CPU architecture types are unchecked) " ) ) ;
SETUP_NONROCKET_PROP ( bBuildForX86 , BuildCategory , LOCTEXT ( " BuildForX86ToolTip " , " Enable X86 CPU architecture support? " ) ) ;
SETUP_NONROCKET_PROP ( bBuildForES2 , BuildCategory , LOCTEXT ( " BuildForES2ToolTip " , " Enable OpenGL ES2 rendering support? (this will be used if rendering types are unchecked) " ) ) ;
2015-04-08 16:23:03 -04:00
SETUP_NONROCKET_PROP ( bBuildForES31 , BuildCategory , LOCTEXT ( " BuildForES31ToolTip " , " Enable OpenGL ES31 + AEP (Android Extension Pack) rendering support? " ) ) ;
2015-01-27 10:57:03 -05:00
2014-12-11 13:44:41 -05:00
// @todo android fat binary: Put back in when we expose those
// SETUP_NONROCKET_PROP(bSplitIntoSeparateApks, BuildCategory, LOCTEXT("SplitIntoSeparateAPKsToolTip", "If checked, CPU architectures and rendering types will be split into separate .apk files"));
2014-03-14 14:13:41 -04:00
}
void FAndroidTargetSettingsCustomization : : BuildIconSection ( IDetailLayoutBuilder & DetailLayout )
{
// Icon category
IDetailCategoryBuilder & IconCategory = DetailLayout . EditCategory ( TEXT ( " Icons " ) ) ;
2014-12-01 11:19:41 -05:00
IconCategory . AddCustomRow ( LOCTEXT ( " IconsHyperlink " , " Icons Hyperlink " ) , false )
2014-03-14 14:13:41 -04:00
. 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 ;
2014-12-01 11:19:41 -05:00
IconCategory . AddCustomRow ( Info . IconName )
2014-03-14 14:13:41 -04:00
. 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 ( Info . IconRequiredSize ) )
]
] ;
}
}
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
FReply FAndroidTargetSettingsCustomization : : OpenBuildFolder ( )
2014-03-14 14:13:41 -04:00
{
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
const FString BuildFolder = FPaths : : ConvertRelativePathToFull ( FPaths : : GetPath ( GameProjectPropertiesPath ) ) ;
FPlatformProcess : : ExploreFolder ( * BuildFolder ) ;
2014-03-14 14:13:41 -04:00
return FReply : : Handled ( ) ;
}
void FAndroidTargetSettingsCustomization : : CopySetupFilesIntoProject ( )
{
// First copy the manifest, it must get copied
FText ErrorMessage ;
- Generate AndroidManifest.xml from ProjectSettings
- Moved some Android settings to ProjectSettings, re-enabled SDK settings
- Removed SigningConfig.xml, and moved those settings into project settings
- Added concept of NotForLicensees and NoRedist engine and project config settings
- Removed BaseInternalGame.ini, replaced with NotForLicensees/BaseGame.ini
- Moved User*.ini to end of .ini hierarchy
- Added support for CLASS_GlobalUserConfig, so their settings will be saved to <AppData>/.../User*.ini (useful for SDK paths, etc)
- Enabled AndroidPlatformEditor module on Mac
- Changed Mac Build.sh to allow for Android on the commandline (just pass through if it's not an Xcode platform name)
- Iterative Android packaging now looks at just the important .ini sections, NOT entire .ini files
#codereview jamie.dale,james.moran,michael.trepka,robert.jones,chris.babcock
[CL 2413870 by Josh Adams in Main branch]
2015-01-21 11:17:55 -05:00
if ( ! SourceControlHelpers : : CopyFileUnderSourceControl ( GameProjectPropertiesPath , EngineProjectPropertiesPath , LOCTEXT ( " ProjectProperties " , " Project Properties " ) , /*out*/ ErrorMessage ) )
2014-03-14 14:13:41 -04:00
{
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 ) ;
}
}
// and copy the other files (aren't required)
SourceControlHelpers : : CopyFileUnderSourceControl ( GameProguardPath , EngineProguardPath , LOCTEXT ( " Proguard " , " Proguard Settings " ) , /*out*/ ErrorMessage ) ;
}
SavedLayoutBuilder - > ForceRefreshDetails ( ) ;
}
2014-04-23 19:40:10 -04:00
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 ( )
{
check ( SetupForPlatformAttribute . Get ( ) = = true ) ;
FManifestUpdateHelper Updater ( GameGooglePlayAppIDPath ) ;
const FString AppIDTag ( TEXT ( " name= \" app_id \" > " ) ) ;
const FString ClosingTag ( TEXT ( " </string> " ) ) ;
const FString NewIDString = GetDefault < UAndroidRuntimeSettings > ( ) - > GamesAppID ;
Updater . ReplaceKey ( AppIDTag , ClosingTag , NewIDString ) ;
Updater . Finalize ( GameGooglePlayAppIDPath ) ;
}
2014-03-14 14:13:41 -04:00
//////////////////////////////////////////////////////////////////////////
# undef LOCTEXT_NAMESPACE