use of variables
This commit is contained in:
parent
4216c9ee97
commit
5bf40449f8
1 changed files with 8 additions and 4 deletions
12
run.bat
12
run.bat
|
@ -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
|
||||
|
|
Reference in a new issue