2020-10-25 01:23:24 +00:00
|
|
|
cd /D "%~dp0"
|
2021-04-11 18:02:19 +00:00
|
|
|
|
2021-04-11 19:27:46 +00:00
|
|
|
: Get the git commit 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-14 13:22:02 +00:00
|
|
|
echo BUILD: str = "%build_commit%"> ..\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
|
2021-04-14 12:58:40 +00:00
|
|
|
|
|
|
|
py -m venv ..\venv
|
|
|
|
..\venv\Scripts\activate
|
|
|
|
|
|
|
|
:skip-venv
|
2021-04-11 18:02:19 +00:00
|
|
|
|
2020-10-25 01:23:24 +00:00
|
|
|
pip install -r requirements.txt
|
|
|
|
pip install -r requirements-windows.txt
|
|
|
|
pip install -e ..\
|
|
|
|
|
2020-10-29 01:41:01 +00:00
|
|
|
: 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
|
|
|
|
|
2020-10-29 01:41:01 +00:00
|
|
|
: auto-py-to-exe -c build-exe-config.json -o ../install
|
2020-10-25 01:23:24 +00:00
|
|
|
|
2020-10-29 01:41:01 +00:00
|
|
|
python build-exe.py
|
|
|
|
|
|
|
|
build-exe-pyinstaller-command.bat
|
|
|
|
|
|
|
|
del *.spec /q
|
|
|
|
|
2021-04-19 14:45:20 +00:00
|
|
|
del ..\build.py /q
|
|
|
|
|
2020-10-29 01:41:01 +00:00
|
|
|
echo "Output file should be located in 'output/' folder."
|
2021-04-11 18:02:19 +00:00
|
|
|
TIMEOUT 5
|