BAPSicle/build/build-windows.bat

40 lines
921 B
Batchfile
Raw Normal View History

2020-10-25 01:23:24 +00:00
cd /D "%~dp0"
2021-04-11 18:02:19 +00:00
2021-04-27 20:48:17 +00:00
: Get the git commit / branch and write it into build.py.
2021-04-11 18:02:19 +00:00
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse --short HEAD`) DO (
SET build_commit=%%F
)
2021-04-27 20:48:17 +00:00
FOR /F "tokens=* USEBACKQ" %%F IN (`git branch --show-current`) DO (
SET build_branch=%%F
)
2021-04-14 13:22:02 +00:00
echo BUILD: str = "%build_commit%"> ..\build.py
2021-04-27 20:48:17 +00:00
echo BRANCH: str = "%build_branch%">> ..\build.py
2021-04-11 18:02:19 +00:00
2021-04-14 13:00:45 +00:00
if "%1" == "no-venv" goto skip-venv
py -m venv ..\venv
..\venv\Scripts\activate
:skip-venv
2021-04-11 18:02:19 +00:00
2021-09-11 20:19:45 +00:00
pip install wheel
2020-10-25 01:23:24 +00:00
pip install -r requirements.txt
pip install -r requirements-windows.txt
pip install -e ..\
: Generate the json config in case you wanted to use the gui to regenerate the command below manually.
2020-10-25 01:23:24 +00:00
python generate-build-exe-config.py
: auto-py-to-exe -c build-exe-config.json -o ../install
2020-10-25 01:23:24 +00:00
python build-exe.py
build-exe-pyinstaller-command.bat
del *.spec /q
del ..\build.py /q
echo "Output file should be located in 'output/' folder."
2021-04-11 18:02:19 +00:00
TIMEOUT 5