Paket für andere Rechner

paket.bat baut aus dem ausgecheckten Stand ein ZIP, das auf jedem
Windows 10 oder 11 mit 64 Bit ohne Git, Rust und Godot läuft: das
exportierte Spiel, die Brücke mit statisch gelinkter C-Laufzeit und eine
Anleitung für Mitspieler. Die Exportvoreinstellung lässt Tests und
Werkzeuge weg und nimmt die Texte mit; dist/ bleibt außerhalb des
Archivs. CLAUDE.md und der Fragebogen von M1d beschreiben das Paket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Steven Wroblewski
2026-10-02 20:09:48 +02:00
parent 27619b6927
commit 446fad7b55
7 changed files with 142 additions and 1 deletions
+42
View File
@@ -0,0 +1,42 @@
@echo off
rem Builds a package of the checked-out commit that runs on any 64-bit
rem Windows 10 or 11 PC without Git, Rust or Godot:
rem dist\Grovewright-<commit>-windows.zip. See CLAUDE.md.
setlocal
cd /d "%~dp0"
rem The bridge links the C runtime statically, so players need no Visual C++
rem Redistributable. With an explicit target the flag reaches only the bridge,
rem not the build scripts and macros. game\grovewright.gdextension points
rem release exports at that target's folder.
set "RUSTFLAGS=-C target-feature=+crt-static"
cargo build -p grovewright-bridge --release --target x86_64-pc-windows-msvc || goto failed
set "RUSTFLAGS="
rem The first import of a fresh checkout crashes while Godot shuts down; see
rem play.bat.
godot --headless --path game --import
if %errorlevel% neq 0 godot --headless --path game --import || goto failed
if exist dist\Grovewright rmdir /s /q dist\Grovewright
mkdir dist\Grovewright || goto failed
rem The export path is relative to the project folder game.
godot --headless --path game --export-release Windows ../dist/Grovewright/Grovewright.exe || goto failed
for %%f in (Grovewright.exe Grovewright.pck grovewright_bridge.dll) do if not exist dist\Grovewright\%%f goto failed
copy /y paket\LIESMICH.txt dist\Grovewright >nul || goto failed
for /f %%c in ('git rev-parse --short HEAD') do set "COMMIT=%%c"
set "ZIP=dist\Grovewright-%COMMIT%-windows.zip"
if exist "%ZIP%" del "%ZIP%"
rem The tar of Windows writes zip files; the tar of Git for Windows does not.
"%SystemRoot%\System32\tar.exe" -a -c -f "%ZIP%" -C dist Grovewright || goto failed
echo.
echo Paket fertig: %ZIP%
pause
goto :eof
:failed
echo.
echo Das Paket konnte nicht gebaut werden. Die Meldungen oben nennen den Grund.
pause
exit /b 1