forked from Special-K-s-Flightsim-Bots/DCSServerBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.cmd
More file actions
35 lines (32 loc) · 1.03 KB
/
install.cmd
File metadata and controls
35 lines (32 loc) · 1.03 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
@echo off
echo.
echo ___ ___ ___ ___ ___ _
echo ^| \ / __/ __/ __^| ___ _ ___ _____ _ _^| _ ) ___^| ^|_
echo ^| ^|) ^| (__\__ \__ \/ -_) '_\ V / -_) '_^| _ \/ _ \ _^|
echo ^|___/ \___^|___/___/\___^|_^| \_/\___^|_^| ^|___/\___/\__^|
echo.
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
)
"%VENV%\Scripts\python" install.py %*
echo Please press any key to continue...
pause > NUL