-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
87 lines (77 loc) · 2.22 KB
/
Copy pathbuild.bat
File metadata and controls
87 lines (77 loc) · 2.22 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@echo off
echo =============================================
echo ParallelMonitor - Build Script
echo =============================================
echo.
REM --- 1. Check Python ---
echo [1/5] Checking Python...
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python not found. Install Python 3.9+
pause
exit /b 1
)
echo OK
REM --- 2. Install deps ---
echo.
echo [2/5] Installing dependencies...
pip install -r requirements.txt --upgrade --quiet --no-warn-script-location
if errorlevel 1 (
echo.
echo [ERROR] pip install failed.
echo.
echo This is likely caused by Windows Long Path limit.
echo To fix, run the following command as Administrator:
echo.
echo reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
echo.
echo Then RESTART your PC and re-run build.bat.
pause
exit /b 1
)
echo Done
REM --- 3. Install PyInstaller ---
echo.
echo [3/5] Installing PyInstaller...
pip install pyinstaller --upgrade --quiet --no-warn-script-location
if errorlevel 1 (
echo [ERROR] Failed to install PyInstaller
pause
exit /b 1
)
echo Done
REM --- 4. Clean ---
echo.
echo [4/5] Cleaning old builds...
if exist build rmdir /s /q build
if exist dist rmdir /s /q dist
echo Done
REM --- 5. Build ---
echo.
echo [5/5] Building (may take a few minutes)...
echo.
python -m PyInstaller ParallelMonitor.spec
if errorlevel 1 (
echo.
echo =============================================
echo BUILD FAILED!
echo Common issues:
echo 1. Antivirus deleted temp files - disable AV and retry
echo 2. Path with non-ASCII chars - use plain ASCII path
echo 3. Dependency conflict - build in a virtualenv
echo =============================================
pause
exit /b 1
)
echo.
echo =============================================
echo BUILD SUCCESS!
echo Output: dist\ParallelMonitor.exe
echo.
echo Requirements to run:
echo - Edge or Chrome installed on target PC
echo - No Python or Playwright needed
echo =============================================
echo.
start "" "dist"
pause