Skip to content

Commit

Permalink
Windows build file can now build debug and release.
Browse files Browse the repository at this point in the history
  • Loading branch information
FancyKillerPanda committed Feb 3, 2022
1 parent 4c9a350 commit c92f66f
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions tools/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,32 @@
set scriptDir=%~dp0
set projectRoot=%scriptDir%\..

mkdir %projectRoot%\bin\ >nul 2>nul
cd %projectRoot%\bin\
if [%~1]==[--release] (
mkdir %projectRoot%\bin\release\ >nul 2>nul
cd %projectRoot%\bin\release\

xcopy %projectRoot%\res\ %projectRoot%\bin\res\ /s /e
odin run %projectRoot%\src\ -opt:0 -out:jumper.exe -thread-count:8 -debug
xcopy %projectRoot%\res\ %projectRoot%\bin\release\res\ /s /e /y /q
xcopy "C:\Program Files\Odin\vendor\sdl2\SDL2.dll" %projectRoot%\bin\release\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\image\SDL2_image.dll" %projectRoot%\bin\release\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\image\libpng16-16.dll" %projectRoot%\bin\release\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\image\zlib1.dll" %projectRoot%\bin\release\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\ttf\SDL2_ttf.dll" %projectRoot%\bin\release\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\ttf\libfreetype-6.dll" %projectRoot%\bin\release\ /q /y

odin run %projectRoot%\src\ -o:size -out:jumper.exe -thread-count:8
) else (
mkdir %projectRoot%\bin\debug\ >nul 2>nul
cd %projectRoot%\bin\debug\

xcopy %projectRoot%\res\ %projectRoot%\bin\debug\res\ /s /e /y /q
xcopy "C:\Program Files\Odin\vendor\sdl2\SDL2.dll" %projectRoot%\bin\debug\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\image\SDL2_image.dll" %projectRoot%\bin\debug\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\image\libpng16-16.dll" %projectRoot%\bin\debug\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\image\zlib1.dll" %projectRoot%\bin\debug\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\ttf\SDL2_ttf.dll" %projectRoot%\bin\debug\ /q /y
xcopy "C:\Program Files\Odin\vendor\sdl2\ttf\libfreetype-6.dll" %projectRoot%\bin\debug\ /q /y

odin run %projectRoot%\src\ -opt:0 -out:jumper.exe -thread-count:8 -debug
)

cd %projectRoot%

0 comments on commit c92f66f

Please sign in to comment.