-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
39 lines (35 loc) · 1.07 KB
/
build.bat
File metadata and controls
39 lines (35 loc) · 1.07 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
@echo off
setlocal
REM ============================================================
REM CS2 Admin Tool — Windows build
REM Produces a single self-contained CS2AdminTool.exe
REM No Python, no Azure CLI, no config files needed by the user
REM ============================================================
if not exist config.json (
echo ERROR: config.json not found.
echo Run prepare_config.bat first, or copy config.example.json to config.json and fill it in.
exit /b 1
)
echo Installing dependencies...
pip install -r requirements.txt
pip install pyinstaller
echo.
echo Building exe...
pyinstaller ^
--onefile ^
--noconsole ^
--name "CS2AdminTool" ^
--add-data "config.json;." ^
--paths src ^
src\main.py
echo.
if exist dist\CS2AdminTool.exe (
echo === Build complete ===
echo Executable: dist\CS2AdminTool.exe
echo.
echo This exe is fully self-contained — distribute ONLY the .exe file.
echo No config, no keys, no Python, no Azure CLI needed on the target machine.
) else (
echo === Build FAILED — check errors above ===
exit /b 1
)