From eb631f480c69ac1679c63bc505373a692bbe1127 Mon Sep 17 00:00:00 2001 From: 552eden <552eden@gmail.com> Date: Sun, 2 Aug 2026 00:42:41 +0300 Subject: [PATCH] add vpk creation --- .../Common/Postbuilds/PSVita-postbuild.ps1 | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Minecraft.Client/Common/Postbuilds/PSVita-postbuild.ps1 b/Minecraft.Client/Common/Postbuilds/PSVita-postbuild.ps1 index 85489b3a..0390f858 100644 --- a/Minecraft.Client/Common/Postbuilds/PSVita-postbuild.ps1 +++ b/Minecraft.Client/Common/Postbuilds/PSVita-postbuild.ps1 @@ -99,4 +99,26 @@ foreach ($dir in $delDirs) { Remove-Item -Force -ErrorAction SilentlyContinue } } +} + +# ── VPK ──────────────────────────────────────────────────────────────────── +$repoRoot = Split-Path ($ProjectDir.TrimEnd('\', '/')) -Parent +$vpkPath = Join-Path $repoRoot "Minecraft.Client.vpk" +$vpkSrc = Join-Path $OutDir "PSVITA_GAME" +$sevenZip = "C:\Program Files\7-Zip\7z.exe" + +if (Test-Path $vpkPath) { + Remove-Item $vpkPath -Force +} + +if (-not (Test-Path $sevenZip)) { + Write-Host "PSVita Postbuild: 7-Zip not found at '$sevenZip', skipping VPK creation." +} elseif (-not (Test-Path $vpkSrc)) { + Write-Host "PSVita Postbuild: '$vpkSrc' not found, skipping VPK creation." +} else { + Push-Location $vpkSrc + & "$sevenZip" a -tzip -mx0 "$vpkPath" * + Pop-Location + Write-Host "PSVita Postbuild: VPK created at '$vpkPath'" + Start-Process explorer.exe "/select,`"$vpkPath`"" } \ No newline at end of file