From 5bf40449f891e14623f07b2b118947828a8dc72d Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 3 Apr 2023 05:00:18 +0200 Subject: [PATCH] use of variables --- run.bat | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/run.bat b/run.bat index 68378df..7ffdcbe 100644 --- a/run.bat +++ b/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