-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
72 lines (67 loc) · 1.85 KB
/
build.bat
File metadata and controls
72 lines (67 loc) · 1.85 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
@echo off
chcp 65001 >NUL
title ZapretTester Build
echo ============================================================
echo ZapretTester - Build Standalone EXE
echo ============================================================
echo.
:: Check Python
python --version >NUL 2>&1
if errorlevel 1 (
echo ERROR: Python not found!
echo Install Python from https://python.org and add to PATH.
echo.
pause
exit /b 1
)
echo [OK] Python found:
python --version
echo.
:: Install dependencies
echo [1/3] Installing dependencies...
echo.
pip install PyQt6 pyinstaller psutil requests ping3
if errorlevel 1 (
echo.
echo ERROR: Failed to install dependencies!
pause
exit /b 1
)
echo.
:: Check required files
echo [2/3] Checking files...
if not exist "zapret_tester.py" (
echo ERROR: zapret_tester.py not found!
echo Make sure you run this bat from the same folder as zapret_tester.py
pause
exit /b 1
)
if not exist "zapret_tester.spec" (
echo ERROR: zapret_tester.spec not found!
pause
exit /b 1
)
if not exist "1.ico" echo WARNING: 1.ico not found
if not exist "on.png" echo WARNING: on.png not found
if not exist "off.png" echo WARNING: off.png not found
echo.
:: Build
echo [3/3] Building EXE...
echo.
pyinstaller zapret_tester.spec --clean --noconfirm
echo.
:: Result
if exist "dist\ZapretTester.exe" (
echo ============================================================
echo SUCCESS: dist\ZapretTester.exe
echo.
echo Copy ZapretTester.exe somewhere and place a "zapret"
echo folder next to it with your zapret discord youtube files.
echo ============================================================
) else (
echo ============================================================
echo BUILD FAILED - see errors above
echo ============================================================
)
echo.
pause