示例#1
0
        private void WriteEntitlementsFile(string OutputFilename)
        {
            // get the settings from the ini file
            // plist replacements
            ConfigCacheIni Ini        = new ConfigCacheIni(UnrealTargetPlatform.IOS, "Engine", UnrealBuildTool.GetUProjectPath());
            bool           bSupported = false;

            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bEnableCloudKitSupport", out bSupported);

            Directory.CreateDirectory(Path.GetDirectoryName(OutputFilename));
            // we need to have something so Xcode will compile, so we just set the get-task-allow, since we know the value,
            // which is based on distribution or not (true means debuggable)
            StringBuilder Text = new StringBuilder();

            Text.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            Text.AppendLine("<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
            Text.AppendLine("<plist version=\"1.0\">");
            Text.AppendLine("<dict>");
            Text.AppendLine(string.Format("\t<key>get-task-allow</key><{0}/>", /*Config.bForDistribution ? "false" : */ "true"));
            if (bSupported)
            {
                Text.AppendLine("\t<key>com.apple.developer.icloud-container-identifiers</key>");
                Text.AppendLine("\t<array>");
                Text.AppendLine("\t\t<string>iCloud.$(CFBundleIdentifier)</string>");
                Text.AppendLine("\t</array>");
                Text.AppendLine("\t<key>com.apple.developer.icloud-services</key>");
                Text.AppendLine("\t<array>");
                Text.AppendLine("\t\t<string>CloudKit</string>");
                Text.AppendLine("\t</array>");
            }
            Text.AppendLine("</dict>");
            Text.AppendLine("</plist>");
            File.WriteAllText(OutputFilename, Text.ToString());
        }
		private bool IsVulkanSupportEnabled()
		{
			ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.Android, "Engine", DirectoryReference.FromFile(ProjectFile));
			bool bSupportsVulkan = false;
			Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bSupportsVulkan", out bSupportsVulkan);

			return bSupportsVulkan;
		}
        public static bool ShouldMakeSeparateApks()
        {
            // check to see if the project wants separate apks
            ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.Android, "Engine", UnrealBuildTool.GetUProjectPath());
            bool bSeparateApks = false;
            Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bSplitIntoSeparateApks", out bSeparateApks);

            return bSeparateApks;
        }
示例#4
0
        public static bool ShouldMakeSeparateApks()
        {
            // check to see if the project wants separate apks
            ConfigCacheIni Ini           = new ConfigCacheIni(UnrealTargetPlatform.Android, "Engine", UnrealBuildTool.GetUProjectPath());
            bool           bSeparateApks = false;

            Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bSplitIntoSeparateApks", out bSeparateApks);

            return(bSeparateApks);
        }
示例#5
0
    public void UploadToS3(DeploymentContext SC)
    {
        ConfigCacheIni Ini    = ConfigCacheIni.CreateConfigCacheIni(SC.StageTargetPlatform.PlatformType, "Engine", DirectoryReference.FromFile(SC.RawProjectPath));
        bool           Upload = false;

        string KeyId      = "";
        string AccessKey  = "";
        string BucketName = "";
        string FolderName = "";

        if (Ini.GetBool("/Script/HTML5PlatformEditor.HTML5TargetSettings", "UploadToS3", out Upload))
        {
            if (!Upload)
            {
                return;
            }
        }
        else
        {
            return;
        }
        bool AmazonIdentity = Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3KeyID", out KeyId) &&
                              Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3SecretAccessKey", out AccessKey) &&
                              Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3BucketName", out BucketName) &&
                              Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3FolderName", out FolderName);

        if (!AmazonIdentity)
        {
            Log("Amazon S3 Incorrectly configured");
            return;
        }

        if (FolderName == "")
        {
            FolderName = SC.ShortProjectName;
        }

        List <Task> UploadTasks = new List <Task>();

        foreach (KeyValuePair <string, string> Entry in SC.ArchivedFiles)
        {
            FileInfo Info = new FileInfo(Entry.Key);
            UploadTasks.Add(Task.Factory.StartNew(() => UploadToS3Worker(Info, KeyId, AccessKey, BucketName, FolderName)));
        }

        Task.WaitAll(UploadTasks.ToArray());

        string URL = "http://" + BucketName + ".s3.amazonaws.com/" + FolderName + "/" + SC.ShortProjectName + ".html";

        Log("Your project's shareable link is: " + URL);

        Log("Upload Tasks finished.");
    }
示例#6
0
        public static bool DisableVerifyOBBOnStartUp(ConfigCacheIni Ini = null)
        {
            // make a new one if one wasn't passed in
            if (Ini == null)
            {
                Ini = GetConfigCacheIni("Engine");
            }

            // we check this a lot, so make it easy
            bool bDisableVerifyOBBOnStartUp;
            Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bDisableVerifyOBBOnStartUp", out bDisableVerifyOBBOnStartUp);

            return bDisableVerifyOBBOnStartUp;
        }
示例#7
0
		public static void ParseArchitectures()
		{
			// look in ini settings for what platforms to compile for
			ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.Android, "Engine", UnrealBuildTool.GetUProjectPath());
            Arches = new List<string>();
			bool bBuild = true;
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForArmV7", out bBuild) && bBuild)
			{
                Arches.Add("-armv7");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForArm64", out bBuild) && bBuild)
			{
                Arches.Add("-arm64");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForx86", out bBuild) && bBuild)
			{
                Arches.Add("-x86");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForx8664", out bBuild) && bBuild)
			{
                Arches.Add("-x64");
			}

			// force armv7 if something went wrong
            if (Arches.Count == 0)
			{
                Arches.Add("-armv7");
			}

			// Parse selected GPU architectures
            GPUArchitectures = new List<string>();
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForES2", out bBuild) && bBuild)
			{
                GPUArchitectures.Add("-es2");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForES31", out bBuild) && bBuild)
			{
                GPUArchitectures.Add("-es31");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForGL4", out bBuild) && bBuild)
			{
                GPUArchitectures.Add("-gl4");
			}
            if (GPUArchitectures.Count == 0)
			{
                GPUArchitectures.Add("-es2");
			}

            AllComboNames = (from Arch in Arches
                            from GPUArch in GPUArchitectures
                             select Arch + GPUArch).ToList();
		}
    private ProjectImportExportInfo GenerateProjectImportExportInfo(string RootWorkingDirectory, string LocalizationConfigFile)
    {
        var ProjectImportExportInfo = new ProjectImportExportInfo();

        var LocalizationConfig = new ConfigCacheIni(new FileReference(CombinePaths(RootWorkingDirectory, LocalizationConfigFile)));

        if (!LocalizationConfig.GetString("CommonSettings", "DestinationPath", out ProjectImportExportInfo.DestinationPath))
        {
            throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'DestinationPath', File: '{0}'", LocalizationConfigFile);
        }

        if (!LocalizationConfig.GetString("CommonSettings", "ManifestName", out ProjectImportExportInfo.ManifestName))
        {
            throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'ManifestName', File: '{0}'", LocalizationConfigFile);
        }

        if (!LocalizationConfig.GetString("CommonSettings", "ArchiveName", out ProjectImportExportInfo.ArchiveName))
        {
            throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'ArchiveName', File: '{0}'", LocalizationConfigFile);
        }

        if (!LocalizationConfig.GetString("CommonSettings", "PortableObjectName", out ProjectImportExportInfo.PortableObjectName))
        {
            throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'PortableObjectName', File: '{0}'", LocalizationConfigFile);
        }

        if (!LocalizationConfig.GetString("CommonSettings", "NativeCulture", out ProjectImportExportInfo.NativeCulture))
        {
            throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'NativeCulture', File: '{0}'", LocalizationConfigFile);
        }

        if (!LocalizationConfig.GetArray("CommonSettings", "CulturesToGenerate", out ProjectImportExportInfo.CulturesToGenerate))
        {
            throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'CulturesToGenerate', File: '{0}'", LocalizationConfigFile);
        }

        if (!LocalizationConfig.GetBool("CommonSettings", "bUseCultureDirectory", out ProjectImportExportInfo.bUseCultureDirectory))
        {
            // bUseCultureDirectory is optional, default is true
            ProjectImportExportInfo.bUseCultureDirectory = true;
        }

        return(ProjectImportExportInfo);
    }
        public AmazonServices(TargetInfo Target)
        {
            Definitions.Add("AMAZONSERVICES_PACKAGE=1");

            PrivateIncludePaths.AddRange(
                new string[] {
                "AmazonServices/Private",
            });

            PrivateDependencyModuleNames.AddRange(
                new string[] {
                "Core",
                "CoreUObject",
                "Engine",
                "Sockets",
                "OnlineSubsystem",
                "Http",
                "AndroidRuntimeSettings",
            }
                );

            // Get Settings from Config Cache
            ConfigCacheIni Ini = ConfigCacheIni.CreateConfigCacheIni(Target.Platform, "Engine", new DirectoryReference(Path.GetFullPath(Path.Combine(ModuleDirectory, "../../../../"))));
            bool           bEnableAmazonSupport = false;

            if (!Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bEnableAmazonSupport", out bEnableAmazonSupport))
            {
                bEnableAmazonSupport = false;
            }

            // Additional Frameworks and Libraries for Android
            if (Target.Platform == UnrealTargetPlatform.Android)
            {
                PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });
                string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
                AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "AmazonServices_APL.xml")));
            }
        }
示例#10
0
		// Look for any build options in the engine config file.
		public override void ParseProjectSettings()
		{
			base.ParseProjectSettings();

			ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.IOS, "Engine", UnrealBuildTool.GetUProjectPath());
			string ServerName = RemoteServerName;
			if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "RemoteServerName", out ServerName) && !String.IsNullOrEmpty(ServerName))
			{
				RemoteServerName = ServerName;
			}

			bool bUseRSync = false;
			if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bUseRSync", out bUseRSync))
			{
				bUseRPCUtil = !bUseRSync;
				string UserName = RSyncUsername;

				if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "RSyncUsername", out UserName))
				{
					RSyncUsername = UserName;
				}
				
				if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "DeltaCopyInstallPath", out OverrideDeltaCopyInstallPath))
				{
					if (!string.IsNullOrEmpty(OverrideDeltaCopyInstallPath))
					{
						SSHExe = Path.Combine(OverrideDeltaCopyInstallPath, Path.GetFileName(SSHExe));
						RSyncExe = Path.Combine(OverrideDeltaCopyInstallPath, Path.GetFileName(RSyncExe));
					}
				}

				string ConfigKeyPath;
				if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "SSHPrivateKeyOverridePath", out ConfigKeyPath))
				{
					if (File.Exists(ConfigKeyPath))
					{
						SSHPrivateKeyOverridePath = ConfigKeyPath;
					}
				}
			}
		}
示例#11
0
    public DeploymentContext(
        FileReference RawProjectPathOrName,
        string InLocalRoot,
        string BaseStageDirectory,
        string BaseArchiveDirectory,
        Platform InSourcePlatform,
        Platform InTargetPlatform,
        List <UnrealTargetConfiguration> InTargetConfigurations,
        IEnumerable <StageTarget> InStageTargets,
        List <String> InStageExecutables,
        bool InServer,
        bool InCooked,
        bool InStageCrashReporter,
        bool InStage,
        bool InCookOnTheFly,
        bool InArchive,
        bool InProgram,
        bool IsClientInsteadOfNoEditor,
        bool InForceChunkManifests,
        bool bInUseWebsocketNetDriver = false
        )
    {
        bStageCrashReporter       = InStageCrashReporter;
        RawProjectPath            = RawProjectPathOrName;
        DedicatedServer           = InServer;
        LocalRoot                 = CommandUtils.CombinePaths(InLocalRoot);
        CookSourcePlatform        = InSourcePlatform;
        StageTargetPlatform       = InTargetPlatform;
        StageTargetConfigurations = new List <UnrealTargetConfiguration>(InTargetConfigurations);
        StageTargets              = new List <StageTarget>(InStageTargets);
        StageExecutables          = InStageExecutables;
        IsCodeBasedProject        = ProjectUtils.IsCodeBasedUProjectFile(RawProjectPath);
        ShortProjectName          = ProjectUtils.GetShortProjectName(RawProjectPath);
        Stage   = InStage;
        Archive = InArchive;
        bUseWebsocketNetDriver = bInUseWebsocketNetDriver;

        if (CookSourcePlatform != null && InCooked)
        {
            CookPlatform = CookSourcePlatform.GetCookPlatform(DedicatedServer, IsClientInsteadOfNoEditor);
        }
        else if (CookSourcePlatform != null && InProgram)
        {
            CookPlatform = CookSourcePlatform.GetCookPlatform(false, false);
        }
        else
        {
            CookPlatform = "";
        }

        if (StageTargetPlatform != null && InCooked)
        {
            FinalCookPlatform = StageTargetPlatform.GetCookPlatform(DedicatedServer, IsClientInsteadOfNoEditor);
        }
        else if (StageTargetPlatform != null && InProgram)
        {
            FinalCookPlatform = StageTargetPlatform.GetCookPlatform(false, false);
        }
        else
        {
            FinalCookPlatform = "";
        }

        PlatformDir = StageTargetPlatform.PlatformType.ToString();

        StageDirectory   = CommandUtils.CombinePaths(BaseStageDirectory, FinalCookPlatform);
        ArchiveDirectory = CommandUtils.CombinePaths(BaseArchiveDirectory, FinalCookPlatform);

        if (!CommandUtils.FileExists(RawProjectPath.FullName))
        {
            throw new AutomationException("Can't find uproject file {0}.", RawProjectPathOrName);
        }

        ProjectRoot = CommandUtils.CombinePaths(CommandUtils.GetDirectoryName(RawProjectPath.FullName));

        if (!CommandUtils.DirectoryExists(ProjectRoot))
        {
            throw new AutomationException("Project Directory {0} doesn't exist.", ProjectRoot);
        }

        RelativeProjectRootForStage = ShortProjectName;

        ProjectArgForCommandLines = CommandUtils.MakePathSafeToUseWithCommandLine(RawProjectPath.FullName);
        CookSourceRuntimeRootDir  = RuntimeRootDir = LocalRoot;
        RuntimeProjectRootDir     = ProjectRoot;

        RelativeProjectRootForUnrealPak = CommandUtils.CombinePaths(RelativeProjectRootForStage).Replace("\\", "/");
        if (RelativeProjectRootForUnrealPak.StartsWith("/"))
        {
            RelativeProjectRootForUnrealPak = RelativeProjectRootForUnrealPak.Substring(1);
            RelativeProjectRootForStage     = RelativeProjectRootForStage.Substring(1);
        }

        SourceRelativeProjectRoot = RelativeProjectRootForStage; // for foreign projects this doesn't make much sense, but it turns into a noop on staging files
        if (ProjectRoot.StartsWith(LocalRoot, StringComparison.InvariantCultureIgnoreCase))
        {
            SourceRelativeProjectRoot = ProjectRoot.Substring(LocalRoot.Length);
        }
        if (SourceRelativeProjectRoot.StartsWith("/") || SourceRelativeProjectRoot.StartsWith("\\"))
        {
            SourceRelativeProjectRoot = SourceRelativeProjectRoot.Substring(1);
        }

        if (Stage)
        {
            CommandUtils.CreateDirectory(StageDirectory);
            StageProjectRoot = CommandUtils.CombinePaths(StageDirectory, RelativeProjectRootForStage);

            RuntimeRootDir            = StageDirectory;
            CookSourceRuntimeRootDir  = CommandUtils.CombinePaths(BaseStageDirectory, CookPlatform);
            RuntimeProjectRootDir     = StageProjectRoot;
            ProjectArgForCommandLines = CommandUtils.MakePathSafeToUseWithCommandLine(UProjectCommandLineArgInternalRoot + RelativeProjectRootForStage + "/" + ShortProjectName + ".uproject");
        }
        if (Archive)
        {
            CommandUtils.CreateDirectory(ArchiveDirectory);
        }
        ProjectArgForCommandLines = ProjectArgForCommandLines.Replace("\\", "/");
        ProjectBinariesFolder     = CommandUtils.CombinePaths(ProjectUtils.GetClientProjectBinariesRootPath(RawProjectPath, TargetRules.TargetType.Game, IsCodeBasedProject), PlatformDir);

        // If we were configured to use manifests across the whole project, then this platform should use manifests.
        // Otherwise, read whether we are generating chunks from the ProjectPackagingSettings ini.
        if (InForceChunkManifests)
        {
            PlatformUsesChunkManifests = true;
        }
        else
        {
            ConfigCacheIni GameIni  = ConfigCacheIni.CreateConfigCacheIni(InTargetPlatform.PlatformType, "Game", RawProjectPath.Directory);
            String         IniPath  = "/Script/UnrealEd.ProjectPackagingSettings";
            bool           bSetting = false;
            if (GameIni.GetBool(IniPath, "bGenerateChunks", out bSetting))
            {
                PlatformUsesChunkManifests = bSetting;
            }
        }
    }
示例#12
0
        // Look for any build options in the engine config file.
        public override void ParseProjectSettings()
        {
            base.ParseProjectSettings();

            ConfigCacheIni Ini = new ConfigCacheIni(STTargetPlatform.IOS, "Engine", STBuildTool.GetUProjectPath());
            string ServerName = RemoteServerName;
            if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "RemoteServerName", out ServerName))
            {
                RemoteServerName = ServerName;
            }

            bool bUseRSync = false;
            if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bUseRSync", out bUseRSync))
            {
                bUseRPCUtil = !bUseRSync;
                Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "RSyncUsername", out RSyncUsername);

                string ConfigKeyPath;
                if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "SSHPrivateKeyOverridePath", out ConfigKeyPath))
                {
                    if (File.Exists(ConfigKeyPath))
                    {
                        SSHPrivateKeyOverridePath = ConfigKeyPath;
                    }
                }
            }
        }
示例#13
0
		public static void ParseArchitectures()
		{
			// look in ini settings for what platforms to compile for
			ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.Android, "Engine", UnrealBuildTool.GetUProjectPath());
			List<string> ProjectArches = new List<string>();
			bool bBuild = true;
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForArmV7", out bBuild) && bBuild)
			{
				ProjectArches.Add("-armv7");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForArm64", out bBuild) && bBuild)
			{
				ProjectArches.Add("-arm64");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForx86", out bBuild) && bBuild)
			{
				ProjectArches.Add("-x86");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForx8664", out bBuild) && bBuild)
			{
				ProjectArches.Add("-x86_64");
			}

			// force armv7 if something went wrong
			if (ProjectArches.Count == 0)
			{
				ProjectArches.Add("-armv7");
			}

			Arches = ProjectArches.ToArray();

			// Parse selected GPU architectures
			List<string> ProjectGPUArches = new List<string>();
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForES2", out bBuild) && bBuild)
			{
				ProjectGPUArches.Add("-es2");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForES31", out bBuild) && bBuild)
			{
				ProjectGPUArches.Add("-es31");
			}
			if (Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bBuildForGL4", out bBuild) && bBuild)
			{
				ProjectGPUArches.Add("-gl4");
			}
			if (ProjectGPUArches.Count == 0)
			{
				ProjectGPUArches.Add("-es2");
			}
			GPUArchitectures = ProjectGPUArches.ToArray();

			List<string> FullArchCombinations = new List<string>();
			foreach (string Arch in Arches)
			{
				foreach (string GPUArch in GPUArchitectures)
				{
					FullArchCombinations.Add(Arch + GPUArch);
				}
			}
			AllComboNames = FullArchCombinations.ToArray();
		}
示例#14
0
        public Fuse(TargetInfo Target)
        {
            PublicIncludePaths.AddRange(
                new string[] {
                    // ... add public include paths required here ...
                }
                );

            PrivateIncludePaths.AddRange(
                new string[] {
                    "Developer/Fuse/Private",
                    // ... add other private include paths required here ...
                }
                );

            PublicDependencyModuleNames.AddRange(
                new string[]
                {
                    "Core",
                    "CoreUObject",
                    "Engine",
                    "OnlineSubsystem"
                    // ... add other public dependencies that you statically link with here ...
                }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[]
                {
                    // ... add private dependencies that you statically link with here ...
                }
                );

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
                {
                    // ... add any modules that your module loads dynamically here ...
                }
                );

            PrivateIncludePathModuleNames.AddRange(
                new string[]
                {
                    "Settings"
                }
                );

            if (Target.Platform == UnrealTargetPlatform.IOS) {
                // required frameworks
                PublicFrameworks.AddRange(
                    new string[]
                    {
                        "Accelerate",
                        "AdSupport",
                        "AudioToolbox",
                        "AVFoundation",
                        "CoreGraphics",
                        "CoreLocation",
                        "CoreMedia",
                        "CoreTelephony",
                        "EventKit",
                        "EventKitUI",
                        "Foundation",
                        "GameKit",
                        "MediaPlayer",
                        "MessageUI",
                        "MobileCoreServices",
                        "QuartzCore",
                        "Social",
                        "StoreKit",
                        "SystemConfiguration",
                        "Twitter",
                        "UIKit"
                    }
                );

                // required libs
                PublicAdditionalLibraries.Add("sqlite3");
                PublicAdditionalLibraries.Add("xml2");
                PublicAdditionalLibraries.Add("z");

                // include Fuse SDK
                var CodeDir = Path.Combine(ModulePath,"..","..","lib","FuseSDKiOS","Code");
                PrivateIncludePaths.Add(CodeDir);
                PublicAdditionalLibraries.Add(Path.Combine(CodeDir,"libFuseSDK.a"));

                // collect settings
                ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.IOS, "Engine", UnrealBuildTool.GetUProjectPath());

                bool bIncludeAdColony = false;
                bool bIncludeAppLovin = false;
                bool bIncludeHyprMX = false;
                bool bIncludeAdMob = false;
                bool bIncludeChartboost = false;
                bool bIncludeFacebook = false;
                bool bIncludeiAd = false;
                bool bIncludeMillennial = false;

                string SettingsPath = "/Script/Fuse.FuseSettings";
                Ini.GetBool(SettingsPath, "bIncludeAdColony", out bIncludeAdColony);
                Ini.GetBool(SettingsPath, "bIncludeAppLovin", out bIncludeAppLovin);
                Ini.GetBool(SettingsPath, "bIncludeHyprMX", out bIncludeHyprMX);
                Ini.GetBool(SettingsPath, "bIncludeAdMob", out bIncludeAdMob);
                Ini.GetBool(SettingsPath, "bIncludeChartboost", out bIncludeChartboost);
                Ini.GetBool(SettingsPath, "bIncludeFacebook", out bIncludeFacebook);
                Ini.GetBool(SettingsPath, "bIncludeiAd", out bIncludeiAd);
                Ini.GetBool(SettingsPath, "bIncludeMillennial", out bIncludeMillennial);

                // include optional adapters
                if (bIncludeAdColony)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(CodeDir,"libFuseAdapterAdcolony.a"));
                }

                if (bIncludeAppLovin)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(CodeDir,"libFuseAdapterAppLovin.a"));
                }

                if (bIncludeHyprMX)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(CodeDir,"libFuseAdapterHyprMX.a"));
                }

                var FuseExtrasDir = Path.Combine(ModulePath,"..","..","lib","FuseSDKiOS","Extras");
                var ExtrasiOSDir = "../../lib/Extras/iOS";

                if (bIncludeAdMob)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir,"AdMob","libFuseAdapterAdMob.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "GoogleMobileAds",
                            ExtrasiOSDir + "/AdMob/GoogleMobileAds.embeddedframework.zip"
                        )
                    );
                }

                if (bIncludeChartboost)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir,"ChartBoost","libFuseAdapterChartBoost.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "Chartboost",
                            ExtrasiOSDir + "/Chartboost/Chartboost.embeddedframework.zip"
                        )
                    );
                }

                if (bIncludeFacebook)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir,"Facebook","libFuseAdapterFacebook.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "FBAudienceNetwork",
                            ExtrasiOSDir + "/Facebook/FBAudienceNetwork.embeddedframework.zip"
                        )
                    );
                }

                if (bIncludeiAd)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir,"iAd","libFuseAdapteriAd.a"));
                }

                if (bIncludeMillennial)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir,"Millennial","libFuseAdapterMillennial.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "MillennialMedia",
                            ExtrasiOSDir + "/Millennial/MillennialMedia.embeddedframework.zip"
                        )
                    );
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir,"AdMob","libFuseAdapterAdMob.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "SpeechKit",
                            ExtrasiOSDir + "/Millennial/SpeechKit.embeddedframework.zip"
                        )
                    );
                }

            }
        }
示例#15
0
		private void AutodetectSettings(bool bReset)
		{
			if (bReset)
			{
				EditorTargetsList = null;
				ClientCookedTargetsList = null;
				ServerCookedTargetsList = null;
				ProgramTargetsList = null;
				ProjectBinariesPath = null;
				ProjectGameExePath = null;
			}

			var Properties = ProjectUtils.GetProjectProperties(RawProjectPath, ClientTargetPlatforms);

			bUsesSteam = Properties.bUsesSteam;
			bUsesCEF3 = Properties.bUsesCEF3;
			bUsesSlate = Properties.bUsesSlate;
			bUsesSlateEditorStyle = Properties.bUsesSlateEditorStyle;
            bDebugBuildsActuallyUseDebugCRT = Properties.bDebugBuildsActuallyUseDebugCRT;

			bIsCodeBasedProject = Properties.bIsCodeBasedProject;			
			DetectedTargets = Properties.Targets;
			LoadedEngineConfigs = Properties.EngineConfigs;
			LoadedGameConfigs = Properties.GameConfigs;

			var GameTarget = String.Empty;
			var EditorTarget = String.Empty;
			var ServerTarget = String.Empty;
			var ProgramTarget = String.Empty;
			var ProjectType = TargetRules.TargetType.Game;

			if (GlobalCommandLine.Rocket)
			{
				if (!CommandUtils.CmdEnv.HasCapabilityToCompile || !bIsCodeBasedProject)
				{
					if (bIsCodeBasedProject)
					{
						var ShortName = ProjectUtils.GetShortProjectName(RawProjectPath);
						GameTarget = ShortName;
						EditorTarget = ShortName + "Editor";
						ServerTarget = ShortName + "Server";
					}
					else
					{
						GameTarget = "UE4Game";
						EditorTarget = "UE4Editor";
						//ServerTarget = "RocketServer";

						Build = false;
					}
				}
				else
				{
					SingleTargetProperties TargetData;
					if (DetectedTargets.TryGetValue(TargetRules.TargetType.Editor, out TargetData))
					{
						EditorTarget = TargetData.TargetName;
					}

					if (DetectedTargets.TryGetValue(TargetRules.TargetType.Program, out TargetData))
					{
						ProgramTarget = TargetData.TargetName;
					}
					//DetectedTargets.TryGetValue(TargetRules.TargetType.Server, out ServerTarget);

					if (string.IsNullOrEmpty(GameTarget))
					{
						if (DetectedTargets.TryGetValue(TargetRules.TargetType.Game, out TargetData))
						{
							GameTarget = TargetData.TargetName;
						}
					}
				}
			}
			else if (!bIsCodeBasedProject)
			{
				GameTarget = "UE4Game";
				EditorTarget = "UE4Editor";
				ServerTarget = "UE4Server";
			}
			else if (!CommandUtils.CmdEnv.HasCapabilityToCompile)
			{
				var ShortName = ProjectUtils.GetShortProjectName(RawProjectPath);
				GameTarget = ShortName;
				EditorTarget = ShortName + "Editor";
				ServerTarget = ShortName + "Server";
			}
			else if (!CommandUtils.IsNullOrEmpty(Properties.Targets))
			{
				SingleTargetProperties TargetData;

				var GameTargetType = TargetRules.TargetType.Game;
				
				if( Client )
				{
					if( HasClientTargetDetected )
					{
						GameTargetType = TargetRules.TargetType.Client;
					}
					else
					{
						throw new AutomationException( "Client target not found!" );
					}
				}

				var ValidGameTargetTypes = new TargetRules.TargetType[]
				{
					GameTargetType,
					TargetRules.TargetType.Program		
				};

				foreach (var ValidTarget in ValidGameTargetTypes)
				{
					if (DetectedTargets.TryGetValue(ValidTarget, out TargetData))
					{
						GameTarget = TargetData.TargetName;
                        bDebugBuildsActuallyUseDebugCRT = TargetData.Rules.bDebugBuildsActuallyUseDebugCRT;
						bUsesSlate = TargetData.Rules.bUsesSlate;
						bUsesSlateEditorStyle = TargetData.Rules.bUsesSlateEditorStyle;
						bUsesSteam = TargetData.Rules.bUsesSteam;
						bUsesCEF3 = TargetData.Rules.bUsesCEF3;
						ProjectType = ValidTarget;
						break;
					}
				}

				if (DetectedTargets.TryGetValue(TargetRules.TargetType.Editor, out TargetData))
				{
					EditorTarget = TargetData.TargetName;
				}
				if (DetectedTargets.TryGetValue(TargetRules.TargetType.Server, out TargetData))
				{
					ServerTarget = TargetData.TargetName;
				}
				if (DetectedTargets.TryGetValue(TargetRules.TargetType.Program, out TargetData))
				{
					ProgramTarget = TargetData.TargetName;
				}
			}
			else if (!CommandUtils.IsNullOrEmpty(Properties.Programs))
			{
				SingleTargetProperties TargetData = Properties.Programs[0];

				bDebugBuildsActuallyUseDebugCRT = TargetData.Rules.bDebugBuildsActuallyUseDebugCRT;
				bUsesSlate = TargetData.Rules.bUsesSlate;
				bUsesSlateEditorStyle = TargetData.Rules.bUsesSlateEditorStyle;
				bUsesSteam = TargetData.Rules.bUsesSteam;
				bUsesCEF3 = TargetData.Rules.bUsesCEF3;
				ProjectType = TargetRules.TargetType.Program;
				ProgramTarget = TargetData.TargetName;
				GameTarget = TargetData.TargetName;
			}
			else if (!this.Build)
			{
				var ShortName = ProjectUtils.GetShortProjectName(RawProjectPath);
				GameTarget = ShortName;
				EditorTarget = ShortName + "Editor";
				ServerTarget = ShortName + "Server";
			}
			else
			{
				throw new AutomationException("{0} does not look like uproject file but no targets have been found!", RawProjectPath);
			}

			IsProgramTarget = ProjectType == TargetRules.TargetType.Program;

			if (String.IsNullOrEmpty(EditorTarget) && ProjectType != TargetRules.TargetType.Program && CommandUtils.IsNullOrEmpty(EditorTargetsList) && !Rocket)
			{
				if (Properties.bWasGenerated)
				{
					EditorTarget = "UE4Editor";
				}
				else
				{
					throw new AutomationException("Editor target not found!");
				}
			}
			if (String.IsNullOrEmpty(GameTarget) && Run && !NoClient && (Cook || CookOnTheFly) && CommandUtils.IsNullOrEmpty(ClientCookedTargetsList) && !Rocket)
			{
				throw new AutomationException("Game target not found. Game target is required with -cook or -cookonthefly");
			}

			if (EditorTargetsList == null)
			{
				if (!GlobalCommandLine.NoCompile && !GlobalCommandLine.NoCompileEditor && (ProjectType != TargetRules.TargetType.Program) && !String.IsNullOrEmpty(EditorTarget))
				{
					EditorTargetsList = new ParamList<string>(EditorTarget);
				}
				else
				{
					EditorTargetsList = new ParamList<string>();
				}
			}

			if (ProgramTargetsList == null)
			{
				if (ProjectType == TargetRules.TargetType.Program)
				{
					ProgramTargetsList = new ParamList<string>(ProgramTarget);
				}
				else
				{
					ProgramTargetsList = new ParamList<string>();
				}
			}

            if (ClientCookedTargetsList == null && !NoClient && (Cook || CookOnTheFly || Prebuilt))
			{
                if (String.IsNullOrEmpty(GameTarget))
				{
                    throw new AutomationException("Game target not found. Game target is required with -cook or -cookonthefly");
                }
				else
				{
                    ClientCookedTargetsList = new ParamList<string>(GameTarget);
                }
			}
            else if (ClientCookedTargetsList == null)
            {
                ClientCookedTargetsList = new ParamList<string>();
            }

            if (ServerCookedTargetsList == null && DedicatedServer && (Cook || CookOnTheFly))
			{
				if (String.IsNullOrEmpty(ServerTarget))
				{
                    throw new AutomationException("Server target not found. Server target is required with -server and -cook or -cookonthefly");
				}
				ServerCookedTargetsList = new ParamList<string>(ServerTarget);
			}
			else if (ServerCookedTargetsList == null)
			{
				ServerCookedTargetsList = new ParamList<string>();
			}

			if (String.IsNullOrEmpty(ProjectBinariesPath) || String.IsNullOrEmpty(ProjectGameExePath))
			{
				if ( ClientTargetPlatforms.Count > 0 )
				{
					var ProjectClientBinariesPath = ProjectUtils.GetClientProjectBinariesRootPath(RawProjectPath, ProjectType, Properties.bIsCodeBasedProject);
					ProjectBinariesPath = ProjectUtils.GetProjectClientBinariesFolder(ProjectClientBinariesPath, ClientTargetPlatforms[0]);
					ProjectGameExePath = CommandUtils.CombinePaths(ProjectBinariesPath, GameTarget + Platform.GetExeExtension(ClientTargetPlatforms[0]));
				}
			}

			// for the moment, allow the commandline to override the ini if set.  This will keep us from breaking licensee packaging scripts until we have
			// the full solution for per-platform packaging settings.
			if (!Manifests)
			{				
				ConfigCacheIni GameIni = new ConfigCacheIni("Game", Path.GetDirectoryName(RawProjectPath));
				String IniPath = "/Script/UnrealEd.ProjectPackagingSettings";
				bool bSetting = false;
				if (!GameIni.GetBool(IniPath, "bGenerateChunks", out bSetting))
				{
					Manifests = bSetting;
				}
			}
		}
示例#16
0
		public static bool PackageDataInsideApk(bool bDisallowPackagingDataInApk, ConfigCacheIni Ini=null)
		{
			if (bDisallowPackagingDataInApk)
			{
				return false;
			}

			// make a new one if one wasn't passed in
			if (Ini == null)
			{
				Ini = GetConfigCacheIni( "Engine" );
			}

			// we check this a lot, so make it easy 
			bool bPackageDataInsideApk;
			Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bPackageDataInsideApk", out bPackageDataInsideApk);

			return bPackageDataInsideApk;
		}
示例#17
0
		/**
		 * Check for the default configuration
		 *
		 * return true if the project uses the default build config
		 */
		public virtual bool HasDefaultBuildConfig(UnrealTargetPlatform Platform, string ProjectPath)
		{
			ConfigCacheIni ProjIni = new ConfigCacheIni(Platform, "Engine", ProjectPath);
			ConfigCacheIni DefaultIni = new ConfigCacheIni(Platform, "Engine", null);

			bool bDefValue = UEBuildConfiguration.bCompileAPEX;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileApex", out bDefValue);
			bool bProjValue = UEBuildConfiguration.bCompileAPEX;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileApex", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileBox2D;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileBox2D", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileBox2D;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileBox2D", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileICU;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileICU", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileICU;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileICU", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileSimplygon;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSimplygon", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileSimplygon;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSimplygon", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileLeanAndMeanUE;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileLeanAndMeanUE", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileLeanAndMeanUE;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileLeanAndMeanUE", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bIncludeADO;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bIncludeADO", out bDefValue);
			bProjValue = UEBuildConfiguration.bIncludeADO;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bIncludeADO", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileRecast;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileRecast", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileRecast;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileRecast", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileSpeedTree;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSpeedTree", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileSpeedTree;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSpeedTree", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileWithPluginSupport;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileWithPluginSupport", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileWithPluginSupport;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileWithPluginSupport", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompilePhysXVehicle;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompilePhysXVehicle", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompilePhysXVehicle;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompilePhysXVehicle", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileFreeType;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileFreeType", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileFreeType;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileFreeType", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileForSize;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileForSize", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileForSize;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileForSize", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}

			bDefValue = UEBuildConfiguration.bCompileCEF3;
			DefaultIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileCEF3", out bDefValue);
			bProjValue = UEBuildConfiguration.bCompileCEF3;
			ProjIni.GetBool("/Script/BuildSettings.BuildSettings", "bCompileCEF3", out bProjValue);
			if (bDefValue != bProjValue)
			{
				return false;
			}
			return true;
		}
示例#18
0
        public static bool GeneratePList(string ProjectDirectory, bool bIsUE4Game, string GameName, string ProjectName, string InEngineDir, string AppDirectory)
        {
            // generate the Info.plist for future use
            string BuildDirectory = ProjectDirectory + "/Build/IOS";
            bool bSkipDefaultPNGs = false;
            string IntermediateDirectory = (bIsUE4Game ? InEngineDir : ProjectDirectory) + "/Intermediate/IOS";
            string PListFile = IntermediateDirectory + "/" + GameName + "-Info.plist";
            VersionUtilities.BuildDirectory = BuildDirectory;
            VersionUtilities.GameName = GameName;

            // read the old file
            string OldPListData = File.Exists(PListFile) ? File.ReadAllText(PListFile) : "";

            // determine if there is a launch.xib
            string LaunchXib = InEngineDir + "/Build/IOS/Resources/Interface/LaunchScreen.xib";
            if (File.Exists(BuildDirectory + "/Resources/Interface/LaunchScreen.xib"))
            {
                LaunchXib = BuildDirectory + "/Resources/Interface/LaunchScreen.xib";
            }

            // get the settings from the ini file
            // plist replacements
            ConfigCacheIni Ini = new ConfigCacheIni(STTargetPlatform.IOS, "Engine", STBuildTool.GetUProjectPath());

            // orientations
            string SupportedOrientations = "";
            bool bSupported = true;
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsPortraitOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationPortrait</string>\n" : "";
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsUpsideDownOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n" : "";
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeLeftOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n" : "";
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeRightOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n" : "";

            // bundle display name
            string BundleDisplayName;
            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "BundleDisplayName", out BundleDisplayName);

            // bundle identifier
            string BundleIdentifier;
            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "BundleIdentifier", out BundleIdentifier);

            // bundle name
            string BundleName;
            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "BundleName", out BundleName);

            // short version string
            string BundleShortVersion;
            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "VersionInfo", out BundleShortVersion);

            // required capabilities
            string RequiredCaps = "\t\t<string>armv7</string>\n";
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsOpenGLES2", out bSupported);
            RequiredCaps += bSupported ? "\t\t<string>opengles-2</string>\n" : "";
            if (!bSupported)
            {
                Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsMetal", out bSupported);
                RequiredCaps += bSupported ? "\t\t<string>metal</string>\n" : "";
            }

            // minimum iOS version
            string MinVersion;
            if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "MinimumiOSVersion", out MinVersion))
            {
                switch (MinVersion)
                {
                    case "IOS_61":
                        MinVersion = "6.1";
                        break;
                    case "IOS_7":
                        MinVersion = "7.0";
                        break;
                    case "IOS_8":
                        MinVersion = "8.0";
                        break;
                }
            }
            else
            {
                MinVersion = "6.1";
            }

            // extra plist data
            string ExtraData = "";
            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "AdditionalPlistData", out ExtraData);

            // generate the plist file
            StringBuilder Text = new StringBuilder();
            Text.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            Text.AppendLine("<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
            Text.AppendLine("<plist version=\"1.0\">");
            Text.AppendLine("<dict>");
            Text.AppendLine("\t<key>CFBundleURLTypes</key>");
            Text.AppendLine("\t<array>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>CFBundleURLName</key>");
            Text.AppendLine("\t\t\t<string>com.Epic.Unreal</string>");
            Text.AppendLine("\t\t\t<key>CFBundleURLSchemes</key>");
            Text.AppendLine("\t\t\t<array>");
            Text.AppendLine(string.Format("\t\t\t\t<string>{0}</string>", bIsUE4Game ? "UE4Game" : GameName));
            Text.AppendLine("\t\t\t</array>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>CFBundleDevelopmentRegion</key>");
            Text.AppendLine("\t<string>English</string>");
            Text.AppendLine("\t<key>CFBundleDisplayName</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleDisplayName.Replace("[PROJECT_NAME]", ProjectName).Replace("_","")));
            Text.AppendLine("\t<key>CFBundleExecutable</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", bIsUE4Game ? "UE4Game" : GameName.Replace("_", "")));
            Text.AppendLine("\t<key>CFBundleIdentifier</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleIdentifier.Replace("[PROJECT_NAME]", ProjectName).Replace("_","")));
            Text.AppendLine("\t<key>CFBundleInfoDictionaryVersion</key>");
            Text.AppendLine("\t<string>6.0</string>");
            Text.AppendLine("\t<key>CFBundleName</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleName.Replace("[PROJECT_NAME]", ProjectName).Replace("_","")));
            Text.AppendLine("\t<key>CFBundlePackageType</key>");
            Text.AppendLine("\t<string>APPL</string>");
            Text.AppendLine("\t<key>CFBundleSignature</key>");
            Text.AppendLine("\t<string>????</string>");
            Text.AppendLine("\t<key>CFBundleVersion</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", VersionUtilities.UpdateBundleVersion(OldPListData)));
            Text.AppendLine("\t<key>CFBundleShortVersionString</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleShortVersion));
            Text.AppendLine("\t<key>LSRequiresIPhoneOS</key>");
            Text.AppendLine("\t<true/>");
            Text.AppendLine("\t<key>UIStatusBarHidden</key>");
            Text.AppendLine("\t<true/>");
            Text.AppendLine("\t<key>UISupportedInterfaceOrientations</key>");
            Text.AppendLine("\t<array>");
            foreach (string Line in SupportedOrientations.Split("\r\n".ToCharArray()))
            {
                if (!string.IsNullOrWhiteSpace(Line))
                {
                    Text.AppendLine(Line);
                }
            }
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>UIRequiredDeviceCapabilities</key>");
            Text.AppendLine("\t<array>");
            foreach (string Line in RequiredCaps.Split("\r\n".ToCharArray()))
            {
                if (!string.IsNullOrWhiteSpace(Line))
                {
                    Text.AppendLine(Line);
                }
            }
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>CFBundleIcons</key>");
            Text.AppendLine("\t<dict>");
            Text.AppendLine("\t\t<key>CFBundlePrimaryIcon</key>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>CFBundleIconFiles</key>");
            Text.AppendLine("\t\t\t<array>");
            Text.AppendLine("\t\t\t\t<string>Icon29.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon40.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon57.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t</array>");
            Text.AppendLine("\t\t\t<key>UIPrerenderedIcon</key>");
            Text.AppendLine("\t\t\t<true/>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</dict>");
            Text.AppendLine("\t<key>CFBundleIcons~ipad</key>");
            Text.AppendLine("\t<dict>");
            Text.AppendLine("\t\t<key>CFBundlePrimaryIcon</key>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>CFBundleIconFiles</key>");
            Text.AppendLine("\t\t\t<array>");
            Text.AppendLine("\t\t\t\t<string>Icon29.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon40.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon50.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon72.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon76.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t</array>");
            Text.AppendLine("\t\t\t<key>UIPrerenderedIcon</key>");
            Text.AppendLine("\t\t\t<true/>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</dict>");
             			if (File.Exists(LaunchXib))
            {
                // TODO: compile the xib via remote tool
                Text.AppendLine("\t<key>UILaunchStoryboardName</key>");
                Text.AppendLine("\t<string>LaunchScreen</string>");
                bSkipDefaultPNGs = true;
            }
            else
            {
                // this is a temp way to inject the iphone 6 images without needing to upgrade everyone's plist
                // eventually we want to generate this based on what the user has set in the project settings
                string[] IPhoneConfigs =
                    {
                        "Default-IPhone6", "Landscape", "{375, 667}",
                        "Default-IPhone6", "Portrait", "{375, 667}",
                        "Default-IPhone6Plus-Landscape", "Landscape", "{414, 736}",
                        "Default-IPhone6Plus-Portrait", "Portrait", "{414, 736}",
                        "Default", "Landscape", "{320, 480}",
                        "Default", "Portrait", "{320, 480}",
                        "Default-568h", "Landscape", "{320, 568}",
                        "Default-568h", "Portrait", "{320, 568}",
                    };

                Text.AppendLine("\t<key>UILaunchImages~iphone</key>");
                Text.AppendLine("\t<array>");
                for (int ConfigIndex = 0; ConfigIndex < IPhoneConfigs.Length; ConfigIndex += 3)
                {
                    Text.AppendLine("\t\t<dict>");
                    Text.AppendLine("\t\t\t<key>UILaunchImageMinimumOSVersion</key>");
                    Text.AppendLine("\t\t\t<string>8.0</string>");
                    Text.AppendLine("\t\t\t<key>UILaunchImageName</key>");
                    Text.AppendLine(string.Format("\t\t\t<string>{0}</string>", IPhoneConfigs[ConfigIndex + 0]));
                    Text.AppendLine("\t\t\t<key>UILaunchImageOrientation</key>");
                    Text.AppendLine(string.Format("\t\t\t<string>{0}</string>", IPhoneConfigs[ConfigIndex + 1]));
                    Text.AppendLine("\t\t\t<key>UILaunchImageSize</key>");
                    Text.AppendLine(string.Format("\t\t\t<string>{0}</string>", IPhoneConfigs[ConfigIndex + 2]));
                    Text.AppendLine("\t\t</dict>");
                }

                // close it out
                Text.AppendLine("\t</array>");
            }
            Text.AppendLine("\t<key>UILaunchImages~ipad</key>");
            Text.AppendLine("\t<array>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>UILaunchImageMinimumOSVersion</key>");
            Text.AppendLine("\t\t\t<string>7.0</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageName</key>");
            Text.AppendLine("\t\t\t<string>Default-Landscape</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageOrientation</key>");
            Text.AppendLine("\t\t\t<string>Landscape</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageSize</key>");
            Text.AppendLine("\t\t\t<string>{768, 1024}</string>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>UILaunchImageMinimumOSVersion</key>");
            Text.AppendLine("\t\t\t<string>7.0</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageName</key>");
            Text.AppendLine("\t\t\t<string>Default-Portrait</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageOrientation</key>");
            Text.AppendLine("\t\t\t<string>Portrait</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageSize</key>");
            Text.AppendLine("\t\t\t<string>{768, 1024}</string>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>CFBundleSupportedPlatforms</key>");
            Text.AppendLine("\t<array>");
            Text.AppendLine("\t\t<string>iPhoneOS</string>");
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>MinimumOSVersion</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", MinVersion));
            if (!string.IsNullOrEmpty(ExtraData))
            {
                ExtraData = ExtraData.Replace("\\n", "\n");
                foreach (string Line in ExtraData.Split("\r\n".ToCharArray()))
                {
                    if (!string.IsNullOrWhiteSpace(Line))
                    {
                        Text.AppendLine("\t" + Line);
                    }
                }
            }
            Text.AppendLine("</dict>");
            Text.AppendLine("</plist>");

            // write the file out
            if (!Directory.Exists(IntermediateDirectory))
            {
                Directory.CreateDirectory(IntermediateDirectory);
            }
            File.WriteAllText(PListFile, Text.ToString());
            if (BuildHostPlatform.Current.Platform == STTargetPlatform.Mac)
            {
                if (!Directory.Exists(AppDirectory))
                {
                    Directory.CreateDirectory(AppDirectory);
                }
                File.WriteAllText(AppDirectory + "/Info.plist", Text.ToString());
            }

            return bSkipDefaultPNGs;
        }
示例#19
0
        public override void ParseProjectSettings()
        {
            base.ParseProjectSettings();

            // look in ini settings for what platforms to compile for
            ConfigCacheIni Ini = new ConfigCacheIni(STTargetPlatform.IOS, "Engine", STBuildTool.GetUProjectPath());
            string MinVersion = "IOS_6";
            if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "MinimumiOSVersion", out MinVersion))
            {
                switch (MinVersion)
                {
                    case "IOS_61":
                        RunTimeIOSVersion = "6.1";
                        break;
                    case "IOS_7":
                        RunTimeIOSVersion = "7.0";
                        break;
                    case "IOS_8":
                        RunTimeIOSVersion = "8.0";
                        break;
                }
            }

            bool biPhoneAllowed = true;
            bool biPadAllowed = true;
            Ini.GetBool ("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsIPhone", out biPhoneAllowed);
            Ini.GetBool ("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsIPad", out biPadAllowed);
            if (biPhoneAllowed && biPadAllowed)
            {
                RunTimeIOSDevices = "1,2";
            }
            else if (biPadAllowed)
            {
                RunTimeIOSDevices = "2";
            }
            else if (biPhoneAllowed)
            {
                RunTimeIOSDevices = "1";
            }
        }
示例#20
0
        public static void ParseArchitectures()
        {
            // look in ini settings for what platforms to compile for
            ConfigCacheIni Ini = new ConfigCacheIni(STTargetPlatform.Android, "Engine", STBuildTool.GetUProjectPath());
            List<string> ProjectArches = new List<string>();
            bool bBuild = true;
            if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7", out bBuild) && bBuild)
            {
                ProjectArches.Add("armv7");
            }
            if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArm64", out bBuild) && bBuild)
            {
                ProjectArches.Add("arm64");
            }
            if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7S", out bBuild) && bBuild)
            {
                ProjectArches.Add("armv7s");
            }

            // force armv7 if something went wrong
            if (ProjectArches.Count == 0)
            {
                ProjectArches.Add("armv7");
            }
            NonShippingArchitectures = ProjectArches[0];
            for (int Index = 1; Index < ProjectArches.Count; ++Index)
            {
                NonShippingArchitectures += "," + ProjectArches[Index];
            }

            ProjectArches.Clear();
            if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7", out bBuild) && bBuild)
            {
                ProjectArches.Add("armv7");
            }
            if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArm64", out bBuild) && bBuild)
            {
                ProjectArches.Add("arm64");
            }
            if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7S", out bBuild) && bBuild)
            {
                ProjectArches.Add("armv7s");
            }

            // force armv7 if something went wrong
            if (ProjectArches.Count == 0)
            {
                ProjectArches.Add("armv7");
                ProjectArches.Add("arm64");
            }
            ShippingArchitectures = ProjectArches[0];
            for (int Index = 1; Index < ProjectArches.Count; ++Index)
            {
                ShippingArchitectures += "," + ProjectArches[Index];
            }
        }
示例#21
0
		/**
		 *	Setup the project environment for building
		 *	
		 *	@param	InBuildTarget		The target being built
		 */
		public virtual void SetUpProjectEnvironment(UnrealTargetPlatform InPlatform)
		{
			if (!bInitializedProject)
			{
				ConfigCacheIni Ini = new ConfigCacheIni(InPlatform, "Engine", UnrealBuildTool.GetUProjectPath());
				bool bValue = UEBuildConfiguration.bCompileAPEX;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileApex", out bValue))
				{
					UEBuildConfiguration.bCompileAPEX = bValue;
				}

				bValue = UEBuildConfiguration.bCompileBox2D;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileBox2D", out bValue))
				{
					UEBuildConfiguration.bCompileBox2D = bValue;
				}

				bValue = UEBuildConfiguration.bCompileICU;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileICU", out bValue))
				{
					UEBuildConfiguration.bCompileICU = bValue;
				}

				bValue = UEBuildConfiguration.bCompileSimplygon;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSimplygon", out bValue))
				{
					UEBuildConfiguration.bCompileSimplygon = bValue;
				}

				bValue = UEBuildConfiguration.bCompileLeanAndMeanUE;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileLeanAndMeanUE", out bValue))
				{
					UEBuildConfiguration.bCompileLeanAndMeanUE = bValue;
				}

				bValue = UEBuildConfiguration.bIncludeADO;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bIncludeADO", out bValue))
				{
					UEBuildConfiguration.bIncludeADO = bValue;
				}

				bValue = UEBuildConfiguration.bCompileRecast;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileRecast", out bValue))
				{
					UEBuildConfiguration.bCompileRecast = bValue;
				}

				bValue = UEBuildConfiguration.bCompileSpeedTree;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSpeedTree", out bValue))
				{
					UEBuildConfiguration.bCompileSpeedTree = bValue;
				}

				bValue = UEBuildConfiguration.bCompileWithPluginSupport;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileWithPluginSupport", out bValue))
				{
					UEBuildConfiguration.bCompileWithPluginSupport = bValue;
				}

				bValue = UEBuildConfiguration.bCompilePhysXVehicle;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompilePhysXVehicle", out bValue))
				{
					UEBuildConfiguration.bCompilePhysXVehicle = bValue;
				}

				bValue = UEBuildConfiguration.bCompileFreeType;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileFreeType", out bValue))
				{
					UEBuildConfiguration.bCompileFreeType = bValue;
				}

				bValue = UEBuildConfiguration.bCompileForSize;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileForSize", out bValue))
				{
					UEBuildConfiguration.bCompileForSize = bValue;
				}

				bValue = UEBuildConfiguration.bCompileCEF3;
				if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileCEF3", out bValue))
				{
					UEBuildConfiguration.bCompileCEF3 = bValue;
				}

				bInitializedProject = true;
			}
		}
示例#22
0
        private void WriteEntitlementsFile(string OutputFilename)
        {
            // get the settings from the ini file
            // plist replacements
            ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.IOS, "Engine", UnrealBuildTool.GetUProjectPath());
            bool bSupported = false;
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bEnableCloudKitSupport", out bSupported);

            Directory.CreateDirectory(Path.GetDirectoryName(OutputFilename));
            // we need to have something so Xcode will compile, so we just set the get-task-allow, since we know the value,
            // which is based on distribution or not (true means debuggable)
            StringBuilder Text = new StringBuilder();
            Text.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            Text.AppendLine("<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
            Text.AppendLine("<plist version=\"1.0\">");
            Text.AppendLine("<dict>");
            Text.AppendLine(string.Format("\t<key>get-task-allow</key><{0}/>",	/*Config.bForDistribution ? "false" : */"true"));
            if (bSupported)
            {
                Text.AppendLine("\t<key>com.apple.developer.icloud-container-identifiers</key>");
                Text.AppendLine("\t<array>");
                Text.AppendLine("\t\t<string>iCloud.$(CFBundleIdentifier)</string>");
                Text.AppendLine("\t</array>");
                Text.AppendLine("\t<key>com.apple.developer.icloud-services</key>");
                Text.AppendLine("\t<array>");
                Text.AppendLine("\t\t<string>CloudKit</string>");
                Text.AppendLine("\t</array>");
            }
            Text.AppendLine("</dict>");
            Text.AppendLine("</plist>");
            File.WriteAllText(OutputFilename, Text.ToString());
        }
示例#23
0
        public static bool GeneratePList(string ProjectDirectory, bool bIsUE4Game, string GameName, string ProjectName, string InEngineDir, string AppDirectory)
        {
            // generate the Info.plist for future use
            string BuildDirectory        = ProjectDirectory + "/Build/IOS";
            bool   bSkipDefaultPNGs      = false;
            string IntermediateDirectory = (bIsUE4Game ? InEngineDir : ProjectDirectory) + "/Intermediate/IOS";
            string PListFile             = IntermediateDirectory + "/" + GameName + "-Info.plist";

            VersionUtilities.BuildDirectory = BuildDirectory;
            VersionUtilities.GameName       = GameName;

            // read the old file
            string OldPListData = File.Exists(PListFile) ? File.ReadAllText(PListFile) : "";

            // determine if there is a launch.xib
            string LaunchXib = InEngineDir + "/Build/IOS/Resources/Interface/LaunchScreen.xib";

            if (File.Exists(BuildDirectory + "/Resources/Interface/LaunchScreen.xib"))
            {
                LaunchXib = BuildDirectory + "/Resources/Interface/LaunchScreen.xib";
            }

            // get the settings from the ini file
            // plist replacements
            ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.IOS, "Engine", UnrealBuildTool.GetUProjectPath());

            // orientations
            string SupportedOrientations = "";
            bool   bSupported            = true;

            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsPortraitOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationPortrait</string>\n" : "";
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsUpsideDownOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n" : "";
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeLeftOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n" : "";
            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsLandscapeRightOrientation", out bSupported);
            SupportedOrientations += bSupported ? "\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n" : "";

            // bundle display name
            string BundleDisplayName;

            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "BundleDisplayName", out BundleDisplayName);

            // bundle identifier
            string BundleIdentifier;

            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "BundleIdentifier", out BundleIdentifier);

            // bundle name
            string BundleName;

            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "BundleName", out BundleName);

            // short version string
            string BundleShortVersion;

            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "VersionInfo", out BundleShortVersion);

            // required capabilities
            string RequiredCaps = "\t\t<string>armv7</string>\n";

            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsOpenGLES2", out bSupported);
            RequiredCaps += bSupported ? "\t\t<string>opengles-2</string>\n" : "";
            if (!bSupported)
            {
                Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsMetal", out bSupported);
                RequiredCaps += bSupported ? "\t\t<string>metal</string>\n" : "";
            }

            // minimum iOS version
            string MinVersion;

            if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "MinimumiOSVersion", out MinVersion))
            {
                switch (MinVersion)
                {
                case "IOS_61":
                    MinVersion = "6.1";
                    break;

                case "IOS_7":
                    MinVersion = "7.0";
                    break;

                case "IOS_8":
                    MinVersion = "8.0";
                    break;
                }
            }
            else
            {
                MinVersion = "6.1";
            }

            // Get Facebook Support details
            bool bEnableFacebookSupport = true;

            Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bEnableFacebookSupport", out bEnableFacebookSupport);

            // Write the Facebook App ID if we need it.
            string FacebookAppID = "";

            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "FacebookAppID", out FacebookAppID);
            bEnableFacebookSupport = bEnableFacebookSupport && !string.IsNullOrWhiteSpace(FacebookAppID);

            // extra plist data
            string ExtraData = "";

            Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "AdditionalPlistData", out ExtraData);

            // generate the plist file
            StringBuilder Text = new StringBuilder();

            Text.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            Text.AppendLine("<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
            Text.AppendLine("<plist version=\"1.0\">");
            Text.AppendLine("<dict>");
            Text.AppendLine("\t<key>CFBundleURLTypes</key>");
            Text.AppendLine("\t<array>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>CFBundleURLName</key>");
            Text.AppendLine("\t\t\t<string>com.Epic.Unreal</string>");
            Text.AppendLine("\t\t\t<key>CFBundleURLSchemes</key>");
            Text.AppendLine("\t\t\t<array>");
            Text.AppendLine(string.Format("\t\t\t\t<string>{0}</string>", bIsUE4Game ? "UE4Game" : GameName));
            if (bEnableFacebookSupport)
            {
                // This is needed for facebook login to redirect back to the app after completion.
                Text.AppendLine(string.Format("\t\t\t\t<string>fb{0}</string>", FacebookAppID));
            }
            Text.AppendLine("\t\t\t</array>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>CFBundleDevelopmentRegion</key>");
            Text.AppendLine("\t<string>English</string>");
            Text.AppendLine("\t<key>CFBundleDisplayName</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleDisplayName.Replace("[PROJECT_NAME]", ProjectName).Replace("_", "")));
            Text.AppendLine("\t<key>CFBundleExecutable</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", bIsUE4Game ? "UE4Game" : GameName));
            Text.AppendLine("\t<key>CFBundleIdentifier</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleIdentifier.Replace("[PROJECT_NAME]", ProjectName).Replace("_", "")));
            Text.AppendLine("\t<key>CFBundleInfoDictionaryVersion</key>");
            Text.AppendLine("\t<string>6.0</string>");
            Text.AppendLine("\t<key>CFBundleName</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleName.Replace("[PROJECT_NAME]", ProjectName).Replace("_", "")));
            Text.AppendLine("\t<key>CFBundlePackageType</key>");
            Text.AppendLine("\t<string>APPL</string>");
            Text.AppendLine("\t<key>CFBundleSignature</key>");
            Text.AppendLine("\t<string>????</string>");
            Text.AppendLine("\t<key>CFBundleVersion</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", VersionUtilities.UpdateBundleVersion(OldPListData)));
            Text.AppendLine("\t<key>CFBundleShortVersionString</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", BundleShortVersion));
            Text.AppendLine("\t<key>LSRequiresIPhoneOS</key>");
            Text.AppendLine("\t<true/>");
            Text.AppendLine("\t<key>UIStatusBarHidden</key>");
            Text.AppendLine("\t<true/>");
            Text.AppendLine("\t<key>UIViewControllerBasedStatusBarAppearance</key>");
            Text.AppendLine("\t<false/>");
            Text.AppendLine("\t<key>UISupportedInterfaceOrientations</key>");
            Text.AppendLine("\t<array>");
            foreach (string Line in SupportedOrientations.Split("\r\n".ToCharArray()))
            {
                if (!string.IsNullOrWhiteSpace(Line))
                {
                    Text.AppendLine(Line);
                }
            }
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>UIRequiredDeviceCapabilities</key>");
            Text.AppendLine("\t<array>");
            foreach (string Line in RequiredCaps.Split("\r\n".ToCharArray()))
            {
                if (!string.IsNullOrWhiteSpace(Line))
                {
                    Text.AppendLine(Line);
                }
            }
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>CFBundleIcons</key>");
            Text.AppendLine("\t<dict>");
            Text.AppendLine("\t\t<key>CFBundlePrimaryIcon</key>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>CFBundleIconFiles</key>");
            Text.AppendLine("\t\t\t<array>");
            Text.AppendLine("\t\t\t\t<string>Icon29.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon40.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon57.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t</array>");
            Text.AppendLine("\t\t\t<key>UIPrerenderedIcon</key>");
            Text.AppendLine("\t\t\t<true/>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</dict>");
            Text.AppendLine("\t<key>CFBundleIcons~ipad</key>");
            Text.AppendLine("\t<dict>");
            Text.AppendLine("\t\t<key>CFBundlePrimaryIcon</key>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>CFBundleIconFiles</key>");
            Text.AppendLine("\t\t\t<array>");
            Text.AppendLine("\t\t\t\t<string>Icon29.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon40.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon50.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon72.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t\t<string>Icon76.png</string>");
            Text.AppendLine("\t\t\t\t<string>[email protected]</string>");
            Text.AppendLine("\t\t\t</array>");
            Text.AppendLine("\t\t\t<key>UIPrerenderedIcon</key>");
            Text.AppendLine("\t\t\t<true/>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</dict>");
            if (File.Exists(LaunchXib))
            {
                // TODO: compile the xib via remote tool
                Text.AppendLine("\t<key>UILaunchStoryboardName</key>");
                Text.AppendLine("\t<string>LaunchScreen</string>");
                bSkipDefaultPNGs = true;
            }
            else
            {
                // this is a temp way to inject the iphone 6 images without needing to upgrade everyone's plist
                // eventually we want to generate this based on what the user has set in the project settings
                string[] IPhoneConfigs =
                {
                    "Default-IPhone6",               "Landscape", "{375, 667}",
                    "Default-IPhone6",               "Portrait",  "{375, 667}",
                    "Default-IPhone6Plus-Landscape", "Landscape", "{414, 736}",
                    "Default-IPhone6Plus-Portrait",  "Portrait",  "{414, 736}",
                    "Default",                       "Landscape", "{320, 480}",
                    "Default",                       "Portrait",  "{320, 480}",
                    "Default-568h",                  "Landscape", "{320, 568}",
                    "Default-568h",                  "Portrait",  "{320, 568}",
                };

                Text.AppendLine("\t<key>UILaunchImages~iphone</key>");
                Text.AppendLine("\t<array>");
                for (int ConfigIndex = 0; ConfigIndex < IPhoneConfigs.Length; ConfigIndex += 3)
                {
                    Text.AppendLine("\t\t<dict>");
                    Text.AppendLine("\t\t\t<key>UILaunchImageMinimumOSVersion</key>");
                    Text.AppendLine("\t\t\t<string>8.0</string>");
                    Text.AppendLine("\t\t\t<key>UILaunchImageName</key>");
                    Text.AppendLine(string.Format("\t\t\t<string>{0}</string>", IPhoneConfigs[ConfigIndex + 0]));
                    Text.AppendLine("\t\t\t<key>UILaunchImageOrientation</key>");
                    Text.AppendLine(string.Format("\t\t\t<string>{0}</string>", IPhoneConfigs[ConfigIndex + 1]));
                    Text.AppendLine("\t\t\t<key>UILaunchImageSize</key>");
                    Text.AppendLine(string.Format("\t\t\t<string>{0}</string>", IPhoneConfigs[ConfigIndex + 2]));
                    Text.AppendLine("\t\t</dict>");
                }

                // close it out
                Text.AppendLine("\t</array>");
            }
            Text.AppendLine("\t<key>UILaunchImages~ipad</key>");
            Text.AppendLine("\t<array>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>UILaunchImageMinimumOSVersion</key>");
            Text.AppendLine("\t\t\t<string>7.0</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageName</key>");
            Text.AppendLine("\t\t\t<string>Default-Landscape</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageOrientation</key>");
            Text.AppendLine("\t\t\t<string>Landscape</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageSize</key>");
            Text.AppendLine("\t\t\t<string>{768, 1024}</string>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t\t<dict>");
            Text.AppendLine("\t\t\t<key>UILaunchImageMinimumOSVersion</key>");
            Text.AppendLine("\t\t\t<string>7.0</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageName</key>");
            Text.AppendLine("\t\t\t<string>Default-Portrait</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageOrientation</key>");
            Text.AppendLine("\t\t\t<string>Portrait</string>");
            Text.AppendLine("\t\t\t<key>UILaunchImageSize</key>");
            Text.AppendLine("\t\t\t<string>{768, 1024}</string>");
            Text.AppendLine("\t\t</dict>");
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>CFBundleSupportedPlatforms</key>");
            Text.AppendLine("\t<array>");
            Text.AppendLine("\t\t<string>iPhoneOS</string>");
            Text.AppendLine("\t</array>");
            Text.AppendLine("\t<key>MinimumOSVersion</key>");
            Text.AppendLine(string.Format("\t<string>{0}</string>", MinVersion));
            if (bEnableFacebookSupport)
            {
                Text.AppendLine("\t<key>FacebookAppID</key>");
                Text.AppendLine(string.Format("\t<string>{0}</string>", FacebookAppID));
            }
            if (!string.IsNullOrEmpty(ExtraData))
            {
                ExtraData = ExtraData.Replace("\\n", "\n");
                foreach (string Line in ExtraData.Split("\r\n".ToCharArray()))
                {
                    if (!string.IsNullOrWhiteSpace(Line))
                    {
                        Text.AppendLine("\t" + Line);
                    }
                }
            }
            Text.AppendLine("</dict>");
            Text.AppendLine("</plist>");

            // write the file out
            if (!Directory.Exists(IntermediateDirectory))
            {
                Directory.CreateDirectory(IntermediateDirectory);
            }
            File.WriteAllText(PListFile, Text.ToString());
            if (BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Mac)
            {
                if (!Directory.Exists(AppDirectory))
                {
                    Directory.CreateDirectory(AppDirectory);
                }
                File.WriteAllText(AppDirectory + "/Info.plist", Text.ToString());
            }

            return(bSkipDefaultPNGs);
        }
	private ProjectImportExportInfo GenerateProjectImportExportInfo(string LocalizationConfigFile)
	{
		var ProjectImportExportInfo = new ProjectImportExportInfo();

		var LocalizationConfig = new ConfigCacheIni(new FileReference(LocalizationConfigFile));

		if (!LocalizationConfig.GetString("CommonSettings", "DestinationPath", out ProjectImportExportInfo.DestinationPath))
		{
			throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'DestinationPath', File: '{0}'", LocalizationConfigFile);
		}

		if (!LocalizationConfig.GetString("CommonSettings", "ManifestName", out ProjectImportExportInfo.ManifestName))
		{
			throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'ManifestName', File: '{0}'", LocalizationConfigFile);
		}

		if (!LocalizationConfig.GetString("CommonSettings", "ArchiveName", out ProjectImportExportInfo.ArchiveName))
		{
			throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'ArchiveName', File: '{0}'", LocalizationConfigFile);
		}

		if (!LocalizationConfig.GetString("CommonSettings", "PortableObjectName", out ProjectImportExportInfo.PortableObjectName))
		{
			throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'PortableObjectName', File: '{0}'", LocalizationConfigFile);
		}

		if (!LocalizationConfig.GetString("CommonSettings", "NativeCulture", out ProjectImportExportInfo.NativeCulture))
		{
			throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'NativeCulture', File: '{0}'", LocalizationConfigFile);
		}

		if (!LocalizationConfig.GetArray("CommonSettings", "CulturesToGenerate", out ProjectImportExportInfo.CulturesToGenerate))
		{
			throw new AutomationException("Failed to find a required config key! Section: 'CommonSettings', Key: 'CulturesToGenerate', File: '{0}'", LocalizationConfigFile);
		}

		if (!LocalizationConfig.GetBool("CommonSettings", "bUseCultureDirectory", out ProjectImportExportInfo.bUseCultureDirectory))
		{
			// bUseCultureDirectory is optional, default is true
			ProjectImportExportInfo.bUseCultureDirectory = true;
		}

		return ProjectImportExportInfo;
	}
示例#25
0
		/**
		 * Check for the default configuration
		 *
		 * return true if the project uses the default build config
		 */
		public override bool HasDefaultBuildConfig(UnrealTargetPlatform Platform, string ProjectPath)
		{
			ConfigCacheIni ProjIni = new ConfigCacheIni(Platform, "Engine", ProjectPath);
			ConfigCacheIni DefaultIni = new ConfigCacheIni(Platform, "Engine", null);

			string DefaultMinVersion = "IOS_6";
			string ProjectMinVersion = DefaultMinVersion;
			ProjIni.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "MinimumiOSVersion", out ProjectMinVersion);
			DefaultIni.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "MinimumiOSVersion", out DefaultMinVersion);
			if (DefaultMinVersion != ProjectMinVersion)
			{
				return false;
			}

			bool bDefaultBuild = true;
			bool bProjectBuild = true;
			ProjIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7", out bProjectBuild);
			DefaultIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7", out bDefaultBuild);
			if (bDefaultBuild != bProjectBuild)
			{
				return false;
			}
			ProjIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArm64", out bProjectBuild);
			DefaultIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArm64", out bDefaultBuild);
			if (bDefaultBuild != bProjectBuild)
			{
				return false;
			}
			ProjIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7S", out bProjectBuild);
			DefaultIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7S", out bDefaultBuild);
			if (bDefaultBuild != bProjectBuild)
			{
				return false;
			}
			ProjIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7", out bProjectBuild);
			DefaultIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7", out bDefaultBuild);
			if (bDefaultBuild != bProjectBuild)
			{
				return false;
			}
			ProjIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArm64", out bProjectBuild);
			DefaultIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArm64", out bDefaultBuild);
			if (bDefaultBuild != bProjectBuild)
			{
				return false;
			}
			ProjIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7S", out bProjectBuild);
			DefaultIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7S", out bDefaultBuild);
			if (bDefaultBuild != bProjectBuild)
			{
				return false;
			}

			// determine if we need to generate the dsym
			ProjIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bGenerateSYMFile", out bProjectBuild);
			DefaultIni.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bGenerateSYMFile", out bDefaultBuild);
			if (bDefaultBuild != bProjectBuild)
			{
				return false;
			}

			return base.HasDefaultBuildConfig(Platform, ProjectPath);
		}
示例#26
0
		private string GenerateManifest(string ProjectName, bool bIsForDistribution, bool bPackageDataInsideApk)
		{
			// ini file to get settings from
			ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.Android, "Engine", UnrealBuildTool.GetUProjectPath());
			string PackageName;
			Ini.GetString("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "PackageName", out PackageName);
			bool bEnableGooglePlaySupport;
			Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bEnableGooglePlaySupport", out bEnableGooglePlaySupport);
			string DepthBufferPreference;
			Ini.GetString("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "DepthBufferPreference", out DepthBufferPreference);
			int MinSDKVersion;
			Ini.GetInt32("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "MinSDKVersion", out MinSDKVersion);
			int StoreVersion;
			Ini.GetInt32("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "StoreVersion", out StoreVersion);
			string VersionDisplayName;
			Ini.GetString("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "VersionDisplayName", out VersionDisplayName);
			string Orientation;
			Ini.GetString("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "Orientation", out Orientation);
			string ExtraActivitySettings;
			Ini.GetString("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "ExtraActivitySettings", out ExtraActivitySettings);
			string ExtraApplicationSettings;
			Ini.GetString("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "ExtraApplicationSettings", out ExtraApplicationSettings);
			List<string> ExtraPermissions;
			Ini.GetArray("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "ExtraPermissions", out ExtraPermissions);
			bool bPackageForGearVR;
			Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bPackageForGearVR", out bPackageForGearVR);

			// replace some variables
			PackageName = PackageName.Replace("[PROJECT]", ProjectName);

			StringBuilder Text = new StringBuilder();
			Text.AppendLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
			Text.AppendLine("<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"");
			Text.AppendLine(string.Format("          package=\"{0}\"", PackageName));
			Text.AppendLine(string.Format("          android:versionCode=\"{0}\"", StoreVersion));
			Text.AppendLine(string.Format("          android:versionName=\"{0}\">", VersionDisplayName));
			Text.AppendLine("");

			Text.AppendLine("\t<!-- Application Definition -->");
			Text.AppendLine("\t<application android:label=\"@string/app_name\"");
			Text.AppendLine("\t             android:icon=\"@drawable/icon\"");
			Text.AppendLine("\t             android:hasCode=\"true\">");
			Text.AppendLine("\t\t<activity android:name=\"com.epicgames.ue4.GameActivity\"");
			Text.AppendLine("\t\t          android:label=\"@string/app_name\"");
			if (!bPackageForGearVR)
			{
				// normal application settings
				Text.AppendLine("\t\t          android:theme=\"@android:style/Theme.NoTitleBar.Fullscreen\"");
				Text.AppendLine("\t\t          android:configChanges=\"orientation|keyboardHidden\"");
			}
			else
			{
				// GearVR
				Text.AppendLine("\t\t          android:theme=\"@android:style/Theme.Black.NoTitleBar.Fullscreen\"");
				Text.AppendLine("\t\t          android:configChanges=\"screenSize|orientation|keyboardHidden|keyboard\"");
				if (bIsForDistribution)
				{
					Text.AppendLine("\t\t          android:excludeFromRecents=\"true\"");
				}
			}
			Text.AppendLine("\t\t          android:launchMode=\"singleTask\"");
			Text.AppendLine(string.Format("\t\t          android:screenOrientation=\"{0}\"", ConvertOrientationIniValue(Orientation)));
			Text.AppendLine(string.Format("\t\t          android:debuggable=\"{0}\">", bIsForDistribution ? "false" : "true"));
			Text.AppendLine("\t\t\t<meta-data android:name=\"android.app.lib_name\" android:value=\"UE4\"/>");
			Text.AppendLine("\t\t\t<intent-filter>");
			Text.AppendLine("\t\t\t\t<action android:name=\"android.intent.action.MAIN\" />");
			Text.AppendLine(string.Format("\t\t\t\t<category android:name=\"android.intent.category.{0}\" />", (bPackageForGearVR && bIsForDistribution) ? "INFO" : "LAUNCHER"));
			Text.AppendLine("\t\t\t</intent-filter>");
			if (!string.IsNullOrEmpty(ExtraActivitySettings))
			{
				ExtraActivitySettings = ExtraActivitySettings.Replace("\\n", "\n");
				foreach (string Line in ExtraActivitySettings.Split("\r\n".ToCharArray()))
				{
					Text.AppendLine("\t\t\t" + Line);
				}
			}
			Text.AppendLine("\t\t</activity>");
			Text.AppendLine(string.Format("\t\t<meta-data android:name=\"com.epicgames.ue4.GameActivity.DepthBufferPreference\" android:value=\"{0}\"/>", ConvertDepthBufferIniValue(DepthBufferPreference)));
			Text.AppendLine(string.Format("\t\t<meta-data android:name=\"com.epicgames.ue4.GameActivity.bPackageDataInsideApk\" android:value=\"{0}\"/>", bPackageDataInsideApk ? "true" : "false"));
			Text.AppendLine("\t\t<meta-data android:name=\"com.google.android.gms.games.APP_ID\"");
			Text.AppendLine("\t\t           android:value=\"@string/app_id\" />");
			Text.AppendLine("\t\t<meta-data android:name=\"com.google.android.gms.version\"");
			Text.AppendLine("\t\t           android:value=\"@integer/google_play_services_version\" />");
			Text.AppendLine("\t\t<activity android:name=\"com.google.android.gms.ads.AdActivity\"");
			Text.AppendLine("\t\t          android:configChanges=\"keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize\"/>");
			if (bPackageForGearVR)
			{
				Text.AppendLine("\t\t<meta-data android:name=\"com.samsung.android.vr.application.mode\"");
				Text.AppendLine("\t\t           android:value=\"vr_only\" />");
				Text.AppendLine("\t\t<activity android:name=\"com.oculusvr.vrlib.PlatformActivity\"");
				Text.AppendLine("\t\t          android:theme=\"@android:style/Theme.Black.NoTitleBar.Fullscreen\"");
				Text.AppendLine("\t\t          android:launchMode=\"singleTask\"");
				Text.AppendLine("\t\t          android:screenOrientation=\"landscape\"");
				Text.AppendLine("\t\t          android:configChanges=\"screenSize|orientation|keyboardHidden|keyboard\"/>");
			}
			if (!string.IsNullOrEmpty(ExtraApplicationSettings))
			{
				ExtraApplicationSettings = ExtraApplicationSettings.Replace("\\n", "\n");
				foreach (string Line in ExtraApplicationSettings.Split("\r\n".ToCharArray()))
				{
					Text.AppendLine("\t\t" + Line);
				}
			}
			Text.AppendLine("\t</application>");

			Text.AppendLine("");
			Text.AppendLine("\t<!-- Requirements -->");
			// need just the number part of the sdk
			Text.AppendLine(string.Format("\t<uses-sdk android:minSdkVersion=\"{0}\"/>", MinSDKVersion));
			Text.AppendLine("\t<uses-feature android:glEsVersion=\"0x00020000\" android:required=\"true\" />");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.INTERNET\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"com.android.vending.CHECK_LICENSE\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>");
            Text.AppendLine("\t<uses-permission android:name=\"android.permission.VIBRATE\"/>");
			Text.AppendLine("\t<uses-permission android:name=\"com.android.vending.BILLING\"/>");
//			Text.AppendLine("\t<uses-permission android:name=\"android.permission.DISABLE_KEYGUARD\"/>");
			if (bPackageForGearVR)
			{
				Text.AppendLine("\t<uses-permission android:name=\"android.permission.CAMERA\"/>");
				Text.AppendLine("\t<uses-feature android:name=\"android.hardware.camera\"/>");
				Text.AppendLine("\t<uses-feature android:name=\"android.hardware.usb.host\"/>");
			}
			if (ExtraPermissions != null)
			{
				foreach (string Permission in ExtraPermissions)
				{
					Text.AppendLine(string.Format("\t<uses-permission android:name=\"{0}\"/>", Permission));
				}
			}
			Text.AppendLine("</manifest>");
			return Text.ToString();
		}
示例#27
0
        public virtual void ParseProjectSettings()
        {
            ConfigCacheIni Ini = new ConfigCacheIni(GetPlatform(), "Engine", STBuildTool.GetUProjectPath());
            bool bValue = STBuildConfiguration.bCompileAPEX;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileApex", out bValue))
            {
                STBuildConfiguration.bCompileAPEX = bValue;
            }

            bValue = STBuildConfiguration.bCompileBox2D;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileBox2D", out bValue))
            {
                STBuildConfiguration.bCompileBox2D = bValue;
            }

            bValue = STBuildConfiguration.bCompileICU;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileICU", out bValue))
            {
                STBuildConfiguration.bCompileICU = bValue;
            }

            bValue = STBuildConfiguration.bCompileSimplygon;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSimplygon", out bValue))
            {
                STBuildConfiguration.bCompileSimplygon = bValue;
            }

            bValue = STBuildConfiguration.bCompileLeanAndMeanUE;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileLeanAndMeanUE", out bValue))
            {
                STBuildConfiguration.bCompileLeanAndMeanUE = bValue;
            }

            bValue = STBuildConfiguration.bIncludeADO;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bIncludeADO", out bValue))
            {
                STBuildConfiguration.bIncludeADO = bValue;
            }

            bValue = STBuildConfiguration.bCompileRecast;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileRecast", out bValue))
            {
                STBuildConfiguration.bCompileRecast = bValue;
            }

            bValue = STBuildConfiguration.bCompileSpeedTree;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileSpeedTree", out bValue))
            {
                STBuildConfiguration.bCompileSpeedTree = bValue;
            }

            bValue = STBuildConfiguration.bCompileWithPluginSupport;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileWithPluginSupport", out bValue))
            {
                STBuildConfiguration.bCompileWithPluginSupport = bValue;
            }

            bValue = STBuildConfiguration.bCompilePhysXVehicle;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompilePhysXVehicle", out bValue))
            {
                STBuildConfiguration.bCompilePhysXVehicle = bValue;
            }

            bValue = STBuildConfiguration.bCompileFreeType;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileFreeType", out bValue))
            {
                STBuildConfiguration.bCompileFreeType = bValue;
            }

            bValue = STBuildConfiguration.bCompileForSize;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileForSize", out bValue))
            {
                STBuildConfiguration.bCompileForSize = bValue;
            }

            bValue = STBuildConfiguration.bCompileCEF3;
            if (Ini.GetBool("/Script/BuildSettings.BuildSettings", "bCompileCEF3", out bValue))
            {
                STBuildConfiguration.bCompileCEF3 = bValue;
            }
        }
    public void UploadToS3(DeploymentContext SC)
    {
        ConfigCacheIni Ini = new ConfigCacheIni(SC.StageTargetPlatform.PlatformType, "Engine", Path.GetDirectoryName(SC.RawProjectPath));
        bool Upload = false;

        string KeyId = "";
        string AccessKey = "";
        string BucketName = "";
        string FolderName = "";

        if (Ini.GetBool("/Script/HTML5PlatformEditor.HTML5TargetSettings", "UploadToS3", out Upload))
        {
            if (!Upload)
                return;
        }
        else
        {
            return;
        }
        bool AmazonIdentity = Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3KeyID", out KeyId) &&
                                Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3SecretAccessKey", out AccessKey) &&
                                Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3BucketName", out BucketName) &&
                                Ini.GetString("/Script/HTML5PlatformEditor.HTML5TargetSettings", "S3FolderName", out FolderName);

        if ( !AmazonIdentity )
        {
            Log("Amazon S3 Incorrectly configured");
            return;
        }

        if ( FolderName == "" )
        {
            FolderName = SC.ShortProjectName;
        }

        List<Task> UploadTasks = new List<Task>();
        foreach(KeyValuePair<string, string> Entry in SC.ArchivedFiles)
        {
            FileInfo Info = new FileInfo(Entry.Key);
            UploadTasks.Add (Task.Factory.StartNew(() => UploadToS3Worker(Info,KeyId,AccessKey,BucketName,FolderName)));
        }

        Task.WaitAll(UploadTasks.ToArray());
        Log("Upload Tasks finished.");
    }
示例#29
0
		public override void SetUpProjectEnvironment(UnrealTargetPlatform InPlatform)
		{
			if (!bInitializedProject)
			{
				base.SetUpProjectEnvironment(InPlatform);

				// update the configuration based on the project file
				// look in ini settings for what platforms to compile for
				ConfigCacheIni Ini = new ConfigCacheIni(InPlatform, "Engine", UnrealBuildTool.GetUProjectPath());
				string MinVersion = "IOS_6";
				if (Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "MinimumiOSVersion", out MinVersion))
				{
					switch (MinVersion)
					{
						case "IOS_61":
							RunTimeIOSVersion = "6.1";
							break;
						case "IOS_7":
							RunTimeIOSVersion = "7.0";
							break;
						case "IOS_8":
							RunTimeIOSVersion = "8.0";
							break;
					}
				}

				bool biPhoneAllowed = true;
				bool biPadAllowed = true;
				Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsIPhone", out biPhoneAllowed);
				Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bSupportsIPad", out biPadAllowed);
				if (biPhoneAllowed && biPadAllowed)
				{
					RunTimeIOSDevices = "1,2";
				}
				else if (biPadAllowed)
				{
					RunTimeIOSDevices = "2";
				}
				else if (biPhoneAllowed)
				{
					RunTimeIOSDevices = "1";
				}

				List<string> ProjectArches = new List<string>();
				bool bBuild = true;
				if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7", out bBuild) && bBuild)
				{
					ProjectArches.Add("armv7");
				}
				if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArm64", out bBuild) && bBuild)
				{
					ProjectArches.Add("arm64");
				}
				if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bDevForArmV7S", out bBuild) && bBuild)
				{
					ProjectArches.Add("armv7s");
				}

				// force armv7 if something went wrong
				if (ProjectArches.Count == 0)
				{
					ProjectArches.Add("armv7");
				}
				NonShippingArchitectures = ProjectArches[0];
				for (int Index = 1; Index < ProjectArches.Count; ++Index)
				{
					NonShippingArchitectures += "," + ProjectArches[Index];
				}

				ProjectArches.Clear();
				if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7", out bBuild) && bBuild)
				{
					ProjectArches.Add("armv7");
				}
				if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArm64", out bBuild) && bBuild)
				{
					ProjectArches.Add("arm64");
				}
				if (Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bShipForArmV7S", out bBuild) && bBuild)
				{
					ProjectArches.Add("armv7s");
				}

				// force armv7 if something went wrong
				if (ProjectArches.Count == 0)
				{
					ProjectArches.Add("armv7");
					ProjectArches.Add("arm64");
				}
				ShippingArchitectures = ProjectArches[0];
				for (int Index = 1; Index < ProjectArches.Count; ++Index)
				{
					ShippingArchitectures += "," + ProjectArches[Index];
				}

				// determine if we need to generate the dsym
				Ini.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bGeneratedSYMFile", out BuildConfiguration.bGeneratedSYMFile);

				Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "AdditionalLinkerFlags", out AdditionalLinkerFlags);
				Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "AdditionalShippingLinkerFlags", out AdditionalShippingLinkerFlags);

				Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "MobileProvision", out MobileProvision);
				Ini.GetString("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "SigningCertificate", out SigningCertificate);

				bInitializedProject = true;
			}
		}
示例#30
0
        public Fuse(TargetInfo Target)
        {
            PublicIncludePaths.AddRange(
                new string[] {
                // ... add public include paths required here ...
            }
                );

            PrivateIncludePaths.AddRange(
                new string[] {
                "Developer/Fuse/Private",
                // ... add other private include paths required here ...
            }
                );

            PublicDependencyModuleNames.AddRange(
                new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "OnlineSubsystem"
                // ... add other public dependencies that you statically link with here ...
            }
                );

            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                // ... add private dependencies that you statically link with here ...
            }
                );

            DynamicallyLoadedModuleNames.AddRange(
                new string[]
            {
                // ... add any modules that your module loads dynamically here ...
            }
                );

            PrivateIncludePathModuleNames.AddRange(
                new string[]
            {
                "Settings"
            }
                );

            if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                // required frameworks
                PublicFrameworks.AddRange(
                    new string[]
                {
                    "Accelerate",
                    "AdSupport",
                    "AudioToolbox",
                    "AVFoundation",
                    "CoreGraphics",
                    "CoreLocation",
                    "CoreMedia",
                    "CoreTelephony",
                    "EventKit",
                    "EventKitUI",
                    "Foundation",
                    "GameKit",
                    "MediaPlayer",
                    "MessageUI",
                    "MobileCoreServices",
                    "QuartzCore",
                    "Social",
                    "StoreKit",
                    "SystemConfiguration",
                    "Twitter",
                    "UIKit"
                }
                    );

                // required libs
                PublicAdditionalLibraries.Add("sqlite3");
                PublicAdditionalLibraries.Add("xml2");
                PublicAdditionalLibraries.Add("z");

                // include Fuse SDK
                var CodeDir = Path.Combine(ModulePath, "..", "..", "lib", "FuseSDKiOS", "Code");
                PrivateIncludePaths.Add(CodeDir);
                PublicAdditionalLibraries.Add(Path.Combine(CodeDir, "libFuseSDK.a"));

                // collect settings
                ConfigCacheIni Ini = new ConfigCacheIni(UnrealTargetPlatform.IOS, "Engine", UnrealBuildTool.GetUProjectPath());

                bool bIncludeAdColony   = false;
                bool bIncludeAppLovin   = false;
                bool bIncludeHyprMX     = false;
                bool bIncludeAdMob      = false;
                bool bIncludeChartboost = false;
                bool bIncludeFacebook   = false;
                bool bIncludeiAd        = false;
                bool bIncludeMillennial = false;

                string SettingsPath = "/Script/Fuse.FuseSettings";
                Ini.GetBool(SettingsPath, "bIncludeAdColony", out bIncludeAdColony);
                Ini.GetBool(SettingsPath, "bIncludeAppLovin", out bIncludeAppLovin);
                Ini.GetBool(SettingsPath, "bIncludeHyprMX", out bIncludeHyprMX);
                Ini.GetBool(SettingsPath, "bIncludeAdMob", out bIncludeAdMob);
                Ini.GetBool(SettingsPath, "bIncludeChartboost", out bIncludeChartboost);
                Ini.GetBool(SettingsPath, "bIncludeFacebook", out bIncludeFacebook);
                Ini.GetBool(SettingsPath, "bIncludeiAd", out bIncludeiAd);
                Ini.GetBool(SettingsPath, "bIncludeMillennial", out bIncludeMillennial);

                // include optional adapters
                if (bIncludeAdColony)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(CodeDir, "libFuseAdapterAdcolony.a"));
                }

                if (bIncludeAppLovin)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(CodeDir, "libFuseAdapterAppLovin.a"));
                }

                if (bIncludeHyprMX)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(CodeDir, "libFuseAdapterHyprMX.a"));
                }

                var FuseExtrasDir = Path.Combine(ModulePath, "..", "..", "lib", "FuseSDKiOS", "Extras");
                var ExtrasiOSDir  = "../../lib/Extras/iOS";

                if (bIncludeAdMob)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir, "AdMob", "libFuseAdapterAdMob.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "GoogleMobileAds",
                            ExtrasiOSDir + "/AdMob/GoogleMobileAds.embeddedframework.zip"
                            )
                        );
                }

                if (bIncludeChartboost)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir, "ChartBoost", "libFuseAdapterChartBoost.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "Chartboost",
                            ExtrasiOSDir + "/Chartboost/Chartboost.embeddedframework.zip"
                            )
                        );
                }

                if (bIncludeFacebook)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir, "Facebook", "libFuseAdapterFacebook.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "FBAudienceNetwork",
                            ExtrasiOSDir + "/Facebook/FBAudienceNetwork.embeddedframework.zip"
                            )
                        );
                }

                if (bIncludeiAd)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir, "iAd", "libFuseAdapteriAd.a"));
                }

                if (bIncludeMillennial)
                {
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir, "Millennial", "libFuseAdapterMillennial.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "MillennialMedia",
                            ExtrasiOSDir + "/Millennial/MillennialMedia.embeddedframework.zip"
                            )
                        );
                    PublicAdditionalLibraries.Add(Path.Combine(FuseExtrasDir, "AdMob", "libFuseAdapterAdMob.a"));
                    PublicAdditionalFrameworks.Add(
                        new UEBuildFramework(
                            "SpeechKit",
                            ExtrasiOSDir + "/Millennial/SpeechKit.embeddedframework.zip"
                            )
                        );
                }
            }
        }
示例#31
0
		protected static bool DoProjectSettingsMatchDefault(UnrealTargetPlatform Platform, string ProjectPath, string Section, string[] BoolKeys, string[] IntKeys, string[] StringKeys)
		{
			ConfigCacheIni ProjIni = new ConfigCacheIni(Platform, "Engine", ProjectPath);
			ConfigCacheIni DefaultIni = new ConfigCacheIni(Platform, "Engine", null);

			// look at all bool values
			if (BoolKeys != null) foreach (string Key in BoolKeys)
			{
				bool Default = false, Project = false;
				DefaultIni.GetBool(Section, Key, out Default);
				ProjIni.GetBool(Section, Key, out Project);
				if (Default != Project)
				{
					Console.WriteLine(Key + " is not set to default. (" + Default + " vs. " + Project + ")");
					return false;
				}
			}

			// look at all int values
			if (IntKeys != null) foreach (string Key in IntKeys)
			{
				int Default = 0, Project = 0;
				DefaultIni.GetInt32(Section, Key, out Default);
				ProjIni.GetInt32(Section, Key, out Project);
				if (Default != Project)
				{
					Console.WriteLine(Key + " is not set to default. (" + Default + " vs. " + Project + ")");
					return false;
				}
			}

			// look for all string values
			if (StringKeys != null) foreach (string Key in StringKeys)
			{
				string Default = "", Project = "";
				DefaultIni.GetString(Section, Key, out Default);
				ProjIni.GetString(Section, Key, out Project);
				if (Default != Project)
				{
					Console.WriteLine(Key + " is not set to default. (" + Default + " vs. " + Project + ")");
					return false;
				}
			}

			// if we get here, we match all important settings
			return true;
		}