コード例 #1
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }

        string PackagePath       = Path.Combine(Path.GetDirectoryName(Params.RawProjectPath), "Binaries", "HTML5");
        string FinalDataLocation = Path.Combine(PackagePath, Params.ShortProjectName) + ".data";

        // copy the "Executable" to the archive directory
        string GameExe = Path.GetFileNameWithoutExtension(Params.ProjectGameExeFilename);

        if (Params.ClientConfigsToBuild[0].ToString() != "Development")
        {
            GameExe += "-HTML5-" + Params.ClientConfigsToBuild[0].ToString();
        }
        GameExe += ".js";

        // put the HTML file to the package directory
        string OutputFile = Path.Combine(PackagePath, (Params.ClientConfigsToBuild[0].ToString() != "Development" ? (Params.ShortProjectName + "-HTML5-" + Params.ClientConfigsToBuild[0].ToString()) : Params.ShortProjectName)) + ".html";

        // data file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation + ".gz"));
        // data file js driver
        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation + ".js.gz"));
        // main js file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".gz"));
        // memory init file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".mem.gz"));
        // symbols file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".symbols.gz"));
        // utilities
        SC.ArchiveFiles(PackagePath, Path.GetFileName("Utility.js.gz"));
        // landing page.
        SC.ArchiveFiles(PackagePath, Path.GetFileName(OutputFile));

        // Archive HTML5 Server and a Readme.
        var LaunchHelperPath = CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries/DotNET/");

        SC.ArchiveFiles(LaunchHelperPath, "HTML5LaunchHelper.exe");
        SC.ArchiveFiles(Path.Combine(CombinePaths(CmdEnv.LocalRoot, "Engine"), "Build", "HTML5"), "Readme.txt");
        SC.ArchiveFiles(PackagePath, Path.GetFileName(Path.Combine(PackagePath, "RunMacHTML5LaunchHelper.command")));

        if (HTMLPakAutomation.CanCreateMapPaks(Params))
        {
            // find all paks.
            string[] Files = Directory.GetFiles(Path.Combine(PackagePath, Params.ShortProjectName), "*", SearchOption.AllDirectories);
            foreach (string PakFile in Files)
            {
                var DestPak = PakFile.Replace(PackagePath, "");
                SC.ArchivedFiles.Add(PakFile, DestPak);
            }
        }

        UploadToS3(SC);
    }
コード例 #2
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }

        string PackagePath       = Path.Combine(Path.GetDirectoryName(Params.RawProjectPath), "Binaries", "HTML5");
        string FinalDataLocation = Path.Combine(PackagePath, Params.ShortProjectName) + ".data";

        // copy the "Executable" to the archive directory
        string GameExe = Path.GetFileNameWithoutExtension(Params.ProjectGameExeFilename);

        if (Params.ClientConfigsToBuild[0].ToString() != "Development")
        {
            GameExe += "-HTML5-" + Params.ClientConfigsToBuild[0].ToString();
        }
        GameExe += ".js";

        // put the HTML file to the package directory
        string OutputFile = Path.Combine(PackagePath, (Params.ClientConfigsToBuild[0].ToString() != "Development" ? (Params.ShortProjectName + "-HTML5-" + Params.ClientConfigsToBuild[0].ToString()) : Params.ShortProjectName)) + ".html";

        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation + ".js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".mem"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("json2.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("jStorage.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("moz_binarystring.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(OutputFile));
    }
コード例 #3
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            string ErrorString = String.Format("Android is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
            ErrorReporter.Error(ErrorString, (int)ErrorCodes.Error_OnlyOneTargetConfigurationSupported);
            throw new AutomationException(ErrorString);
        }

        string[] Architectures         = UnrealBuildTool.AndroidToolChain.GetAllArchitectures();
        string[] GPUArchitectures      = UnrealBuildTool.AndroidToolChain.GetAllGPUArchitectures();
        bool     bMakeSeparateApks     = UnrealBuildTool.Android.UEDeployAndroid.ShouldMakeSeparateApks();
        bool     bPackageDataInsideApk = UnrealBuildTool.Android.UEDeployAndroid.PackageDataInsideApk(false);

        bool bAddedOBB = false;

        foreach (string Architecture in Architectures)
        {
            foreach (string GPUArchitecture in GPUArchitectures)
            {
                string ApkName   = GetFinalApkName(Params, SC.StageExecutables[0], true, bMakeSeparateApks ? Architecture : "", bMakeSeparateApks ? GPUArchitecture : "");
                string ObbName   = GetFinalObbName(ApkName);
                string BatchName = GetFinalBatchName(ApkName, Params, bMakeSeparateApks ? Architecture : "", bMakeSeparateApks ? GPUArchitecture : "");

                // verify the files exist
                if (!FileExists(ApkName))
                {
                    string ErrorString = String.Format("ARCHIVE FAILED - {0} was not found", ApkName);
                    ErrorReporter.Error(ErrorString, (int)ErrorCodes.Error_AppNotFound);
                    throw new AutomationException(ErrorString);
                }
                if (!bPackageDataInsideApk && !FileExists(ObbName))
                {
                    string ErrorString = String.Format("ARCHIVE FAILED - {0} was not found", ObbName);
                    ErrorReporter.Error(ErrorString, (int)ErrorCodes.Error_ObbNotFound);
                    throw new AutomationException(ErrorString);
                }

                SC.ArchiveFiles(Path.GetDirectoryName(ApkName), Path.GetFileName(ApkName));
                if (!bPackageDataInsideApk && !bAddedOBB)
                {
                    bAddedOBB = true;
                    SC.ArchiveFiles(Path.GetDirectoryName(ObbName), Path.GetFileName(ObbName));
                }

                SC.ArchiveFiles(Path.GetDirectoryName(BatchName), Path.GetFileName(BatchName));
            }
        }
    }
コード例 #4
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }
        var TargetConfiguration = SC.StageTargetConfigurations[0];
        var ProjectIPA          = MakeIPAFileName(TargetConfiguration, Params);

        // verify the .ipa exists
        if (!FileExists(ProjectIPA))
        {
            throw new AutomationException("ARCHIVE FAILED - {0} was not found", ProjectIPA);
        }

        SC.ArchiveFiles(Path.GetDirectoryName(ProjectIPA), Path.GetFileName(ProjectIPA));
    }
コード例 #5
0
    public static void CreateArchiveManifest(ProjectParams Params, DeploymentContext SC)
    {
        if (!Params.Archive)
        {
            return;
        }
        var ThisPlatform = SC.StageTargetPlatform;

        ThisPlatform.GetFilesToArchive(Params, SC);

        //@todo add any archive meta data files as needed

        if (Params.ArchiveMetaData)
        {
            // archive the build.version file for extra info for testing, etc
            string BuildVersionFile = CombinePaths(SC.LocalRoot.FullName, "Engine", "Build", "Build.version");
            SC.ArchiveFiles(Path.GetDirectoryName(BuildVersionFile), Path.GetFileName(BuildVersionFile));
        }
    }
コード例 #6
0
    public static void CreateArchiveManifest(ProjectParams Params, DeploymentContext SC)
    {
        if (!Params.Archive)
        {
            return;
        }
        var ThisPlatform = SC.StageTargetPlatform;

        ThisPlatform.GetFilesToArchive(Params, SC);

        //@todo add any archive meta data files as needed

        if (Params.ArchiveMetaData)
        {
            // archive the build.properties for extra info for testing, etc
            string BuildPropertiesFile = CombinePaths(SC.LocalRoot, "Engine", "Build", "build.properties");
            SC.ArchiveFiles(Path.GetDirectoryName(BuildPropertiesFile), Path.GetFileName(BuildPropertiesFile));
        }
    }
コード例 #7
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }

        string PackagePath = Path.Combine(Path.GetDirectoryName(Params.RawProjectPath), "Binaries", "HTML5");
        string FinalDataLocation = Path.Combine(PackagePath, Params.ShortProjectName) + ".data";

        // copy the "Executable" to the archive directory
        string GameExe = Path.GetFileNameWithoutExtension(Params.ProjectGameExeFilename);
        if (Params.ClientConfigsToBuild[0].ToString() != "Development")
        {
            GameExe += "-HTML5-" + Params.ClientConfigsToBuild[0].ToString();
        }
        GameExe += ".js";

        // put the HTML file to the package directory
        string OutputFile = Path.Combine(PackagePath, (Params.ClientConfigsToBuild[0].ToString() != "Development" ? (Params.ShortProjectName + "-HTML5-" + Params.ClientConfigsToBuild[0].ToString()) : Params.ShortProjectName)) + ".html";

        // data file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation + ".gz"));
        // data file js driver
        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation + ".js.gz"));
        // main js file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".gz"));
        // memory init file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".mem.gz"));
        // symbols file
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".symbols.gz"));
        // utilities
        SC.ArchiveFiles(PackagePath, Path.GetFileName("Utility.js.gz"));
        // landing page.
        SC.ArchiveFiles(PackagePath, Path.GetFileName(OutputFile));

        // Archive HTML5 Server and a Readme.
        var LaunchHelperPath = CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries/DotNET/");
        SC.ArchiveFiles(LaunchHelperPath, "HTML5LaunchHelper.exe");
        SC.ArchiveFiles(Path.Combine(CombinePaths(CmdEnv.LocalRoot, "Engine"), "Build", "HTML5"), "Readme.txt");
        SC.ArchiveFiles(PackagePath, Path.GetFileName(Path.Combine(PackagePath, "RunMacHTML5LaunchHelper.command")));

        if (HTMLPakAutomation.CanCreateMapPaks(Params))
        {
        // find all paks.
            string[] Files = Directory.GetFiles(Path.Combine(PackagePath, Params.ShortProjectName), "*",SearchOption.AllDirectories);
            foreach(string PakFile in Files)
            {
                var DestPak = PakFile.Replace(PackagePath,"");
                SC.ArchivedFiles.Add(PakFile, DestPak);
            }
        }

        UploadToS3(SC);
    }
コード例 #8
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
	{
		if (SC.StageTargetConfigurations.Count != 1)
		{
			throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
		}
		var TargetConfiguration = SC.StageTargetConfigurations[0];
		var ProjectIPA = MakeIPAFileName( TargetConfiguration, Params );

		// verify the .ipa exists
		if (!FileExists(ProjectIPA))
		{
			throw new AutomationException("ARCHIVE FAILED - {0} was not found", ProjectIPA);
		}

		ConfigCacheIni PlatformGameConfig;
		bool bXCArchive = false;
		if (Params.EngineConfigs.TryGetValue(SC.StageTargetPlatform.PlatformType, out PlatformGameConfig))
		{
			PlatformGameConfig.GetBool("/Script/IOSRuntimeSettings.IOSRuntimeSettings", "bGenerateXCArchive", out bXCArchive);
		}

		if (bXCArchive && Utils.IsRunningOnMono)
		{
			// Always put the archive in the current user's Library/Developer/Xcode/Archives path
			WindowsIdentity id = WindowsIdentity.GetCurrent(); 
			string ArchivePath = "/Users/" + id.Name + "/Library/Developer/Xcode/Archives";
			if (!DirectoryExists(ArchivePath))
			{
				CreateDirectory(ArchivePath);
			}

			Console.WriteLine("Generating xc archive package in " + ArchivePath);

			string ArchiveName = Path.Combine(ArchivePath, Path.GetFileNameWithoutExtension(ProjectIPA) + ".xcarchive");
			if (!DirectoryExists(ArchiveName))
			{
				CreateDirectory(ArchiveName);
			}
			DeleteDirectoryContents(ArchiveName);

			// create the Products archive folder
			CreateDirectory(Path.Combine(ArchiveName, "Products", "Applications"));

			// copy in the application
			string AppName = Path.GetFileNameWithoutExtension(ProjectIPA) + ".app";
			using (ZipFile Zip = new ZipFile(ProjectIPA))
			{
				Zip.ExtractAll(ArchivePath, ExtractExistingFileAction.OverwriteSilently);

				List<string> Dirs = new List<string>(Directory.EnumerateDirectories(Path.Combine(ArchivePath, "Payload"), "*.app"));
				AppName = Dirs[0].Substring(Dirs[0].LastIndexOf(UnrealBuildTool.BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac ? "\\" : "/") + 1);
				CopyDirectory_NoExceptions(Path.Combine(ArchivePath, "Payload", AppName), Path.Combine(ArchiveName, "Products", "Applications", AppName));
			}

			// copy in the dSYM if found
			var ProjectExe = MakeExeFileName( TargetConfiguration, Params );
			string dSYMName = (SC.IsCodeBasedProject ? Path.GetFileNameWithoutExtension(ProjectExe) : "UE4Game") + ".dSYM";
			string dSYMSrcPath = Path.Combine(SC.ProjectBinariesFolder, dSYMName);

			if(DirectoryExists(new string[] { dSYMSrcPath } ))
			{
				// Create the dsyms archive folder
				CreateDirectory(Path.Combine(ArchiveName, "dSYMs"));
				string dSYMDstPath = Path.Combine(ArchiveName, "dSYMs", dSYMName);
				// /Volumes/MacOSDrive1/pfEpicWorkspace/Dev-Platform/Samples/Sandbox/PlatformShowcase/Binaries/IOS/PlatformShowcase.dSYM/Contents/Resources/DWARF/PlatformShowcase
				CopyFile_NoExceptions(Path.Combine(dSYMSrcPath, "Contents", "Resources", "DWARF", SC.IsCodeBasedProject ? Path.GetFileNameWithoutExtension(ProjectExe) : "UE4Game"), dSYMDstPath);
			}
			else if (File.Exists(dSYMSrcPath))
			{
				// Create the dsyms archive folder
				CreateDirectory(Path.Combine(ArchiveName, "dSYMs"));
				string dSYMDstPath = Path.Combine(ArchiveName, "dSYMs", dSYMName);
				CopyFile_NoExceptions(dSYMSrcPath, dSYMDstPath);
			}

			// copy in the bitcode symbol maps if found
			string[] bcmapfiles = Directory.GetFiles(SC.ProjectBinariesFolder, "*.bcsymbolmap");
			if(bcmapfiles.Length > 0)
			{
				// Create the dsyms archive folder
				CreateDirectory(Path.Combine(ArchiveName, "BCSymbolMaps"));
				foreach (string symbolSrcFilePath in bcmapfiles)
				{
					string symbolLeafFileName = Path.GetFileName(symbolSrcFilePath);
					string bcDstFilePath = Path.Combine(ArchiveName, "BCSymbolMaps", symbolLeafFileName);
					CopyFile_NoExceptions(symbolSrcFilePath, bcDstFilePath);
				}
			}

			// get the settings from the app plist file
			string AppPlist = Path.Combine(ArchiveName, "Products", "Applications", AppName, "Info.plist");
			string OldPListData = File.Exists(AppPlist) ? File.ReadAllText(AppPlist) : "";

			// bundle identifier
			int index = OldPListData.IndexOf("CFBundleIdentifier");
			index = OldPListData.IndexOf("<string>", index) + 8;
			int length = OldPListData.IndexOf("</string>", index) - index;
			string BundleIdentifier = OldPListData.Substring(index, length);

			// short version
			index = OldPListData.IndexOf("CFBundleShortVersionString");
			index = OldPListData.IndexOf("<string>", index) + 8;
			length = OldPListData.IndexOf("</string>", index) - index;
			string BundleShortVersion = OldPListData.Substring(index, length);

			// bundle version
			index = OldPListData.IndexOf("CFBundleVersion");
			index = OldPListData.IndexOf("<string>", index) + 8;
			length = OldPListData.IndexOf("</string>", index) - index;
			string BundleVersion = OldPListData.Substring(index, length);

			// date we made this
			const string Iso8601DateTimeFormat = "yyyy-MM-ddTHH:mm:ssZ";
			string TimeStamp = DateTime.UtcNow.ToString(Iso8601DateTimeFormat);

			// create the archive plist
			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>ApplicationProperties</key>");
			Text.AppendLine("\t<dict>");
			Text.AppendLine("\t\t<key>ApplicationPath</key>");
			Text.AppendLine("\t\t<string>Applications/" + AppName + "</string>");
			Text.AppendLine("\t\t<key>CFBundleIdentifier</key>");
			Text.AppendLine(string.Format("\t\t<string>{0}</string>", BundleIdentifier));
			Text.AppendLine("\t\t<key>CFBundleShortVersionString</key>");
			Text.AppendLine(string.Format("\t\t<string>{0}</string>", BundleShortVersion));
			Text.AppendLine("\t\t<key>CFBundleVersion</key>");
			Text.AppendLine(string.Format("\t\t<string>{0}</string>", BundleVersion));
			Text.AppendLine("\t\t<key>SigningIdentity</key>");
			Text.AppendLine(string.Format("\t\t<string>{0}</string>", Params.Certificate));
			Text.AppendLine("\t</dict>");
			Text.AppendLine("\t<key>ArchiveVersion</key>");
			Text.AppendLine("\t<integer>2</integer>");
			Text.AppendLine("\t<key>CreationDate</key>");
			Text.AppendLine(string.Format("\t<date>{0}</date>", TimeStamp));
			Text.AppendLine("\t<key>DefaultToolchainInfo</key>");
			Text.AppendLine("\t<dict>");
			Text.AppendLine("\t\t<key>DisplayName</key>");
			Text.AppendLine("\t\t<string>Xcode 7.3 Default</string>");
			Text.AppendLine("\t\t<key>Identifier</key>");
			Text.AppendLine("\t\t<string>com.apple.dt.toolchain.XcodeDefault</string>");
			Text.AppendLine("\t</dict>");
			Text.AppendLine("\t<key>Name</key>");
			Text.AppendLine(string.Format("\t<string>{0}</string>", SC.ShortProjectName));
			Text.AppendLine("\t<key>SchemeName</key>");
			Text.AppendLine(string.Format("\t<string>{0}</string>", SC.ShortProjectName));
			Text.AppendLine("</dict>");
			Text.AppendLine("</plist>");
			File.WriteAllText(Path.Combine(ArchiveName, "Info.plist"), Text.ToString());
		}
		else if (bXCArchive && !Utils.IsRunningOnMono)
		{
			LogWarning("Can not produce an XCArchive on windows");
		}
		SC.ArchiveFiles(Path.GetDirectoryName(ProjectIPA), Path.GetFileName(ProjectIPA));
	}
コード例 #9
0
    // --------------------------------------------------------------------------------
    // ArchiveCommand.Automation.cs

    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }

        // copy to archive directory
        string PackagePath = Path.Combine(Path.GetDirectoryName(Params.RawProjectPath.FullName), "Binaries", "HTML5");

        string UE4GameBasename      = Path.GetFileNameWithoutExtension(Params.GetProjectExeForPlatform(UnrealTargetPlatform.HTML5).ToString());
        string ProjectBasename      = Params.ShortProjectName;
        string ProjectConfiguration = Params.ClientConfigsToBuild[0].ToString();

        if (ProjectConfiguration != "Development")
        {
            UE4GameBasename += "-HTML5-" + ProjectConfiguration;
            ProjectBasename += "-HTML5-" + ProjectConfiguration;
        }

        SC.ArchiveFiles(PackagePath, UE4GameBasename + ".wasm");                        // MAIN game code
        SC.ArchiveFiles(PackagePath, UE4GameBasename + ".js");                          // MAIN js file (emscripten)
        SC.ArchiveFiles(PackagePath, UE4GameBasename + ".js.symbols");                  // symbols file
        SC.ArchiveFiles(PackagePath, "Utility.js");                                     // utilities
        SC.ArchiveFiles(PackagePath, ProjectBasename + ".data");                        // DATA file
        SC.ArchiveFiles(PackagePath, ProjectBasename + ".data.js");                     // DATA file js driver (emscripten)
        SC.ArchiveFiles(PackagePath, ProjectBasename + ".UE4.js");                      // UE4 js file
        SC.ArchiveFiles(PackagePath, ProjectBasename + ".css");                         // UE4 css file
        SC.ArchiveFiles(PackagePath, ProjectBasename + ".html");                        // landing page.

        // Archive HTML5 Server and a Readme.
        SC.ArchiveFiles(CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries/DotNET/"), "HTML5LaunchHelper.exe");
        SC.ArchiveFiles(CombinePaths(CmdEnv.LocalRoot, "Engine/Build/HTML5/"), "Readme.txt");
        SC.ArchiveFiles(PackagePath, "RunMacHTML5LaunchHelper.command");
        SC.ArchiveFiles(PackagePath, ".htaccess");

        if (Compressed)
        {
            SC.ArchiveFiles(PackagePath, UE4GameBasename + ".wasmgz");
            SC.ArchiveFiles(PackagePath, UE4GameBasename + ".jsgz");
            SC.ArchiveFiles(PackagePath, UE4GameBasename + ".js.symbolsgz");
            SC.ArchiveFiles(PackagePath, "Utility.jsgz");
            SC.ArchiveFiles(PackagePath, ProjectBasename + ".datagz");
            SC.ArchiveFiles(PackagePath, ProjectBasename + ".data.jsgz");
            SC.ArchiveFiles(PackagePath, ProjectBasename + ".UE4.jsgz");
            SC.ArchiveFiles(PackagePath, ProjectBasename + ".cssgz");
        }
        else
        {
            // nuke old compressed files to prevent using stale files
            File.Delete(UE4GameBasename + ".wasmgz");
            File.Delete(UE4GameBasename + ".jsgz");
            File.Delete(UE4GameBasename + ".js.symbolsgz");
            File.Delete("Utility.jsgz");
            File.Delete(ProjectBasename + ".datagz");
            File.Delete(ProjectBasename + ".data.jsgz");
            File.Delete(ProjectBasename + ".UE4.jsgz");
            File.Delete(ProjectBasename + ".cssgz");
        }

        if (HTMLPakAutomation.CanCreateMapPaks(Params))
        {
            // find all paks.
            string[] Files = Directory.GetFiles(Path.Combine(PackagePath, Params.ShortProjectName), "*", SearchOption.AllDirectories);
            foreach (string PakFile in Files)
            {
                SC.ArchivedFiles.Add(PakFile, Path.GetFileName(PakFile));
            }
        }

        UploadToS3(SC, ProjectBasename + ".html");
    }
コード例 #10
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }

        string PackagePath = Path.Combine(Path.GetDirectoryName(Params.RawProjectPath), "Binaries", "HTML5");
        string FinalDataLocation = Path.Combine(PackagePath, Params.ShortProjectName) + ".data";

        // copy the "Executable" to the archive directory
        string GameExe = Path.GetFileNameWithoutExtension(Params.ProjectGameExeFilename);
        if (Params.ClientConfigsToBuild[0].ToString() != "Development")
        {
            GameExe += "-HTML5-" + Params.ClientConfigsToBuild[0].ToString();
        }
        GameExe += ".js";

        // put the HTML file to the package directory
        string OutputFile = Path.Combine(PackagePath, (Params.ClientConfigsToBuild[0].ToString() != "Development" ? (Params.ShortProjectName + "-HTML5-" + Params.ClientConfigsToBuild[0].ToString()) : Params.ShortProjectName)) + ".html";

        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation + ".js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".mem"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("json2.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("jstorage.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("moz_binarystring.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(OutputFile));
    }
コード例 #11
0
		/// <summary>
		/// Get the files to deploy, specific to this platform, typically binaries
		/// </summary>
		/// <param name="SC">Deployment Context</param>
		public virtual void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
		{
			SC.ArchiveFiles(SC.StageDirectory);
		}
コード例 #12
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("Android is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }
        var TargetConfiguration = SC.StageTargetConfigurations[0];

        string ApkName = GetFinalApkName(Params, SC.StageExecutables[0], true);
        string ObbName = GetFinalObbName(ApkName);
        string BatchName = GetFinalBatchName(ApkName, Params);

        // verify the files exist
        if (!FileExists(ApkName))
        {
            throw new AutomationException("ARCHIVE FAILED - {0} was not found", ApkName);
        }
        if (!FileExists(ObbName))
        {
            throw new AutomationException("ARCHIVE FAILED - {0} was not found", ObbName);
        }

        SC.ArchiveFiles(Path.GetDirectoryName(ApkName), Path.GetFileName(ApkName));
        SC.ArchiveFiles(Path.GetDirectoryName(ObbName), Path.GetFileName(ObbName));
        SC.ArchiveFiles(Path.GetDirectoryName(BatchName), Path.GetFileName(BatchName));
    }
コード例 #13
0
	public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
	{
		if (SC.StageTargetConfigurations.Count != 1)
		{
			throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
		}
		var TargetConfiguration = SC.StageTargetConfigurations[0];
		var ProjectIPA = MakeIPAFileName( TargetConfiguration, Params );

		// verify the .ipa exists
		if (!FileExists(ProjectIPA))
		{
			throw new AutomationException("ARCHIVE FAILED - {0} was not found", ProjectIPA);
		}

		SC.ArchiveFiles(Path.GetDirectoryName(ProjectIPA), Path.GetFileName(ProjectIPA));
	}
コード例 #14
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }
        var TargetConfiguration = SC.StageTargetConfigurations[0];

        string ProjectGameExeFilename = Params.ProjectGameExeFilename;
        if (UnrealBuildTool.ExternalExecution.GetRuntimePlatform () == UnrealTargetPlatform.Mac)
        {
            ProjectGameExeFilename = CombinePaths (Path.GetDirectoryName(Params.RawProjectPath), "Binaries", "IOS", Path.GetFileName (Params.ProjectGameExeFilename));
        }
        var ProjectIPA = MakeIPAFileName( TargetConfiguration, ProjectGameExeFilename );
        if (!Params.IsCodeBasedProject)
        {
            ProjectIPA = ProjectIPA.Replace("UE4Game", Params.ShortProjectName);
        }

        // verify the .ipa exists
        if (!FileExists(ProjectIPA))
        {
            throw new AutomationException("ARCHIVE FAILED - {0} was not found", ProjectIPA);
        }

        SC.ArchiveFiles(Path.GetDirectoryName(ProjectIPA), Path.GetFileName(ProjectIPA));
    }
コード例 #15
0
ファイル: Platform.cs プロジェクト: lopezmateos/unreal-test
 /// <summary>
 /// Get the files to deploy, specific to this platform, typically binaries
 /// </summary>
 /// <param name="SC">Deployment Context</param>
 public virtual void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
 {
     SC.ArchiveFiles(SC.StageDirectory);
 }
コード例 #16
0
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }

        string PackagePath     = Path.Combine(Path.GetDirectoryName(Params.RawProjectPath.FullName), "Binaries", "HTML5");
        string ProjectDataName = Params.ShortProjectName + ".data";

        // copy the "Executable" to the archive directory
        string GameBasename = Path.GetFileNameWithoutExtension(Params.ProjectGameExeFilename);

        if (Params.ClientConfigsToBuild[0].ToString() != "Development")
        {
            GameBasename += "-HTML5-" + Params.ClientConfigsToBuild[0].ToString();
        }
        string GameExe = GameBasename + ".js";

        // put the HTML file to the package directory
        string OutputFilename = (Params.ClientConfigsToBuild[0].ToString() != "Development" ?
                                 (Params.ShortProjectName + "-HTML5-" + Params.ClientConfigsToBuild[0].ToString()) :
                                 Params.ShortProjectName) + ".html";

        // data file
        SC.ArchiveFiles(PackagePath, ProjectDataName);
        // data file js driver
        SC.ArchiveFiles(PackagePath, ProjectDataName + ".js");
        if (targetingWasm)
        {
            // main game code
            SC.ArchiveFiles(PackagePath, GameBasename + ".wasm");
            // main js file
            SC.ArchiveFiles(PackagePath, GameExe);
        }
        else
        {
            // memory init file
            SC.ArchiveFiles(PackagePath, GameExe + ".mem");
            // maingame code
            SC.ArchiveFiles(PackagePath, GameBasename + ".asm.js");
            // main js file
            SC.ArchiveFiles(PackagePath, GameBasename + "_asm.js");
        }
        // symbols file
        SC.ArchiveFiles(PackagePath, GameExe + ".symbols");
        // utilities
        SC.ArchiveFiles(PackagePath, "Utility.js");
        // landing page.
        SC.ArchiveFiles(PackagePath, OutputFilename);

        // Archive HTML5 Server and a Readme.
        SC.ArchiveFiles(CombinePaths(CmdEnv.LocalRoot, "Engine/Binaries/DotNET/"), "HTML5LaunchHelper.exe");
        SC.ArchiveFiles(CombinePaths(CmdEnv.LocalRoot, "Engine/Build/HTML5/"), "Readme.txt");
        SC.ArchiveFiles(PackagePath, "RunMacHTML5LaunchHelper.command");
        SC.ArchiveFiles(PackagePath, ".htaccess");

        if (Compressed)
        {
            SC.ArchiveFiles(PackagePath, ProjectDataName + "gz");
            SC.ArchiveFiles(PackagePath, ProjectDataName + ".jsgz");
            SC.ArchiveFiles(PackagePath, GameExe + "gz");
            if (targetingWasm)
            {
                SC.ArchiveFiles(PackagePath, GameBasename + ".wasmgz");
            }
            else
            {
                SC.ArchiveFiles(PackagePath, GameExe + ".memgz");
                SC.ArchiveFiles(PackagePath, GameExe + ".asm.jsgz");
            }
            SC.ArchiveFiles(PackagePath, GameExe + ".symbolsgz");
            SC.ArchiveFiles(PackagePath, "Utility.jsgz");
        }
        else
        {
            // nuke old compressed files to prevent using stale files
            File.Delete(ProjectDataName + "gz");
            File.Delete(ProjectDataName + ".jsgz");
            File.Delete(GameExe + "gz");
            File.Delete(GameBasename + ".wasmgz");
            File.Delete(GameExe + ".memgz");
            File.Delete(GameExe + ".symbolsgz");
            File.Delete("Utility.jsgz");
        }

        if (HTMLPakAutomation.CanCreateMapPaks(Params))
        {
            // find all paks.
            string[] Files = Directory.GetFiles(Path.Combine(PackagePath, Params.ShortProjectName), "*", SearchOption.AllDirectories);
            foreach (string PakFile in Files)
            {
                SC.ArchivedFiles.Add(PakFile, Path.GetFileName(PakFile));
            }
        }

        UploadToS3(SC, OutputFilename);
    }
コード例 #17
0
ファイル: HTML5Platform.Automation.cs プロジェクト: mymei/UE4
    public override void GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
    {
        if (SC.StageTargetConfigurations.Count != 1)
        {
            throw new AutomationException("iOS is currently only able to package one target configuration at a time, but StageTargetConfigurations contained {0} configurations", SC.StageTargetConfigurations.Count);
        }

        string PackagePath = Path.Combine(Path.GetDirectoryName(Params.RawProjectPath), "Binaries", "HTML5");
        string FinalDataLocation = Path.Combine(PackagePath, Params.ShortProjectName) + ".data";

        // copy the "Executable" to the archive directory
        string GameExe = Path.GetFileNameWithoutExtension(Params.ProjectGameExeFilename);
        if (Params.ClientConfigsToBuild[0].ToString() != "Development")
        {
            GameExe += "-HTML5-" + Params.ClientConfigsToBuild[0].ToString();
        }
        GameExe += ".js";

        // put the HTML file to the package directory
        string OutputFile = Path.Combine(PackagePath, (Params.ClientConfigsToBuild[0].ToString() != "Development" ? (Params.ShortProjectName + "-HTML5-" + Params.ClientConfigsToBuild[0].ToString()) : Params.ShortProjectName)) + ".html";

        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(FinalDataLocation + ".js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".mem"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(GameExe + ".symbols"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("json2.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("jStorage.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName("moz_binarystring.js"));
        SC.ArchiveFiles(PackagePath, Path.GetFileName(OutputFile));

        if (HTMLPakAutomation.CanCreateMapPaks(Params))
        {
            // find all paks.
            string[] Files = Directory.GetFiles(Path.Combine(PackagePath, Params.ShortProjectName), "*",SearchOption.AllDirectories);
            foreach(string PakFile in Files)
            {
                var DestPak = PakFile.Replace(PackagePath,"");
                SC.ArchivedFiles.Add(PakFile, DestPak);
            }
        }
    }