优化更新

This commit is contained in:
2026-09-23 16:51:40 +08:00
parent cd4ffbfa90
commit 68e8eb91a7
15 changed files with 1858 additions and 193 deletions
+21 -4
View File
@@ -2,13 +2,20 @@
chcp 65001 >nul
setlocal enabledelayedexpansion
REM 一键打包:PyInstaller -> dist\niumasoftware -> 生成 Inno 脚本 -> (可选) 编译安装包
REM 需要:
REM - Python + PyInstaller(pip install pyinstaller)
REM - Inno Setup(可选,用于自动编译 .iss)
REM Build flow: PyInstaller -> generate ISS -> optional ISCC compile
REM Requirements:
REM - Python + PyInstaller
REM - Inno Setup (optional, for auto compile)
cd /d "%~dp0"
echo.
echo === Check Python architecture ===
for /f %%i in ('python -c "import platform; print(platform.architecture()[0][:2])"') do set "PY_BITS=%%i"
if not defined PY_BITS goto :pycheck_fail
if not "%PY_BITS%"=="64" goto :pycheck_fail
echo Python architecture: %PY_BITS%-bit
echo.
echo === Clean old build artifacts ===
if exist "build" rmdir /s /q "build"
@@ -60,6 +67,16 @@ echo installer\niumasoftware.generated.iss
echo.
exit /b 0
:pycheck_fail
echo.
echo ERROR: Current python is not 64-bit, cannot build 64-bit installer payload.
echo Please use 64-bit Python, for example:
echo py -3.13-64 -m pip install -r requirements.txt
echo py -3.13-64 -m pip install pyinstaller
echo py -3.13-64 -m PyInstaller --version
echo Then rerun this script.
exit /b 1
:fail
echo.
echo Build failed.