37 lines
763 B
Batchfile
37 lines
763 B
Batchfile
@ECHO off
|
|
|
|
:: Check python installation
|
|
python.exe --version > NUL
|
|
|
|
:: Clean potential error or python version
|
|
CLS
|
|
|
|
:: Variables
|
|
set "pipR=pip install -r .\requirements.txt"
|
|
set "py=python.exe"
|
|
|
|
IF errorlevel 1 (
|
|
ECHO Installation of Python not found, installation...
|
|
|
|
:: Install Python 3.11 from MS Store
|
|
ECHO Y | winget install -he 9NRWMJP3717K
|
|
|
|
ECHO Download and installation of dependencies...
|
|
|
|
:: Location of Python
|
|
set "py=%LOCALAPPDATA%\Microsoft\WindowsApps\%py%"
|
|
|
|
:: Update pip
|
|
%py% -m pip install --upgrade pip
|
|
|
|
:: Install dependencies
|
|
%py% -m %pipR%
|
|
) ELSE (
|
|
:: Check dependencies
|
|
python.exe -m %pipR% > NUL
|
|
)
|
|
|
|
:: Run app
|
|
%py% .\main.py --list=1,2,3,4,5,7,8
|
|
|
|
EXIT /b
|