forked from Special-K-s-Flightsim-Bots/DCSServerBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.cmd
More file actions
30 lines (28 loc) · 869 Bytes
/
update.cmd
File metadata and controls
30 lines (28 loc) · 869 Bytes
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
@echo off
python --version >NUL 2>&1
if errorlevel 9009 (
echo.
echo *** ERROR ***
echo python.exe was not found in your PATH.
echo Please run the Python installer and check "Add python to the environment".
exit /B 9009
)
python -c "import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)" >NUL 2>&1
if errorlevel 1 (
echo.
echo *** ERROR ***
echo DCSServerBot requires Python >= 3.10.
exit /B 1
)
SET VENV=%USERPROFILE%\.dcssb
if not exist "%VENV%" (
echo Creating the Python Virtual Environment ...
python -m venv "%VENV%"
"%VENV%\Scripts\python.exe" -m pip install --upgrade pip
"%VENV%\Scripts\pip" install -r requirements.txt
) else (
"%VENV%\Scripts\python.exe" -m pip install --upgrade pip
)
"%VENV%\Scripts\python" update.py --no-restart %*
echo Please press any key to continue...
pause > NUL