mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-27 04:32:18 +00:00
0e17edace1
A virtual environment is now created and used to generate the EXE build, which helps to keep its size down to ~10 MiB.
28 lines
658 B
Batchfile
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
|