diff --git a/.gitignore b/.gitignore index 2c5357a..61e2b77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .vscode build host/__pycache__ +host/installer host/build host/dist host/nxdumptool diff --git a/host/windows_make_standalone.bat b/host/windows_make_standalone.bat index f1a6646..02d44f9 100644 --- a/host/windows_make_standalone.bat +++ b/host/windows_make_standalone.bat @@ -1,8 +1,28 @@ -pyinstaller -y --clean --log-level WARN -F --add-binary "C:\Windows\System32\libusb0.dll;." -w -i nxdt.ico nxdt_host.py +@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