JD2022-TU1/main/tools/apps/TeaBox/Script/Build/Version/MakePs4PatchCommand.cs

32 lines
No EOL
1.2 KiB
C#

using System.Collections.Generic;
using TeaBox.Code;
using TeaBox.Macros;
namespace TeaBox.BuildVersion
{
internal class MakePs4PatchCommand : MakePs4PackageCommand
{
public override string DefaultDiscLayout => $"ChunkMapping_{Region.GetPlatformRegionName(Platform.Orbis)}.gp4";
protected override IEnumerable<string> GetFilesList()
{
return new List<string> { $@"sce_sys\param_{Sku}_patch.sfo", $@"sce_sys\nptitle_{Sku}.dat", $@"sce_sys\pronunciation_{Sku}.sig", $@"sce_sys\pronunciation_{Sku}.xml" };
}
protected override void PackageDataAssemblyImpl(IStep stepcontext)
{
CopyExecutableFromOutput(stepcontext);
CopyDataMasterToDiscWorkingDirectory(stepcontext);
CopyPatchDataToDiscWorkingDirectory(stepcontext);
}
protected override void GeneratePackageImpl()
{
base.GeneratePackageImpl();
PkgTool = Ps4Constants.GetPackageTool();
Context.AddStep("Creating package",
new GenericCommand(PkgTool, $"img_create --oformat {PkgFormat} --delete_redundant_file \"{LayoutPath}\" \"{OutputDirectory}\"").Execute);
}
}
}