Fix corrupted Windows export in alpha 8

This commit is contained in:
Emporex committed 2026-10-09 15:04:09 +02:00
1 parent e63e08ddde
commit 9b0eab4273
7 files changed
+31 -10

No files matched your search

+9
View File
@@ -53,6 +53,15 @@ try {
if ($LASTEXITCODE -ne 0 -or -not (Test-Path -LiteralPath $gameExe)) {
throw "Der Godot-Windows-Export ist fehlgeschlagen."
}
# Prüft, dass Godot die eingebetteten Projektdaten tatsächlich laden kann,
# bevor NSIS daraus einen Installer erstellt. Ein bloß vorhandenes EXE reicht
# nicht: ein defektes project.binary würde erst beim Start des Spiels auffallen.
$launchOutput = & $gameExe --headless --quit 2>&1 | Out-String
$launchExitCode = $LASTEXITCODE
if (($null -ne $launchExitCode -and $launchExitCode -ne 0) -or $launchOutput -match "Corrupted header in binary project\.binary|Couldn't load project data|Is the \.pck file missing") {
throw "Der exportierte Windows-Build kann seine Projektdaten nicht laden. NSIS-Installer wurde nicht erstellt. Ausgabe: $launchOutput"
}
}
finally {
Set-Content -LiteralPath $projectFile -Value $projectConfiguration -NoNewline