当前位置: 首页>>代码示例>>C#>>正文


C# DeploymentContext.ArchiveFiles方法代码示例

本文整理汇总了C#中DeploymentContext.ArchiveFiles方法的典型用法代码示例。如果您正苦于以下问题:C# DeploymentContext.ArchiveFiles方法的具体用法?C# DeploymentContext.ArchiveFiles怎么用?C# DeploymentContext.ArchiveFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DeploymentContext的用法示例。


在下文中一共展示了DeploymentContext.ArchiveFiles方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateArchiveManifest

    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));
        }
    }
开发者ID:colwalder,项目名称:unrealengine,代码行数:19,代码来源:ArchiveCommand.Automation.cs

示例2: GetFilesToArchive

    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);
    }
开发者ID:colwalder,项目名称:unrealengine,代码行数:55,代码来源:HTML5Platform.Automation.cs

示例3: GetFilesToArchive


//.........这里部分代码省略.........
			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));
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:101,代码来源:IOSPlatform.Automation.cs

示例4: GetFilesToArchive

    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));
    }
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:30,代码来源:HTML5Platform.Automation.cs

示例5: GetFilesToArchive

		/// <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);
		}
开发者ID:unrealengine47,项目名称:UnrealEngine4,代码行数:8,代码来源:Platform.cs

示例6: GetFilesToArchive

	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));
	}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:17,代码来源:IOSPlatform.Automation.cs

示例7: GetFilesToArchive

    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));
    }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:27,代码来源:IOSPlatform.Automation.cs

示例8: GetFilesToArchive

    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));
    }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:26,代码来源:AndroidPlatform.Automation.cs

示例9: GetFilesToArchive

    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);
            }
        }
    }
开发者ID:mymei,项目名称:UE4,代码行数:42,代码来源:HTML5Platform.Automation.cs


注:本文中的DeploymentContext.ArchiveFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。