本文整理汇总了C#中DeploymentContext.StageBuildProductsFromReceipt方法的典型用法代码示例。如果您正苦于以下问题:C# DeploymentContext.StageBuildProductsFromReceipt方法的具体用法?C# DeploymentContext.StageBuildProductsFromReceipt怎么用?C# DeploymentContext.StageBuildProductsFromReceipt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeploymentContext
的用法示例。
在下文中一共展示了DeploymentContext.StageBuildProductsFromReceipt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
}
}
}
示例2: 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(BuildReceipt 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);
/*foreach (string StageExePath in GetExecutableNames(SC))
{
// set the icon on the original exe this will be used in the task bar when the bootstrap exe runs
if (InternalUtils.SafeFileExists(CombinePaths(SC.ProjectRoot, "Build/Windows/Application.ico")))
{
GroupIconResource GroupIcon = null;
GroupIcon = GroupIconResource.FromIco(CombinePaths(SC.ProjectRoot, "Build/Windows/Application.ico"));
// Update the icon on the original exe because this will be used when the game is running in the task bar
using (ModuleResourceUpdate Update = new ModuleResourceUpdate(StageExePath, false))
{
const int IconResourceId = 101;
if (GroupIcon != null)
{
Update.SetIcons(IconResourceId, GroupIcon);
}
}
}
}*/
// Stage the bootstrap executable
if(!Params.NoBootstrapExe)
{
foreach(BuildReceipt 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);
}
}
}
}
}
示例3: 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);
}
}
}
}
}
}
示例4: GetFilesToDeployOrStage
public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
{
// Stage all the build products
foreach (StageTarget Target in SC.StageTargets)
{
SC.StageBuildProductsFromReceipt(Target.Receipt, Target.RequireFilesExist, Params.bTreatNonShippingBinariesAsDebugFiles);
}
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);
}
// Find the app bundle path
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");
}
else if (Exe.StartsWith(CombinePaths(SC.RuntimeRootDir, "Engine/Binaries", SC.PlatformDir)))
{
AppBundlePath = CombinePaths("Engine/Binaries", SC.PlatformDir, Path.GetFileNameWithoutExtension(Exe) + ".app");
}
// Copy the custom icon and Steam dylib, if needed
if (!string.IsNullOrEmpty(AppBundlePath))
{
SC.StageFiles(StagedFileType.NonUFS, 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);
}
}
}
// 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, StagedFileType.NonUFS, CombinePaths(SC.LocalRoot, "Engine/Binaries", SC.PlatformDir, "UnrealCEFSubProcess.app"), UnrealCEFSubProcessPath);
}
// 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
if (SC.NonUFSStagingFiles.ContainsKey(Executable.Path) && Executable.Path.Replace("\\", "/").Contains("/" + TargetPlatformType.ToString() + "/"))
{
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) + ".app";
}
else if (Params.IsCodeBasedProject)
{
BootstrapExeName = Target.Receipt.TargetName + ".app";
}
else
{
BootstrapExeName = SC.ShortProjectName + ".app";
}
string AppPath = Executable.Path.Substring(0, Executable.Path.LastIndexOf(".app/") + 4);
object Dest = SC.NonUFSStagingFiles[Executable.Path];
foreach (var DestPath in SC.NonUFSStagingFiles[Executable.Path])
{
string AppRelativePath = DestPath.Substring(0, DestPath.LastIndexOf(".app/") + 4);
StageBootstrapExecutable(SC, BootstrapExeName, AppPath, AppRelativePath, BootstrapArguments);
}
}
}
}
}
// Copy the ShaderCache files, if they exist
SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Content"), "ShaderCache.ushadercache", false, null, null, true);
SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, "Content"), "ShaderCodeCache.ushadercode", false, null, null, true);
}
示例5: GetFilesToDeployOrStage
public override void GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC)
{
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
Console.WriteLine("Staging all {0} build products", SC.StageTargets.Count);
int BuildProductIdx = 0;
foreach (StageTarget Target in SC.StageTargets)
{
Console.WriteLine(" Product {0}: {1}", BuildProductIdx, Target.Receipt.TargetName);
SC.StageBuildProductsFromReceipt(Target.Receipt, Target.RequireFilesExist, Params.bTreatNonShippingBinariesAsDebugFiles);
++BuildProductIdx;
}
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 (Executable.Path.Replace("\\", "/").Contains("/" + TargetPlatformType.ToString() + "/"))
{
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 = Target.Receipt.TargetName;
}
else
{
BootstrapExeName = SC.ShortProjectName;
}
foreach (string StagePath in SC.NonUFSStagingFiles[FullExecutablePath])
{
StageBootstrapExecutable(SC, BootstrapExeName + ".sh", FullExecutablePath, StagePath, BootstrapArguments);
}
}
}
}
}
}