-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
65 lines (56 loc) · 1.55 KB
/
Copy pathinstall.bat
File metadata and controls
65 lines (56 loc) · 1.55 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
@echo off
cd /d "%~dp0"
:: ============================================
:: VM Manager - Install Dependencies
:: ============================================
echo ==================================================
echo VM Manager - Dependency Installer
echo ==================================================
echo.
:: Check if Python is installed
python --version >nul 2>&1
if %errorLevel% neq 0 (
echo [ERROR] Python is not installed or not in PATH!
echo.
echo Please install Python from https://www.python.org/downloads/
echo Make sure to check "Add Python to PATH" during installation.
echo.
pause
exit /b 1
)
echo [OK] Python found
python --version
echo.
:: Check if virtual environment already exists
if exist ".venv\Scripts\python.exe" (
echo [INFO] Virtual environment already exists
goto:INSTALL_DEPS
)
echo [INFO] Creating virtual environment...
python -m venv .venv
if %errorLevel% neq 0 (
echo [ERROR] Failed to create virtual environment!
pause
exit /b 1
)
echo [OK] Virtual environment created
echo.
:INSTALL_DEPS
echo [INFO] Installing dependencies...
.venv\Scripts\python.exe -m pip install --upgrade pip
.venv\Scripts\pip.exe install -r requirements.txt
if %errorLevel% neq 0 (
echo.
echo [ERROR] Failed to install dependencies!
pause
exit /b 1
)
echo.
echo ==================================================
echo Installation completed successfully!
echo ==================================================
echo.
echo To run the application, double-click:
echo Run_VM_Manager.bat
echo.
pause