build: Nuitka改为standalone模式并更新应用图标

onefile自解压易被杀软误报,改为standalone目录分发;
更新x.png应用图标。
This commit is contained in:
2026-07-29 14:17:42 +08:00
parent 2438eca047
commit 5e6be787c7
2 changed files with 8 additions and 6 deletions
+8 -6
View File
@@ -3,12 +3,12 @@ chcp 65001 >nul
setlocal setlocal
set "PY=.venv\Scripts\python.exe" set "PY=.venv\Scripts\python.exe"
set "DIST=build\onefile" set "DIST=build\a1packer"
if not exist "%DIST%" mkdir "%DIST%" if not exist "%DIST%" mkdir "%DIST%"
"%PY%" -m nuitka ^ "%PY%" -m nuitka ^
--mode=onefile ^ --mode=standalone ^
--msvc=latest ^ --msvc=latest ^
--enable-plugin=pyside6 ^ --enable-plugin=pyside6 ^
--include-qt-plugins=platforms,imageformats,styles,iconengines ^ --include-qt-plugins=platforms,imageformats,styles,iconengines ^
@@ -23,15 +23,17 @@ if errorlevel 1 exit /b %ERRORLEVEL%
echo. echo.
echo GUI build done. echo GUI build done.
robocopy "swap_gcode" "%DIST%\swap_gcode" /E set "OUTPUT=%DIST%\a1packer.dist"
robocopy "swap_gcode" "%OUTPUT%\swap_gcode" /E
if %ERRORLEVEL% GEQ 8 exit /b %ERRORLEVEL% if %ERRORLEVEL% GEQ 8 exit /b %ERRORLEVEL%
copy /Y "gcode_patches.ini" "%DIST%\gcode_patches.ini" >nul copy /Y "gcode_patches.ini" "%OUTPUT%\gcode_patches.ini" >nul
if errorlevel 1 exit /b %ERRORLEVEL% if errorlevel 1 exit /b %ERRORLEVEL%
copy /Y "x.png" "%DIST%\x.png" >nul copy /Y "x.png" "%OUTPUT%\x.png" >nul
if errorlevel 1 exit /b %ERRORLEVEL% if errorlevel 1 exit /b %ERRORLEVEL%
echo. echo.
echo Build done: %DIST% echo Build done: %OUTPUT%
echo The entire "%OUTPUT%" folder is the portable distribution.
exit /b 0 exit /b 0
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 2.7 MiB