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


C# DeploymentContext.StageFiles方法代码示例

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


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

示例1: GetFilesToDeployOrStage

    public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
    {
        SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "*", false, null, CommandUtils.CombinePaths(SC.RelativeProjectRootForStage, "Binaries", SC.PlatformDir), false);

        if (SC.bStageCrashReporter)
        {
            SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "CrashReportClient", false);
        }
    }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:9,代码来源:LinuxPlatform.Automation.cs

示例2: StageExecutable

	private int StageExecutable(string Ext, DeploymentContext SC, string InPath, string Wildcard = "*", bool bRecursive = true, string[] ExcludeWildcard = null, string NewPath = null, bool bAllowNone = false, StagedFileType InStageFileType = StagedFileType.NonUFS, string NewName = null)
	{
		int Result = SC.StageFiles(InStageFileType, InPath, Wildcard + Ext, bRecursive, ExcludeWildcard, NewPath, bAllowNone, true, (NewName == null) ? null : (NewName + Ext));
		if (Result > 0)
		{
			SC.StageFiles(StagedFileType.DebugNonUFS, InPath, Wildcard + "pdb", bRecursive, ExcludeWildcard, NewPath, true, true, (NewName == null) ? null : (NewName + "pdb"));
			SC.StageFiles(StagedFileType.DebugNonUFS, InPath, Wildcard + "map", bRecursive, ExcludeWildcard, NewPath, true, true, (NewName == null) ? null : (NewName + "map"));
		}
		return Result;
	}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:10,代码来源:WinPlatform.Automation.cs

示例3: GetFilesToDeployOrStage

    public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
    {
        List<string> Exes = GetExecutableNames(SC);
        foreach (var Exe in Exes)
        {
            if (Exe.StartsWith(CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir)))
            {
                SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir, System.IO.Path.GetFileNameWithoutExtension(Exe) + ".app"));
            }
            else if (Exe.StartsWith(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir)))
            {
                SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, System.IO.Path.GetFileNameWithoutExtension(Exe) + ".app"));
            }
        }

        // Copy the splash screen, Mac specific
        SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Splash"), "Splash.bmp", false, null, null, true);
    }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:18,代码来源:MacPlatform.Automation.cs

示例4: GetFilesToDeployOrStage

	public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
	{
		List<string> Exes = GetExecutableNames(SC);
		foreach (var Exe in Exes)
		{
			string AppBundlePath = "";
			if (Exe.StartsWith(CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir)))
			{
				AppBundlePath = CombinePaths(SC.ShortProjectName, "Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app");
				StageAppBundle(SC, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"), AppBundlePath);
			}
			else if (Exe.StartsWith(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir)))
			{
				AppBundlePath = CombinePaths("Engine/Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app");

				string AbsoluteBundlePath = CombinePaths (SC.LocalRoot, AppBundlePath);
				// ensure the ue4game binary exists, if applicable
				if (!SC.IsCodeBasedProject && !Directory.Exists(AbsoluteBundlePath))
				{
					Log("Failed to find app bundle " + AbsoluteBundlePath);
					AutomationTool.ErrorReporter.Error("Stage Failed.", (int)AutomationTool.ErrorCodes.Error_MissingExecutable);
					throw new AutomationException("Could not find app bundle {0}. You may need to build the UE4 project with your target configuration and platform.", AbsoluteBundlePath);
				}

				StageAppBundle(SC, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"), AppBundlePath);
			}

			if (!string.IsNullOrEmpty(AppBundlePath))
			{
				SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Build/Mac"), "Application.icns", false, null, CombinePaths(AppBundlePath, "Contents/Resources"), true);
			}
		}

		// Copy the splash screen, Mac specific
		SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Splash"), "Splash.bmp", false, null, null, true);

		// CEF3 files
		if(Params.bUsesCEF3)
		{
			SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries/ThirdParty/CEF3/Mac/"), "*", true, null, null, true);
			string UnrealCEFSubProcessPath = CombinePaths("Engine/Binaries", SC.PlatformDir, "UnrealCEFSubProcess.app");
			StageAppBundle(SC, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UnrealCEFSubProcess.app"), UnrealCEFSubProcessPath);
		}
	}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:44,代码来源:MacPlatform.Automation.cs

示例5: GetFilesToDeployOrStage

	public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
	{
		// Engine non-ufs (binaries)

		if (SC.bStageCrashReporter)
		{
			StageExecutable("exe", SC, CommandUtils.CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir), "CrashReportClient.");
		}

		// Stage all the build products
		foreach(TargetReceipt Receipt in SC.StageTargetReceipts)
		{
			SC.StageBuildProductsFromReceipt(Receipt);
		}

		// Copy the splash screen, windows specific
		SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Splash"), "Splash.bmp", false, null, null, true);

		// Stage the bootstrap executable
		if(!Params.NoBootstrapExe)
		{
			foreach(TargetReceipt Receipt in SC.StageTargetReceipts)
			{
				BuildProduct Executable = Receipt.BuildProducts.FirstOrDefault(x => x.Type == BuildProductType.Executable);
				if(Executable != null)
				{
					// only create bootstraps for executables
					if (SC.NonUFSStagingFiles.ContainsKey(Executable.Path) && Path.GetExtension(Executable.Path) == ".exe")
					{
						string BootstrapArguments = "";
						if (!SC.IsCodeBasedProject && !ShouldStageCommandLine(Params, SC))
						{
							BootstrapArguments = String.Format("..\\..\\..\\{0}\\{0}.uproject", SC.ShortProjectName);
						}

						string BootstrapExeName;
						if(SC.StageTargetConfigurations.Count > 1)
						{
							BootstrapExeName = Path.GetFileName(Executable.Path);
						}
						else if(Params.IsCodeBasedProject)
						{
							BootstrapExeName = Receipt.GetProperty("TargetName", SC.ShortProjectName) + ".exe";
						}
						else
						{
							BootstrapExeName = SC.ShortProjectName + ".exe";
						}

						StageBootstrapExecutable(SC, BootstrapExeName, Executable.Path, SC.NonUFSStagingFiles[Executable.Path], BootstrapArguments);
					}
				}
			}
		}
	}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:55,代码来源:WinPlatform.Automation.cs

示例6: GetFilesToDeployOrStage

    public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
    {
        List<string> Exes = GetExecutableNames(SC);
        foreach (var Exe in Exes)
        {
            if (Exe.StartsWith(CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir)))
            {
                StageAppBundle(SC, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"), CombinePaths(SC.ShortProjectName, "Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"));
            }
            else if (Exe.StartsWith(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir)))
            {
                StageAppBundle(SC, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"), CombinePaths("Engine/Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"));
            }
        }

        // Copy the splash screen, Mac specific
        SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Splash"), "Splash.bmp", false, null, null, true);

        SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Content/Localization/ICU"), "*", true, null, null, false, !Params.UsePak(SC.StageTargetPlatform));
    }
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:20,代码来源:MacPlatform.Automation.cs

示例7: StageAppBundle

	private void StageAppBundle(DeploymentContext SC, StagedFileType InStageFileType, string InPath, string NewName)
	{
		if (InStageFileType != StagedFileType.DebugNonUFS)
		{
			// Files with DebugFileExtensions should always be DebugNonUFS
			List<string> DebugExtentionWildCards = new List<string>();
			foreach(string DebugExtention in GetDebugFileExtentions())
			{
				string ExtensionWildcard = "*" + DebugExtention;
				DebugExtentionWildCards.Add(ExtensionWildcard);
				SC.StageFiles(StagedFileType.DebugNonUFS, InPath, ExtensionWildcard, true, null, NewName, true, true, null);
			}

			// Also stage the non-debug files, excluding the debug ones staged above
			SC.StageFiles(InStageFileType, InPath, "*", true, DebugExtentionWildCards.ToArray(), NewName, false, true, null);
		}
		else
		{
			// We are already DebugNonUFS, no need to do any special-casing
			SC.StageFiles(InStageFileType, InPath, "*", true, null, NewName, false, true, null);
		}
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:22,代码来源:MacPlatform.Automation.cs

示例8: GetFilesToDeployOrStage

	public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
	{
		base.GetFilesToDeployOrStage(Params, SC);
		
		if(Params.Prereqs)
		{
			string InstallerRelativePath = CombinePaths("Engine", "Extras", "Redist", "en-us");
			SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, InstallerRelativePath), "UE4PrereqSetup_x86.exe", false, null, InstallerRelativePath);
		}
	}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:10,代码来源:WinPlatform.Automation.cs

示例9: StageBootstrapExecutable

	void StageBootstrapExecutable(DeploymentContext SC, string ExeName, string TargetFile, string StagedRelativeTargetPath, string StagedArguments)
	{
		// create a temp script file location
		string IntermediateDir = CombinePaths(SC.ProjectRoot, "Intermediate", "Staging");
		string IntermediateFile = CombinePaths(IntermediateDir, ExeName);
		InternalUtils.SafeCreateDirectory(IntermediateDir);

		// make sure slashes are good
		StagedRelativeTargetPath = StagedRelativeTargetPath.Replace("\\", "/");

		// make contents
		StringBuilder Script = new StringBuilder();
		string EOL = "\n";
		Script.Append("#!/bin/sh" + EOL);
		Script.AppendFormat("chmod +x {0}" + EOL, StagedRelativeTargetPath);
		Script.AppendFormat("{0} {1} [email protected]" + EOL, StagedRelativeTargetPath, StagedArguments);

		// write out the 
		File.WriteAllText(IntermediateFile, Script.ToString());

		if (Utils.IsRunningOnMono)
		{
			var Result = CommandUtils.Run("sh", string.Format("-c 'chmod +x \\\"{0}\\\"'", IntermediateFile));
			if (Result.ExitCode != 0)
			{
				throw new AutomationException(string.Format("Failed to chmod \"{0}\"", IntermediateFile));
			}
		}

		SC.StageFiles(StagedFileType.NonUFS, IntermediateDir, ExeName, false, null, "");
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:31,代码来源:LinuxPlatform.Automation.cs

示例10: StageLocalizationDataForCulture

    private static int StageLocalizationDataForCulture(DeploymentContext SC, string CultureName, string SourceDirectory, string DestinationDirectory = null, bool bRemap = true)
    {
        int FilesAdded = 0;

        CultureName = CultureName.Replace('-', '_');

        string[] LocaleTags = CultureName.Replace('-', '_').Split('_');

        List<string> PotentialParentCultures = new List<string>();
        
        if (LocaleTags.Length > 0)
        {
            if (LocaleTags.Length > 1 && LocaleTags.Length > 2)
            {
                PotentialParentCultures.Add(string.Join("_", LocaleTags[0], LocaleTags[1], LocaleTags[2]));
            }
            if (LocaleTags.Length > 2)
            {
                PotentialParentCultures.Add(string.Join("_", LocaleTags[0], LocaleTags[2]));
            }
            if (LocaleTags.Length > 1)
            {
                PotentialParentCultures.Add(string.Join("_", LocaleTags[0], LocaleTags[1]));
            }
            PotentialParentCultures.Add(LocaleTags[0]);
        }

        string[] FoundDirectories = CommandUtils.FindDirectories(true, "*", false, new string[] { SourceDirectory });
        foreach (string FoundDirectory in FoundDirectories)
        {
            string DirectoryName = CommandUtils.GetLastDirectoryName(FoundDirectory);
            string CanonicalizedPotentialCulture = DirectoryName.Replace('-', '_');

            if (PotentialParentCultures.Contains(CanonicalizedPotentialCulture))
            {
                FilesAdded += SC.StageFiles(StagedFileType.UFS, CombinePaths(SourceDirectory, DirectoryName), "*.locres", true, null, DestinationDirectory != null ? CombinePaths(DestinationDirectory, DirectoryName) : null, true, bRemap);
            }
        }

        return FilesAdded;
    }
开发者ID:frobro98,项目名称:UnrealSource,代码行数:41,代码来源:CopyBuildToStagingDirectory.Automation.cs

示例11: GetFilesToDeployOrStage

    public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
    {
        if (Params.StageNonMonolithic)
        {
            if (SC.DedicatedServer)
            {
                if (SC.StageTargetConfigurations.Contains(UnrealTargetConfiguration.Development))
                {
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UE4Server.app"));
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4Server-" + SC.ShortProjectName + ".dylib");
                }
                if (SC.StageTargetConfigurations.Contains(UnrealTargetConfiguration.Test))
                {
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UE4Server-Mac-Test.app"));
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4Server-" + SC.ShortProjectName + "-Mac-Test.dylib");
                }
                if (SC.StageTargetConfigurations.Contains(UnrealTargetConfiguration.Shipping))
                {
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UE4Server-Mac-Shipping.app"));
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4Server-" + SC.ShortProjectName + "-Mac-Shipping.dylib");
                }

                SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Plugins"), "UE4Server-*.dylib", true);
                SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins"), "UE4Server-*.dylib", true);
            }
            else
            {
                if (SC.StageTargetConfigurations.Contains(UnrealTargetConfiguration.Development))
                {
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UE4.app"));
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4-" + SC.ShortProjectName + ".dylib");
                }
                if (SC.StageTargetConfigurations.Contains(UnrealTargetConfiguration.Test))
                {
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UE4-Mac-Test.app"));
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4-" + SC.ShortProjectName + "-Mac-Test.dylib");
                }
                if (SC.StageTargetConfigurations.Contains(UnrealTargetConfiguration.Shipping))
                {
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UE4-Mac-Shipping.app"));
                    SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir), "UE4-" + SC.ShortProjectName + "-Mac-Shipping.dylib");
                }

                SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Plugins"), "UE4-*.dylib", true);
                SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins"), "UE4-*.dylib", true, null, null, true);
            }
        }
        else
        {
            // the first app is the "main" one, the rest are marked as debug files for exclusion from chunking/distribution
            StagedFileType WorkingFileType = StagedFileType.NonUFS;

            List<string> Exes = GetExecutableNames(SC);
            foreach (var Exe in Exes)
            {
                string AppBundlePath = "";
                if (Exe.StartsWith(CombinePaths(SC.RuntimeProjectRootDir, "Binaries", SC.PlatformDir)))
                {
                    AppBundlePath = CombinePaths(SC.ShortProjectName, "Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app");
                    StageAppBundle(SC, WorkingFileType, CombinePaths(SC.ProjectRoot, "Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"), AppBundlePath);
                }
                else if (Exe.StartsWith(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir)))
                {
                    AppBundlePath = CombinePaths("Engine/Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app");

                    string AbsoluteBundlePath = CombinePaths (SC.LocalRoot, AppBundlePath);
                    // ensure the ue4game binary exists, if applicable
                    if (!SC.IsCodeBasedProject && !Directory.Exists(AbsoluteBundlePath) && !SC.bIsCombiningMultiplePlatforms)
                    {
                        LogError("Failed to find app bundle " + AbsoluteBundlePath);
                        throw new AutomationException(ErrorCodes.Error_MissingExecutable, "Could not find app bundle {0}. You may need to build the UE4 project with your target configuration and platform.", AbsoluteBundlePath);
                    }

                    StageAppBundle(SC, WorkingFileType, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app"), AppBundlePath);
                }

                if (!string.IsNullOrEmpty(AppBundlePath))
                {
                    SC.StageFiles(WorkingFileType, CombinePaths(SC.ProjectRoot, "Build/Mac"), "Application.icns", false, null, CombinePaths(AppBundlePath, "Contents/Resources"), true);

                    if (Params.bUsesSteam)
                    {
                        SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Source/ThirdParty/Steamworks/Steamv132/sdk/redistributable_bin/osx32"), "libsteam_api.dylib", false, null, CombinePaths(AppBundlePath, "Contents/MacOS"), true);
                    }
                }

                // the first app is the "main" one, the rest are marked as debug files for exclusion from chunking/distribution
                WorkingFileType = StagedFileType.DebugNonUFS;
            }
        }

        if (SC.bStageCrashReporter)
        {
            string CrashReportClientPath = CombinePaths("Engine/Binaries", SC.PlatformDir, "CrashReportClient.app");
            StageAppBundle(SC, StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "CrashReportClient.app"), CrashReportClientPath);
        }

        // Copy the splash screen, Mac specific
        SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Splash"), "Splash.bmp", false, null, null, true);

//.........这里部分代码省略.........
开发者ID:colwalder,项目名称:unrealengine,代码行数:101,代码来源:MacPlatform.Automation.cs

示例12: CreateStagingManifest

    public static void CreateStagingManifest(ProjectParams Params, DeploymentContext SC)
    {
        if (!Params.Stage)
        {
            return;
        }
        var ThisPlatform = SC.StageTargetPlatform;

        ThisPlatform.GetFilesToDeployOrStage(Params, SC);

        // Get the build.properties file
        // this file needs to be treated as a UFS file for casing, but NonUFS for being put into the .pak file
        // @todo: Maybe there should be a new category - UFSNotForPak
        string BuildPropertiesPath = CombinePaths(SC.LocalRoot, "Engine/Build");
        if (SC.StageTargetPlatform.DeployLowerCaseFilenames(true))
        {
            BuildPropertiesPath = BuildPropertiesPath.ToLower();
        }
        SC.StageFiles(StagedFileType.NonUFS, BuildPropertiesPath, "build.properties", false, null, null, true);

        // move the UE4Commandline.txt file to the root of the stage
        // this file needs to be treated as a UFS file for casing, but NonUFS for being put into the .pak file
        // @todo: Maybe there should be a new category - UFSNotForPak
        string CommandLineFile = "UE4CommandLine.txt";
        if (SC.StageTargetPlatform.DeployLowerCaseFilenames(true))
        {
            CommandLineFile = CommandLineFile.ToLower();
        }
        SC.StageFiles(StagedFileType.NonUFS, GetIntermediateCommandlineDir(SC), CommandLineFile, false, null, "", true, false);

        if (!Params.CookOnTheFly && !Params.SkipCookOnTheFly) // only stage the UFS files if we are not using cook on the fly
        {
            ConfigCacheIni PlatformGameConfig = new ConfigCacheIni(SC.StageTargetPlatform.PlatformType, "Game", CommandUtils.GetDirectoryName(Params.RawProjectPath));

            // Initialize cultures to stage.
            List<string> CulturesToStage = null;

            // Use parameters if provided.
            if (Params.CulturesToCook != null && Params.CulturesToCook.Count > 0)
            {
                CulturesToStage = Params.CulturesToCook;
            }

            // Use configuration if otherwise lacking cultures to stage.
            if (CulturesToStage == null || CulturesToStage.Count == 0)
            {
                if (PlatformGameConfig != null)
                {
                    PlatformGameConfig.GetArray("/Script/UnrealEd.ProjectPackagingSettings", "CulturesToStage", out CulturesToStage);
                }
            }

            // Error if no cultures have been provided.
            if (CulturesToStage == null || CulturesToStage.Count == 0)
            {
                throw new AutomationException("No cultures were specified for cooking and packaging. This will lead to fatal errors when launching. Specify culture codes via commandline (-CookCultures=) or using project packaging settings (+CulturesToStage).");
            }

            // Engine ufs (content)
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Config"), "*", true, null, null, false, !Params.UsePak(SC.StageTargetPlatform)); // TODO: Exclude localization data generation config files.

            if (Params.bUsesSlate)
            {
                if (Params.bUsesSlateEditorStyle)
                {
                    SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Content/Editor/Slate"), "*", true, null, null, false, !Params.UsePak(SC.StageTargetPlatform));
                }
                SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Content/Slate"), "*", true, null, null, false, !Params.UsePak(SC.StageTargetPlatform));
                SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Content/Slate"), "*", true, null, CombinePaths(SC.RelativeProjectRootForStage, "Content/Slate"), true, !Params.UsePak(SC.StageTargetPlatform));
            }
            foreach (string Culture in CulturesToStage)
            {
                StageLocalizationDataForCulture(SC, Culture, CombinePaths(SC.LocalRoot, "Engine/Content/Localization/Engine"), null, !Params.UsePak(SC.StageTargetPlatform));
            }
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Plugins"), "*.uplugin", true, null, null, true, !Params.UsePak(SC.StageTargetPlatform));

            // Game ufs (content)

            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot), "*.uproject", false, null, CombinePaths(SC.RelativeProjectRootForStage), true, !Params.UsePak(SC.StageTargetPlatform));
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Config"), "*", true, null, CombinePaths(SC.RelativeProjectRootForStage, "Config"), true, !Params.UsePak(SC.StageTargetPlatform)); // TODO: Exclude localization data generation config files.
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Plugins"), "*.uplugin", true, null, null, true, !Params.UsePak(SC.StageTargetPlatform));
            foreach (string Culture in CulturesToStage)
            {
                StageLocalizationDataForCulture(SC, Culture, CombinePaths(SC.ProjectRoot, "Content/Localization/Game"), CombinePaths(SC.RelativeProjectRootForStage, "Content/Localization/Game"), !Params.UsePak(SC.StageTargetPlatform));
            }

            // Stage any additional UFS and NonUFS paths specified in the project ini files; these dirs are relative to the game content directory
            if (PlatformGameConfig != null)
            {
                var ProjectContentRoot = CombinePaths(SC.ProjectRoot, "Content");
                var StageContentRoot = CombinePaths(SC.RelativeProjectRootForStage, "Content");
                List<string> ExtraUFSDirs;
                if (PlatformGameConfig.GetArray("/Script/UnrealEd.ProjectPackagingSettings", "DirectoriesToAlwaysStageAsUFS", out ExtraUFSDirs))
                {
                    // Each string has the format '(Path="TheDirToStage")'
                    foreach (var PathStr in ExtraUFSDirs)
                    {
                        var PathParts = PathStr.Split('"');
                        if (PathParts.Length == 3)
                        {
//.........这里部分代码省略.........
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:101,代码来源:CopyBuildToStagingDirectory.Automation.cs

示例13: CreateStagingManifest

    public static void CreateStagingManifest(ProjectParams Params, DeploymentContext SC)
    {
        if (!Params.Stage)
        {
            return;
        }
        var ThisPlatform = SC.StageTargetPlatform;

        ThisPlatform.GetFilesToDeployOrStage(Params, SC);

        // Get the build.properties file
        // this file needs to be treated as a UFS file for casing, but NonUFS for being put into the .pak file
        // @todo: Maybe there should be a new category - UFSNotForPak
        string BuildPropertiesPath = CombinePaths(SC.LocalRoot, "Engine/Build");
        if (SC.StageTargetPlatform.DeployLowerCaseFilenames(true))
        {
            BuildPropertiesPath = BuildPropertiesPath.ToLower();
        }
        SC.StageFiles(StagedFileType.NonUFS, BuildPropertiesPath, "build.properties", false, null, null, true);

        // move the UE4Commandline.txt file to the root of the stage
        // this file needs to be treated as a UFS file for casing, but NonUFS for being put into the .pak file
        // @todo: Maybe there should be a new category - UFSNotForPak
        string CommandLineFile = "UE4CommandLine.txt";
        if (SC.StageTargetPlatform.DeployLowerCaseFilenames(true))
        {
            CommandLineFile = CommandLineFile.ToLower();
        }
        SC.StageFiles(StagedFileType.NonUFS, GetIntermediateCommandlineDir(SC), CommandLineFile, false, null, "", true, false);

        if (!Params.CookOnTheFly && !Params.SkipCookOnTheFly) // only stage the UFS files if we are not using cook on the fly
        {
            // Engine ufs (content)
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Config"), "*", true, null, null, false, !Params.Pak);

            if (Params.bUsesSlate && SC.IsCodeBasedProject)
            {
                if (Params.bUsesSlateEditorStyle)
                {
                    SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Content/Editor/Slate"), "*", true, null, null, false, !Params.Pak);
                }
                SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Content/Slate"), "*", true, null, null, false, !Params.Pak);
                SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Content/Slate"), "*", true, null, CombinePaths(SC.RelativeProjectRootForStage, "Content/Slate"), true, !Params.Pak);

            }
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Content/Localization/Engine"), "*.locres", true, null, null, false, !Params.Pak);
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine/Plugins"), "*.uplugin", true, null, null, true, !Params.Pak);

            // Game ufs (content)
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot), "*.uproject", false, null, CombinePaths(SC.RelativeProjectRootForStage), true, !Params.Pak);
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Config"), "*", true, null, CombinePaths(SC.RelativeProjectRootForStage, "Config"), true, !Params.Pak);
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Plugins"), "*.uplugin", true, null, null, true, !Params.Pak);

            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Content/Localization/Engine"), "*.locres", true, null, CombinePaths(SC.RelativeProjectRootForStage, "Content/Localization/Engine"), true, !Params.Pak);

            StagedFileType StagedFileTypeForMovies = StagedFileType.NonUFS;
            if (Params.FileServer)
            {
                // UFS is required when using a file server
                StagedFileTypeForMovies = StagedFileType.UFS;
            }

            SC.StageFiles(StagedFileTypeForMovies, CombinePaths(SC.ProjectRoot, "Content/Movies"), "*", true, null, CombinePaths(SC.RelativeProjectRootForStage, "Content/Movies"), true, !Params.Pak);

            // eliminate the sand box
            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Saved", "Sandboxes", "Cooked-" + SC.CookPlatform), "*", true, null, "", true, !Params.Pak);
        }
    }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:68,代码来源:CopyBuildToStagingDirectory.Automation.cs

示例14: StageAppLocalDependencies

	public void StageAppLocalDependencies(ProjectParams Params, DeploymentContext SC, string PlatformDir)
	{
		string BaseAppLocalDependenciesPath = Path.IsPathRooted(Params.AppLocalDirectory) ? CombinePaths(Params.AppLocalDirectory, PlatformDir) : CombinePaths(SC.ProjectRoot, Params.AppLocalDirectory, PlatformDir);
		if (Directory.Exists(BaseAppLocalDependenciesPath))
		{
			string ProjectBinaryPath = new DirectoryReference(SC.ProjectBinariesFolder).MakeRelativeTo(new DirectoryReference(CombinePaths(SC.ProjectRoot, "..")));
			string EngineBinaryPath = CombinePaths("Engine", "Binaries", PlatformDir);

			Log("Copying AppLocal dependencies from {0} to {1} and {2}", BaseAppLocalDependenciesPath, ProjectBinaryPath, EngineBinaryPath);

			foreach (string DependencyDirectory in Directory.EnumerateDirectories(BaseAppLocalDependenciesPath))
			{	
				SC.StageFiles(StagedFileType.NonUFS, DependencyDirectory, "*", false, null, ProjectBinaryPath);
				SC.StageFiles(StagedFileType.NonUFS, DependencyDirectory, "*", false, null, EngineBinaryPath);
			}
		}
		else
		{
			throw new AutomationException("Unable to deploy AppLocalDirectory dependencies. No such path: {0}", BaseAppLocalDependenciesPath);
		}
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:21,代码来源:WinPlatform.Automation.cs

示例15: GetFilesToDeployOrStage

	public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
	{
		// Engine non-ufs (binaries)

		if (SC.bStageCrashReporter)
		{
			string ReceiptFileName = TargetReceipt.GetDefaultPath(UnrealBuildTool.UnrealBuildTool.EngineDirectory.FullName, "CrashReportClient", SC.StageTargetPlatform.PlatformType, UnrealTargetConfiguration.Shipping, null);
			if(File.Exists(ReceiptFileName))
			{
				TargetReceipt Receipt = TargetReceipt.Read(ReceiptFileName);
				Receipt.ExpandPathVariables(UnrealBuildTool.UnrealBuildTool.EngineDirectory, (Params.RawProjectPath == null)? UnrealBuildTool.UnrealBuildTool.EngineDirectory : Params.RawProjectPath.Directory);
				SC.StageBuildProductsFromReceipt(Receipt, true, false);
			}
		}

		// Stage all the build products
		foreach(StageTarget Target in SC.StageTargets)
		{
			SC.StageBuildProductsFromReceipt(Target.Receipt, Target.RequireFilesExist, Params.bTreatNonShippingBinariesAsDebugFiles);
		}

		// Copy the splash screen, windows specific
		SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Content/Splash"), "Splash.bmp", false, null, null, true);

		// Stage the bootstrap executable
		if(!Params.NoBootstrapExe)
		{
			foreach(StageTarget Target in SC.StageTargets)
			{
				BuildProduct Executable = Target.Receipt.BuildProducts.FirstOrDefault(x => x.Type == BuildProductType.Executable);
				if(Executable != null)
				{
					// only create bootstraps for executables
					string FullExecutablePath = Path.GetFullPath(Executable.Path);
					if (SC.NonUFSStagingFiles.ContainsKey(FullExecutablePath) && Path.GetExtension(FullExecutablePath) == ".exe")
					{
						string BootstrapArguments = "";
						if (!SC.IsCodeBasedProject && !ShouldStageCommandLine(Params, SC))
						{
							BootstrapArguments = String.Format("..\\..\\..\\{0}\\{0}.uproject", SC.ShortProjectName);
						}

						string BootstrapExeName;
						if(SC.StageTargetConfigurations.Count > 1)
						{
							BootstrapExeName = Path.GetFileName(FullExecutablePath);
						}
						else if(Params.IsCodeBasedProject)
						{
							BootstrapExeName = Target.Receipt.TargetName + ".exe";
						}
						else
						{
							BootstrapExeName = SC.ShortProjectName + ".exe";
						}

						foreach (string StagePath in SC.NonUFSStagingFiles[FullExecutablePath])
						{
							StageBootstrapExecutable(SC, BootstrapExeName, FullExecutablePath, StagePath, BootstrapArguments);
						}
					}
				}
			}
		}
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:65,代码来源:WinPlatform.Automation.cs


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