50 lines
1.9 KiB
Batchfile
50 lines
1.9 KiB
Batchfile
|
|
@echo off
|
||
|
|
cd /d "%~dp0"
|
||
|
|
echo.
|
||
|
|
echo Baue Gladiator Idle Release (MonoGame)...
|
||
|
|
echo ================================
|
||
|
|
|
||
|
|
if exist "publish" rmdir /s /q "publish"
|
||
|
|
dotnet publish Mono\GladiatorMono.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=false -p:EnableCompressionInSingleFile=true -o publish
|
||
|
|
|
||
|
|
if errorlevel 1 (
|
||
|
|
echo.
|
||
|
|
echo FEHLER beim Bauen!
|
||
|
|
pause
|
||
|
|
exit /b 1
|
||
|
|
)
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo Kopiere EXE nach Spiel\ ...
|
||
|
|
if not exist "Spiel" mkdir "Spiel"
|
||
|
|
copy /y "publish\GladiatorMono.exe" "Spiel\GladiatorIdle.exe" >nul
|
||
|
|
if errorlevel 1 (
|
||
|
|
set COPYFAIL=1
|
||
|
|
)
|
||
|
|
rem MonoGame findet SDL2/OpenAL nur neben der EXE, nicht in der Single-File-EXE
|
||
|
|
copy /y "publish\*.dll" "Spiel\" >nul
|
||
|
|
if defined COPYFAIL (
|
||
|
|
echo WARNUNG: Spiel\GladiatorIdle.exe konnte nicht ersetzt werden.
|
||
|
|
echo Laeuft das Spiel noch? Beenden und erneut bauen.
|
||
|
|
)
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo Erstelle ZIP (EXE + Bilder, Clips und 3D-Figuren)...
|
||
|
|
if exist "publish\zip" rmdir /s /q "publish\zip"
|
||
|
|
mkdir "publish\zip\Assets"
|
||
|
|
copy /y "publish\GladiatorMono.exe" "publish\zip\GladiatorIdle.exe" >nul
|
||
|
|
copy /y "publish\*.dll" "publish\zip\" >nul
|
||
|
|
robocopy "Assets\Sprites" "publish\zip\Assets\Sprites" /e /njh /njs /ndl /nfl /nc /ns /xf .gitkeep >nul
|
||
|
|
robocopy "Assets\Video" "publish\zip\Assets\Video" /e /njh /njs /ndl /nfl /nc /ns /xf .gitkeep >nul
|
||
|
|
robocopy "Assets\Models" "publish\zip\Assets\Models" /e /njh /njs /ndl /nfl /nc /ns /xf .gitkeep >nul
|
||
|
|
powershell -NoProfile -Command "Compress-Archive -Path 'publish\zip\*' -DestinationPath 'Spiel\GladiatorIdle.zip' -Force"
|
||
|
|
rem Zwischenstand des Bauens wieder weg (entsteht jedes Mal neu)
|
||
|
|
rmdir /s /q "publish"
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo Fertig!
|
||
|
|
echo Spiel\GladiatorIdle.exe - direkt startbar (nutzt den Ordner Assets im Projekt)
|
||
|
|
echo Spiel\GladiatorIdle.zip - EXE + DLLs + Assets, zum Weitergeben
|
||
|
|
echo ================================
|
||
|
|
pause
|