本文整理汇总了C#中DeploymentContext.StageRuntimeDependenciesFromReceipt方法的典型用法代码示例。如果您正苦于以下问题:C# DeploymentContext.StageRuntimeDependenciesFromReceipt方法的具体用法?C# DeploymentContext.StageRuntimeDependenciesFromReceipt怎么用?C# DeploymentContext.StageRuntimeDependenciesFromReceipt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeploymentContext
的用法示例。
在下文中一共展示了DeploymentContext.StageRuntimeDependenciesFromReceipt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateStagingManifest
public static void CreateStagingManifest(ProjectParams Params, DeploymentContext SC)
{
if (!Params.Stage)
{
return;
}
var ThisPlatform = SC.StageTargetPlatform;
LogConsole("Creating Staging Manifest...");
if (Params.HasDLCName)
{
string DLCName = Params.DLCName;
// Making a plugin, grab the binaries too
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName), "*.uplugin", true, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "libUE4-*.so", true, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "UE4-*.dll", true, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "libUE4Server-*.so", true, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "UE4Server-*.dll", true, null, null, true);
// Put all of the cooked dir into the staged dir
// Dedicated server cook doesn't save shaders so no Engine dir is created
if ((!SC.DedicatedServer) && (!Params.DLCIncludeEngineContent))
{
if (Directory.Exists(CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Saved", "Cooked", SC.CookPlatform, "Engine")))
{
SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Saved", "Cooked", SC.CookPlatform), "*", true, new[] { CommandUtils.CombinePaths("Engine", "*") }, "", true, !Params.UsePak(SC.StageTargetPlatform));
}
}
SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Saved", "Cooked", SC.CookPlatform), "*", true, new[] { "AssetRegistry.bin" }, "", true, !Params.UsePak(SC.StageTargetPlatform));
return;
}
ThisPlatform.GetFilesToDeployOrStage(Params, SC);
// Stage any extra runtime dependencies from the receipts
foreach(TargetReceipt Receipt in SC.StageTargetReceipts)
{
SC.StageRuntimeDependenciesFromReceipt(Receipt);
}
// 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.ToLowerInvariant();
}
SC.StageFiles(StagedFileType.NonUFS, BuildPropertiesPath, "Build.version", 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.ToLowerInvariant();
}
SC.StageFiles(StagedFileType.NonUFS, GetIntermediateCommandlineDir(SC), CommandLineFile, false, null, "", true, false);
ConfigCacheIni PlatformGameConfig = new ConfigCacheIni(SC.StageTargetPlatform.PlatformType, "Game", CommandUtils.GetDirectoryName(Params.RawProjectPath));
var ProjectContentRoot = CombinePaths(SC.ProjectRoot, "Content");
var StageContentRoot = CombinePaths(SC.RelativeProjectRootForStage, "Content");
if (!Params.CookOnTheFly && !Params.SkipCookOnTheFly) // only stage the UFS files if we are not using cook on the fly
{
// Initialize internationalization preset.
string InternationalizationPreset = null;
// Use parameters if provided.
if (string.IsNullOrEmpty(InternationalizationPreset))
{
InternationalizationPreset = Params.InternationalizationPreset;
}
// Use configuration if otherwise lacking an internationalization preset.
if (string.IsNullOrEmpty(InternationalizationPreset))
{
if (PlatformGameConfig != null)
{
PlatformGameConfig.GetString("/Script/UnrealEd.ProjectPackagingSettings", "InternationalizationPreset", out InternationalizationPreset);
}
}
// Error if no preset has been provided.
if (string.IsNullOrEmpty(InternationalizationPreset))
{
throw new AutomationException("No internationalization preset was specified for packaging. This will lead to fatal errors when launching. Specify preset via commandline (-I18NPreset=) or project packaging settings (InternationalizationPreset).");
}
// Initialize cultures to stage.
List<string> CulturesToStage = null;
//.........这里部分代码省略.........
示例2: CreateStagingManifest
public static void CreateStagingManifest(ProjectParams Params, DeploymentContext SC)
{
if (!Params.Stage)
{
return;
}
var ThisPlatform = SC.StageTargetPlatform;
Log("Creating Staging Manifest...");
if (Params.HasDLCName)
{
string DLCName = Params.DLCName;
// Making a plugin, grab the binaries too
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName), "*.uplugin", false, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "libUE4-*.so", true, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "UE4-*.dll", true, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "libUE4Server-*.so", true, null, null, true);
SC.StageFiles(StagedFileType.NonUFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Binaries"), "UE4Server-*.dll", true, null, null, true);
// Put all of the cooked dir into the staged dir
string PlatformCookDir = CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Saved", "Cooked", SC.CookPlatform);
string[] ExcludeWildCards = {"AssetRegistry.bin"};
// Stage any loose files in the root folder
SC.StageFiles(StagedFileType.UFS, PlatformCookDir, "*", false, ExcludeWildCards, SC.RelativeProjectRootForStage, true, !Params.UsePak(SC.StageTargetPlatform));
// Stage each sub directory separately so that we can skip Engine if need be
string[] SubDirs = CommandUtils.FindDirectories(true, "*", false, new string[] { PlatformCookDir });
foreach (string SubDir in SubDirs)
{
// Dedicated server cook doesn't save shaders so no Engine dir is created
if ((!SC.DedicatedServer) && (!Params.DLCIncludeEngineContent) && CommandUtils.GetLastDirectoryName(SubDir).Equals("Engine", StringComparison.InvariantCultureIgnoreCase))
{
continue;
}
// SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Plugins", DLCName, "Saved", "Cooked", SC.CookPlatform), "*", true, new[] { CommandUtils.CombinePaths("Engine", "*") }, "", true, !Params.UsePak(SC.StageTargetPlatform));
string MountPoint = SubDir.Substring(PlatformCookDir.Length);
if ( MountPoint.StartsWith("\\") || MountPoint.StartsWith("/") )
{
MountPoint = MountPoint.Substring(1);
}
SC.StageFiles(StagedFileType.UFS, SubDir, "*", true, ExcludeWildCards, MountPoint, true, !Params.UsePak(SC.StageTargetPlatform));
//SC.StageFiles(StagedFileType.UFS, SubDir, "*", true, ExcludeWildCards, SC.RelativeProjectRootForStage, true, !Params.UsePak(SC.StageTargetPlatform));
}
return;
}
ThisPlatform.GetFilesToDeployOrStage(Params, SC);
// Stage any extra runtime dependencies from the receipts
foreach(StageTarget Target in SC.StageTargets)
{
SC.StageRuntimeDependenciesFromReceipt(Target.Receipt, Target.RequireFilesExist, Params.UsePak(SC.StageTargetPlatform));
}
// 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.ToLowerInvariant();
}
SC.StageFiles(StagedFileType.NonUFS, BuildPropertiesPath, "Build.version", 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.ToLowerInvariant();
}
SC.StageFiles(StagedFileType.NonUFS, GetIntermediateCommandlineDir(SC), CommandLineFile, false, null, "", true, false);
ConfigCacheIni PlatformGameConfig = ConfigCacheIni.CreateConfigCacheIni(SC.StageTargetPlatform.IniPlatformType, "Game", new DirectoryReference(CommandUtils.GetDirectoryName(Params.RawProjectPath.FullName)));
var ProjectContentRoot = CombinePaths(SC.ProjectRoot, "Content");
var StageContentRoot = CombinePaths(SC.RelativeProjectRootForStage, "Content");
if (!Params.CookOnTheFly && !Params.SkipCookOnTheFly) // only stage the UFS files if we are not using cook on the fly
{
// Initialize internationalization preset.
string InternationalizationPreset = null;
// Use parameters if provided.
if (string.IsNullOrEmpty(InternationalizationPreset))
{
InternationalizationPreset = Params.InternationalizationPreset;
}
// Use configuration if otherwise lacking an internationalization preset.
if (string.IsNullOrEmpty(InternationalizationPreset))
//.........这里部分代码省略.........