-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_windows.bat
More file actions
70 lines (61 loc) · 1.78 KB
/
Copy pathbuild_windows.bat
File metadata and controls
70 lines (61 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
REM ================================================================
REM SerialLink Doctor — one-file Windows EXE build script
REM Prerequisites: Python 3.10+, pip install -r requirements.txt
REM ================================================================
title Building SerialLink Doctor EXE...
echo.
echo ⚡ SerialLink Doctor — PyInstaller Build
echo ========================================
echo.
REM --- Check for Python ---
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python not found on PATH. Install Python 3.10+ first.
pause
exit /b 1
)
REM --- Install dependencies if needed ---
echo [1/3] Installing Python dependencies...
pip install -r requirements.txt --quiet
if errorlevel 1 (
echo [ERROR] Failed to install dependencies.
pause
exit /b 1
)
REM --- Clean previous build ---
echo [2/3] Cleaning previous build artifacts...
if exist "build" rmdir /s /q "build"
if exist "dist" rmdir /s /q "dist"
if exist "*.spec" del /q "*.spec"
REM --- Build one-file EXE ---
echo [3/3] Building EXE with PyInstaller (this may take a few minutes)...
echo.
python -m PyInstaller ^
--clean ^
--onefile ^
--windowed ^
--name "SerialLink-Doctor" ^
--icon "icon.png" ^
--add-data "icon.png;." ^
--add-data "app;app" ^
main.py
if errorlevel 1 (
echo.
echo [ERROR] PyInstaller build failed.
echo Check output above for details.
pause
exit /b 1
)
echo.
echo =============================================
echo ✅ Build complete!
echo.
echo EXE located at: dist\SerialLink-Doctor.exe
echo.
echo Size:
dir "dist\SerialLink-Doctor.exe" 2>nul | find "SerialLink-Doctor.exe"
echo.
echo Copy this file to any Windows PC — no install needed.
echo =============================================
pause