add vpk creation
This commit is contained in:
@@ -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`""
|
||||
}
|
||||
Reference in New Issue
Block a user