-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
70 lines (61 loc) · 2.17 KB
/
build.bat
File metadata and controls
70 lines (61 loc) · 2.17 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
title SHIELD — Build Tool by SaruProDev
echo.
echo =====================================================
echo SHIELD v2 — USB Kill Switch
echo by SaruProDev ^| github.com/SaruProDev
echo No UAC. No Delay. No Mercy.
echo =====================================================
echo.
:: ── Check Python ──────────────────────────────────────────
python --version >nul 2>&1
IF ERRORLEVEL 1 (
echo [!] Python not found.
echo Download it from https://python.org
echo Make sure to tick "Add Python to PATH" during install.
echo.
pause
exit /b 1
)
for /f "tokens=*" %%i in ('python --version') do echo [check] %%i found.
:: ── Check / Install PyInstaller ───────────────────────────
echo.
pip show pyinstaller >nul 2>&1
IF ERRORLEVEL 1 (
echo [*] PyInstaller not found. Installing...
pip install pyinstaller --quiet
echo [check] PyInstaller installed.
) ELSE (
echo [check] PyInstaller already installed.
)
:: ── Build ─────────────────────────────────────────────────
echo.
echo [*] Compiling killswitch.py to shield.exe ...
echo This takes 30-60 seconds. Do not close this window.
echo.
python -m PyInstaller ^
--onefile ^
--noconsole ^
--uac-admin ^
--name "shield" ^
killswitch.py >nul 2>&1
echo.
IF EXIST "dist\shield.exe" (
echo [SUCCESS] Compilation successful!
echo.
IF NOT EXIST "SHIELD_USB" mkdir SHIELD_USB
copy "dist\shield.exe" "SHIELD_USB\shield.exe" >nul
echo shield.exe is ready in .\SHIELD_USB\
echo.
echo NEXT STEPS:
echo 1. Label your USB drive: SHIELD
echo 2. Copy shield.exe to the ROOT of the USB
echo 3. Run setup_shield.ps1 as Administrator
echo 4. Log out and back in
echo 5. Plug in USB = instant shutdown
) ELSE (
echo [FAILED] Build failed. Check output above for errors.
echo Common fix: right-click build.bat and Run as Administrator.
)
echo.
pause