Files
cafeberry/Minecraft.Client/Common/Postbuilds/Durango-postbuild.ps1
T
f17ce45d6d 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: #10
2026-08-02 13:40:35 +00:00

93 lines
2.4 KiB
PowerShell

param(
[string]$OutDir,
[string]$ProjectDir
)
Write-Host "Durango Postbuild: script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
$directories = @(
"Durango\StoreImages",
"Common\Media",
"Common\res",
"DLCImages",
"Tutorial",
"Durango",
"music",
"Sound",
"Xbox",
"DLC",
"CU"
)
foreach ($dir in $directories) {
New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
}
$folderCopies = @(
@{ Source = "Common\Media"; Dest = "Common\Media" },
@{ Source = "Common\res"; Dest = "Common\res" },
@{ Source = "Durango\Sound"; Dest = "Sound" },
@{ Source = "DurangoMedia\DLC"; Dest = "DLC" },
@{ Source = "DurangoMedia\Tutorial"; Dest = "Tutorial" },
@{ Source = "music"; Dest = "music" },
@{ Source = "Durango\DLCImages"; Dest = "DLCImages" },
@{ Source = "Durango\CU"; Dest = "CU" }
)
foreach ($copy in $folderCopies) {
$src = Join-Path $ProjectDir $copy.Source
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
}
}
$fileCopies = @(
@{ Source = "Durango\DurangoExtras\xcompress.dll"; Dest = "xcompress.dll" },
@{ Source = "Durango\DLCXbox1.cmp"; Dest = "DLCXbox1.cmp" }
)
foreach ($copy in $fileCopies) {
$src = Join-Path $ProjectDir $copy.Source
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
Copy-Item -Path $src -Destination $dst -Force
}
}
$deleteDirs = @(
"Common\Media\Sound",
"Common\Media\Graphics",
"Common\Media\de-DE",
"Common\Media\es-ES",
"Common\Media\fr-FR",
"Common\Media\it-IT",
"Common\Media\ja-JP",
"Common\Media\ko-KR",
"Common\Media\pt-BR",
"Common\Media\pt-PT",
"Common\Media\zh-CHT"
)
foreach ($dir in $deleteDirs) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue
}
}
$delDirs = @(
"Common\Media",
"Common\Media\font"
)
foreach ($dir in $delDirs) {
if ($delDirs -contains $dir) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Get-ChildItem -Path $path -Recurse -Include *.swf, *.txt, *.resx, *.xml, *.loc, *.lang, *.col, *.h, *.xui, *.abc, "Mojang Font_7.ttf", "Mojang Font_11.ttf", MediaWindows64.arc, MediaOrbis.arc, MediaPS3.arc, MediaPSVita.arc -File |
Remove-Item -Force -ErrorAction SilentlyContinue
}
}
}