Files
A1SwapModPacker/build_win.cmd
T
yw1573 5e6be787c7 build: Nuitka改为standalone模式并更新应用图标
onefile自解压易被杀软误报,改为standalone目录分发;
更新x.png应用图标。
2026-07-29 14:17:42 +08:00

40 lines
964 B
Batchfile

@echo off
chcp 65001 >nul
setlocal
set "PY=.venv\Scripts\python.exe"
set "DIST=build\a1packer"
if not exist "%DIST%" mkdir "%DIST%"
"%PY%" -m nuitka ^
--mode=standalone ^
--msvc=latest ^
--enable-plugin=pyside6 ^
--include-qt-plugins=platforms,imageformats,styles,iconengines ^
--include-data-dir="a1_swap_mod_packer/i18n=a1_swap_mod_packer/i18n" ^
--windows-console-mode=disable ^
--output-dir="%DIST%" ^
--output-filename=a1packer.exe ^
--remove-output ^
run_gui.py
if errorlevel 1 exit /b %ERRORLEVEL%
echo.
echo GUI build done.
set "OUTPUT=%DIST%\a1packer.dist"
robocopy "swap_gcode" "%OUTPUT%\swap_gcode" /E
if %ERRORLEVEL% GEQ 8 exit /b %ERRORLEVEL%
copy /Y "gcode_patches.ini" "%OUTPUT%\gcode_patches.ini" >nul
if errorlevel 1 exit /b %ERRORLEVEL%
copy /Y "x.png" "%OUTPUT%\x.png" >nul
if errorlevel 1 exit /b %ERRORLEVEL%
echo.
echo Build done: %OUTPUT%
echo The entire "%OUTPUT%" folder is the portable distribution.
exit /b 0