feat: add PyInstaller spec + Windows build script (console=True)

This commit is contained in:
2026-06-12 16:51:26 +08:00
parent 4c01acdf69
commit 0d66f65ef2
2 changed files with 110 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
@echo off
setlocal
echo ============================================================
echo Zynq Flasher — Windows x64 Build Script
echo ============================================================
echo.
REM ── 1. Check Python ─────────────────────────────────────────
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Python not found. Install Python 3.9+ first.
pause
exit /b 1
)
echo [1/4] Python: OK
REM ── 2. Install dependencies ─────────────────────────────────
echo [2/4] Installing Python packages...
pip install -r requirements.txt --quiet
pip install pyinstaller --quiet
echo Done.
REM ── 3. Clean previous builds ────────────────────────────────
echo [3/4] Cleaning previous builds...
if exist build rmdir /s /q build
if exist dist\ZynqFlaster.exe del /q dist\ZynqFlaster.exe
if not exist dist mkdir dist
REM ── 4. Build ────────────────────────────────────────────────
echo [4/4] Building ZynqFlaster.exe...
pyinstaller --clean --noconfirm ZynqFlaster.spec
echo.
if exist dist\ZynqFlaster.exe (
echo ============================================================
echo Build successful!
echo Output: dist\ZynqFlaster.exe
echo ============================================================
) else (
echo [ERROR] Build failed — dist\ZynqFlaster.exe not found.
pause
exit /b 1
)
endlocal
pause