2023-06-04 19:45:17 +01:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
set scriptdir=%~dp0
|
|
|
|
set scriptdir=%scriptdir:~0,-1%
|
|
|
|
|
2023-11-26 21:10:42 +00:00
|
|
|
set venvname=standalone
|
2023-06-04 19:45:17 +01:00
|
|
|
set venvscripts=%scriptdir%\%venvname%\Scripts
|
|
|
|
|
|
|
|
set venvpython=%venvscripts%\python.exe
|
|
|
|
|
|
|
|
cd /D "%scriptdir%"
|
|
|
|
|
|
|
|
python -m venv "%venvname%"
|
|
|
|
|
2023-11-26 21:10:42 +00:00
|
|
|
"%venvpython%" -m pip install --upgrade nuitka -r requirements-win32.txt
|
2023-06-04 19:45:17 +01:00
|
|
|
|
2024-08-28 11:03:19 +01:00
|
|
|
REM Useful command line arguments for Nuitka:
|
|
|
|
|
|
|
|
REM --standalone
|
|
|
|
REM Enable standalone mode for output. This allows you to transfer the created
|
|
|
|
REM binary to other machines without it using an existing Python installation.
|
|
|
|
REM It implies these option: "--follow-imports" and "--python-flag=no_site".
|
|
|
|
|
|
|
|
REM --assume-yes-for-downloads
|
|
|
|
REM Allow Nuitka to download external code if necessary, e.g. dependency
|
|
|
|
REM walker, ccache, and even gcc on Windows.
|
|
|
|
|
|
|
|
REM --deployment
|
|
|
|
REM Disable code aimed at making finding compatibility issues easier.
|
|
|
|
REM This will e.g. prevent execution with "-c" argument, which is often
|
|
|
|
REM used by code that attempts run a module, and causes a program to start
|
|
|
|
REM itself over and over potentially.
|
|
|
|
|
|
|
|
REM --windows-console-mode
|
|
|
|
REM Select console mode to use. Default mode is 'force' and creates a console
|
|
|
|
REM window unless the program was started from one. With 'disable' it doesn't
|
|
|
|
REM create or use a console at all. With 'attach' an existing console will be
|
|
|
|
REM used for outputs. Default is 'force'.
|
|
|
|
|
|
|
|
REM --windows-icon-from-ico=nxdt.ico
|
|
|
|
REM Add executable icon. Can be given multiple times for different resolutions
|
|
|
|
REM or files with multiple icons inside.
|
|
|
|
|
|
|
|
REM --enable-plugin=tk-inter
|
|
|
|
REM Enabled plugins. Must be plug-in names. Use '--plugin-list' to query the
|
|
|
|
REM full list and exit.
|
|
|
|
|
|
|
|
"%venvpython%" -m nuitka --standalone --assume-yes-for-downloads --deployment --windows-console-mode=attach --windows-icon-from-ico=nxdt.ico --enable-plugin=tk-inter nxdt_host.py
|
2024-01-20 22:11:21 +00:00
|
|
|
|
|
|
|
del /F /Q nxdt_host.7z
|
|
|
|
7z a nxdt_host.7z .\nxdt_host.dist\*
|
2021-03-20 01:59:53 +00:00
|
|
|
|
2023-11-26 21:10:42 +00:00
|
|
|
rmdir /s /q nxdt_host.build
|
|
|
|
rmdir /s /q nxdt_host.dist
|
|
|
|
rmdir /s /q standalone
|
2023-06-04 19:45:17 +01:00
|
|
|
|
|
|
|
pause
|