-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
75 lines (68 loc) · 1.81 KB
/
setup.bat
File metadata and controls
75 lines (68 loc) · 1.81 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
@echo off
REM NetGuard DNS Monitor - Windows Setup Script
REM Automated installation for Windows
echo.
echo ================================================================
echo.
echo NetGuard DNS Monitor - Windows Setup
echo.
echo ================================================================
echo.
REM Check Python installation
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Python is not installed or not in PATH
echo Please install Python 3.8+ from python.org
pause
exit /b 1
)
echo [1/4] Python detected successfully
echo.
REM Create virtual environment
echo [2/4] Creating virtual environment...
if exist venv (
echo Virtual environment already exists. Skipping...
) else (
python -m venv venv
if %errorlevel% neq 0 (
echo ERROR: Failed to create virtual environment
pause
exit /b 1
)
echo Virtual environment created successfully
)
echo.
REM Activate virtual environment and install dependencies
echo [3/4] Installing dependencies...
call venv\Scripts\activate.bat
python -m pip install --upgrade pip
pip install -r requirements.txt
if %errorlevel% neq 0 (
echo ERROR: Failed to install dependencies
pause
exit /b 1
)
echo Dependencies installed successfully
echo.
REM Setup complete
echo [4/4] Setup complete!
echo.
echo ================================================================
echo.
echo Setup Complete! Next Steps:
echo.
echo 1. Activate virtual environment:
echo venv\Scripts\activate
echo.
echo 2. Run NetGuard (as Administrator):
echo python main.py
echo.
echo 3. Configure device DNS settings
echo - Set Primary DNS to your computer's IP
echo - Set Secondary DNS to 8.8.8.8
echo.
echo Read QUICK_SETUP.md for more details
echo.
echo ================================================================
echo.
pause