use of variables

This commit is contained in:
Mylloon 2023-04-03 05:00:18 +02:00
parent 4216c9ee97
commit 5bf40449f8
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

12
run.bat
View file

@ -6,6 +6,10 @@ python.exe --version > NUL
:: Clean potential error or python version
CLS
:: Variables
set "pipR=pip install -r .\requirements.txt"
set "run=.\main.py"
IF errorlevel 1 (
ECHO Installation of Python not found, installation...
@ -15,17 +19,17 @@ IF errorlevel 1 (
ECHO Download and installation of dependencies...
:: Install dependencies
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe -m pip install -r .\requirements.txt
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe -m %pipR%
:: Run app
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe .\main.py
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe %run%
) ELSE (
:: Check dependencies
python.exe -m pip install -r .\requirements.txt > NUL
python.exe -m %pipR% > NUL
:: Run app
python.exe .\main.py
python.exe %run%
)
EXIT /b