-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstart_windows.bat
35 lines (27 loc) · 920 Bytes
/
start_windows.bat
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
@echo off
REM Set the directory for the virtual environment
set VENV_DIR=venv
REM Check if the virtual environment directory exists
if not exist "%VENV_DIR%" (
echo Creating a new virtual environment...
python -m venv %VENV_DIR%
)
REM Activate the virtual environment
call %VENV_DIR%\Scripts\activate.bat
REM Checking and installing required packages
echo Checking and installing required packages...
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
REM Check if last command was successful
if %errorlevel% neq 0 (
echo Failed to install required dependencies. Exiting.
pause
exit /b %errorlevel%
)
REM Launching main application
echo Launching main application...
python main.py
REM Keep the window open after the script execution
pause
REM Deactivate the virtual environment on completion
call %VENV_DIR%\Scripts\deactivate.bat