This repository has been archived by the owner on Apr 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
82 lines (71 loc) · 1.97 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@ECHO OFF
echo Packaging game...
set bin=bin
cd %~dp0
call :Clear
call :Archive
call :Win32
call :Win64
call :Mac
call :Android
call :Love
call :Dropbox
goto :End
:Clear
rmdir %bin% /S /Q > nul 2>&1
mkdir %bin% > nul 2>&1
exit /B
:Archive
echo|set /p= "> Creating game archive..."
winrar a -afzip -ibck %bin%\game.love *.lua
winrar a -afzip -ibck -r %bin%\game.love assets
winrar a -afzip -ibck -r %bin%\game.love game
winrar a -afzip -ibck -r %bin%\game.love lib
winrar a -afzip -ibck -r %bin%\game.love summon
winrar a -afzip -ibck -r %bin%\game.love yuishiki
echo done
exit /B
:Win32
echo|set /p= "> Building windows 32bit..."
copy /b platforms\win32\love.exe+%bin%\game.love %bin%\yuishiki.exe > nul
winrar a -afzip -ibck -ep1 %bin%\yuishiki-win32.zip %bin%\yuishiki.exe
winrar a -afzip -ibck -r -ep1 %bin%\yuishiki-win32.zip platforms\win32\*.dll
del %bin%\yuishiki.exe
echo done
exit /B
:Win64
echo|set /p= "> Building windows 64bit..."
copy /b platforms\win64\love.exe+%bin%\game.love %bin%\yuishiki.exe > nul
winrar a -afzip -ibck -ep1 %bin%\yuishiki-win64.zip %bin%\yuishiki.exe
winrar a -afzip -ibck -r -ep1 %bin%\yuishiki-win64.zip platforms\win64\*.dll
del %bin%\yuishiki.exe
echo done
exit /B
:Mac
echo|set /p= "> Building mac..."
del %bin%\yuishiki-mac.zip > nul 2>&1
copy %bin%\game.love platforms\mac\yuishiki.app\Contents\Resources > nul
winrar a -afzip -ibck -r -ep1 %bin%\yuishiki-mac.zip platforms\mac\ > nul
echo done
exit /B
:Android
echo|set /p= "> Building android apk..."
copy %bin%\game.love platforms\android\assets\ > nul
pushd platforms\android
call ant -q debug > nul
popd
copy platforms\android\%bin%\love_android_sdl2-debug.apk %bin%\yuishiki-and.apk > nul
echo done
exit /B
:Love
echo|set /p= "> Building love package..."
move bin\game.love bin\yuishiki.love > nul
echo done
exit /B
:Dropbox
echo|set /p= "> Updating dropbox shared folder..."
robocopy.exe bin x:\dropbox\share\ys /NFL /NDL /NJH /NJS /nc /ns /np > nul 2>&1
echo done
exit /B
:End
echo BUILD COMPLETED