-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild_windows_release.bat
52 lines (42 loc) · 1.01 KB
/
build_windows_release.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
@echo off
set packages=pygame cx_Freeze prompt_toolkit tones
set pythondir=C:\Python27
set python-pip=%pythondir%\Scripts\pip.exe
set python-interpreter=%pythondir%\python.exe
set build-dir=%~dp0build
set setup-script=%~dp0cxfreeze-setup.py
set setup-script-args=build_exe
set python-download-url=https://www.python.org/downloads/release/python-2715/
call :check-python-bin %python-interpreter%
call :check-python-bin %python-pip%
echo(
echo Installing python packages...
echo(
%python-pip% install %packages%
if exist %build-dir%\ (
echo(
echo Deleting %build-dir%...
del /Q %build-dir%\
)
echo(
echo Building windows executable...
echo(
%python-interpreter% %setup-script% %setup-script-args%
echo(
echo Build completed, output should be in %build-dir%
echo(
goto finish-pause
:check-python-bin
if not exist %~1 (
echo(
echo Can't find %~1
echo Please install Python2.7.x
echo(
echo %python-download-url%
echo(
goto finish-pause
)
exit /b
:finish-pause
pause>nul|set/p =Press any key to exit ...
exit