-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_all.bat
42 lines (30 loc) · 872 Bytes
/
build_all.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
echo START BUILD
@REM RUN BUILD PROCESSES
@REM CLEANUP ANY OLD BUILD RESULTS
ECHO CLEANUP
@REM RMDIR /S /Q .\build
RMDIR /S /Q .\dist
SET TARGETS=(nightmare humidify herblore superglass alchemy)
@REM BUILD EACH CLICKER SCRIPT INTO A SINGLE WINDOWS EXECUTABLE
ECHO BUILD TARGET BINARIES
SET PROCN=pyinstaller.exe
(FOR %%i IN %TARGETS% DO (
START "%PROCN%" pyinstaller --paths . --onefile .\%%i\%%i_clicker.py
))
@REM WAIT UNTIL ALL BUILDS HAVE FINISHED
:LOOP
FOR /F %%i IN ('tasklist /NH /FI "IMAGENAME eq %PROCN%"') DO IF %%i == %PROCN% GOTO EXISTS
GOTO :DONE
:EXISTS
TIMEOUT /T 1
GOTO :LOOP
:DONE
ECHO BUILD DONE
@REM COPY DIST BINARIES WITH ASSETS TO CORRESPONDING DIRS
ECHO COLLECT PACKAGES
FOR %%i IN %TARGETS% DO (
MKDIR .\dist\%%i\
MOVE /Y .\dist\%%i_clicker.exe .\dist\%%i\
XCOPY /Y .\%%i\*-example.txt .\dist\%%i\
)
ECHO FINISHED BUILD