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