forked from cafeberry/cafeberry
feat: Orbis & PSVita builds, Durango postbuild & More (#10)
This fixes Orbis & PSVita builds along with adds a Durango postbuild and moves PS3 to the new SonyLeaderboardManager introduced in TU19 This also fixes the Orbis strings and gets some of the other Windows64 build configurations mostly building. --------- Co-authored-by: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Co-authored-by: str1k3r <1+str1k3r@noreply.localhost> Co-authored-by: 552eden <552eden@gmail.com> Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost> Co-authored-by: str1k3r <15+str1k3r@noreply.neolegacy.dev> Co-authored-by: pieeebot <10+pieeebot@noreply.neolegacy.dev> Reviewed-on: pieeebot/cafeberry#10
This commit is contained in:
1 parent
a00c0c63eb
commit
f17ce45d6d
264 files changed
+3597
-11971
No files matched your search
@@ -3,16 +3,18 @@ param(
|
||||
[string]$ProjectDir
|
||||
)
|
||||
|
||||
Write-Host "Orbis Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
Write-Host "Orbis Postbuild: script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||
|
||||
$directories = @(
|
||||
"music",
|
||||
"Orbis",
|
||||
"Common",
|
||||
"Common\Media",
|
||||
"Common\Tutorial",
|
||||
"Common\res",
|
||||
"Sound"
|
||||
"PS4_GAME\music",
|
||||
"PS4_GAME\Orbis",
|
||||
"PS4_GAME\Common",
|
||||
"PS4_GAME\Common\Media",
|
||||
"PS4_GAME\Orbis\Tutorial",
|
||||
"PS4_GAME\Common\res",
|
||||
"PS4_GAME\Orbis\Sound",
|
||||
"PS4_GAME\Orbis\DLCImages",
|
||||
"PS4_GAME\Orbis\DLC"
|
||||
)
|
||||
|
||||
foreach ($dir in $directories) {
|
||||
@@ -23,15 +25,21 @@ $folderCopies = @(
|
||||
@{ Source = "music"; Dest = "PS4_GAME\music" },
|
||||
@{ Source = "Common\Media"; Dest = "PS4_GAME\Common\Media" },
|
||||
@{ Source = "Common\res"; Dest = "PS4_GAME\Common\res" },
|
||||
@{ Source = "PSVita\Tutorial"; Dest = "PS4_GAME\Common\Tutorial" },
|
||||
@{ Source = "PS3\Sound"; Dest = "PS4_GAME\Sound" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_module"; Dest = "PS4_GAME\sce_module" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_gls"; Dest = "PS4_GAME\sce_gls" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" },
|
||||
@{ Source = "Orbis\Sound"; Dest = "PS4_GAME\Orbis\Sound" },
|
||||
@{ Source = "OrbisMedia\DLC"; Dest = "PS4_GAME\Orbis\DLC" },
|
||||
@{ Source = "Orbis\DLCImages"; Dest = "PS4_GAME\Orbis\DLCImages" },
|
||||
@{ Source = "OrbisMedia\Tutorial"; Dest = "PS4_GAME\Orbis\Tutorial" },
|
||||
@{ Source = "$env:SCE_ORBIS_SDK_DIR\target\sce_module"; Dest = "PS4_GAME\sce_module" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_gls"; Dest = "PS4_GAME\sce_gls" },
|
||||
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" }
|
||||
)
|
||||
|
||||
foreach ($copy in $folderCopies) {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
|
||||
$src = $copy.Source
|
||||
} else {
|
||||
$src = Join-Path $ProjectDir $copy.Source
|
||||
}
|
||||
$dst = Join-Path $OutDir $copy.Dest
|
||||
|
||||
if (Test-Path $src) {
|
||||
@@ -41,7 +49,7 @@ foreach ($copy in $folderCopies) {
|
||||
|
||||
$fileCopies = @(
|
||||
@{ Source = "Orbis\PS4ProductCodes.bin"; Dest = "PS4_GAME\Orbis\PS4ProductCodes.bin" },
|
||||
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" },
|
||||
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" }
|
||||
)
|
||||
|
||||
foreach ($copy in $fileCopies) {
|
||||
@@ -96,4 +104,43 @@ foreach ($dir in $delDirs) {
|
||||
Remove-Item -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Make Orbis PKG
|
||||
$tools = Join-Path $env:SCE_ROOT_DIR "\ORBIS\Tools\Publishing Tools\bin"
|
||||
$pkgSrc = Join-Path $OutDir "PS4_GAME"
|
||||
|
||||
$genGp4 = Join-Path $tools "gengp4_app.exe"
|
||||
$pubCmd = Join-Path $tools "orbis-pub-cmd.exe"
|
||||
|
||||
$pkgPath = Join-Path $OutDir "Minecraft.Client.pkg"
|
||||
$gp4Name = $pkgSrc.TrimEnd('\','/')
|
||||
$gp4File = "$gp4Name.gp4"
|
||||
|
||||
if (Test-Path $pkgPath) {
|
||||
Remove-Item $pkgPath -Force
|
||||
}
|
||||
|
||||
if (-not (Test-Path $genGp4)) {
|
||||
Write-Host "Orbis Postbuild: gengp4_app.exe not found, skipping PKG creation."
|
||||
} elseif (-not (Test-Path $pkgSrc)) {
|
||||
Write-Host "Orbis Postbuild: '$pkgSrc' not found, skipping PKG creation."
|
||||
} else {
|
||||
Write-Host "Orbis Postbuild: Generating GP4..."
|
||||
& $genGp4 $pkgSrc
|
||||
|
||||
if (-not (Test-Path $gp4File)) {
|
||||
Write-Host "Orbis Postbuild ERROR: $gp4File was not created"
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Orbis Postbuild: Patching GP4 default_id..."
|
||||
(Get-Content $gp4File) -replace 'default_id="1"', 'default_id="0"' | Set-Content $gp4File
|
||||
|
||||
Write-Host "Orbis Postbuild: Building PKG..."
|
||||
& $pubCmd img_create $gp4File $pkgPath
|
||||
|
||||
(Get-Content $gp4File) -replace 'default_id="1"', 'default_id="0"' | Set-Content $gp4File # str1k3r - ran again so we can open the GP4 file without it throwing a error.
|
||||
|
||||
Write-Host "Orbis Postbuild: PKG created at $pkgPath"
|
||||
}
|
||||
Reference in new issue
Block a user