1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-09 12:11:44 +00:00
nxdumptool/host/windows_make_standalone.bat
Pablo Curiel 0e17edace1 host: improve Windows EXE build generation
A virtual environment is now created and used to generate the EXE build, which helps to keep its size down to ~10 MiB.
2023-06-04 20:45:17 +02:00

28 lines
658 B
Batchfile

@echo off
set scriptdir=%~dp0
set scriptdir=%scriptdir:~0,-1%
set venvname=installer
set venvscripts=%scriptdir%\%venvname%\Scripts
set venvpython=%venvscripts%\python.exe
set venvpyinstaller=%venvscripts%\pyinstaller.exe
cd /D "%scriptdir%"
python -m venv "%venvname%"
"%venvpython%" -m pip install --upgrade pyinstaller -r requirements-win32.txt
"%venvpyinstaller%" -y --clean --log-level WARN -F --add-binary "C:\Windows\System32\libusb0.dll;." -w -i nxdt.ico nxdt_host.py
move dist\nxdt_host.exe nxdt_host.exe
rmdir /s /q __pycache__
rmdir /s /q build
rmdir /s /q dist
rmdir /s /q installer
del nxdt_host.spec
pause