-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
104 lines (88 loc) · 2.9 KB
/
Copy pathsetup.bat
File metadata and controls
104 lines (88 loc) · 2.9 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@echo off
REM ============================================================================
REM Battery Monitor Pro - Setup & Installation Script
REM ============================================================================
setlocal enabledelayedexpansion
REM Clear screen
cls
REM Colors and formatting
echo.
echo ============================================================================
echo BATTERY MONITOR PRO - INSTALLATION WIZARD
echo ============================================================================
echo.
REM Check for Python
echo Checking for Python installation...
python --version >nul 2>&1
if errorlevel 1 (
echo.
echo [ERROR] Python is not installed or not in PATH
echo.
echo Please install Python from: https://www.python.org/downloads/
echo.
echo Steps to install Python:
echo 1. Go to https://www.python.org/downloads/
echo 2. Download Python 3.9 or newer
echo 3. Run the installer
echo 4. IMPORTANT: Check "Add Python to PATH"
echo 5. Click "Install Now"
echo.
pause
exit /b 1
)
echo [OK] Python found
for /f "tokens=*" %%i in ('python --version') do set PYTHON_VERSION=%%i
echo Version: %PYTHON_VERSION%
echo.
REM Get current directory
set APP_DIR=%cd%
echo Installation directory: %APP_DIR%
echo.
REM Create necessary directories
echo Creating directories...
if not exist "%APP_DIR%\logs" mkdir "%APP_DIR%\logs"
if not exist "%APP_DIR%\config" mkdir "%APP_DIR%\config"
echo [OK] Directories created
echo.
REM Install Python dependencies
echo.
echo ============================================================================
echo Installing Python dependencies...
echo ============================================================================
echo.
pip install -r requirements.txt
if errorlevel 1 (
echo.
echo [ERROR] Failed to install dependencies
echo.
echo Please try manually installing:
echo pip install psutil pyttsx3 win10toast
echo.
pause
exit /b 1
)
echo.
echo [OK] All dependencies installed successfully
echo.
REM Verify installation
echo.
echo ============================================================================
echo Verifying installation...
echo ============================================================================
echo.
python -c "import psutil; print('[OK] psutil version:', psutil.__version__)"
python -c "import pyttsx3; print('[OK] pyttsx3 installed')"
python -c "import win10toast; print('[OK] win10toast installed')"
echo.
echo ============================================================================
echo Installation Complete!
echo ============================================================================
echo.
echo You can now run the application using:
echo 1. Double-click: run_battery_monitor.bat
echo 2. Command line: python battery_monitor.py
echo.
echo For configuration help, see QUICKSTART.md
echo For detailed help, see README.md
echo.
pause