fix first launch without python
This commit is contained in:
parent
beaa76b1e1
commit
931f2dc302
1 changed files with 17 additions and 14 deletions
31
run.bat
31
run.bat
|
@ -1,27 +1,30 @@
|
||||||
@ECHO off
|
@ECHO off
|
||||||
|
|
||||||
:: Check python installation
|
:: Check python installation
|
||||||
python --version >NUL
|
python.exe --version > NUL
|
||||||
|
CLS
|
||||||
IF errorlevel 1 (
|
IF errorlevel 1 (
|
||||||
:: Verbose
|
:: Verbose
|
||||||
ECHO
|
|
||||||
ECHO Installation of Python not found, installation...
|
ECHO Installation of Python not found, installation...
|
||||||
ECHO Make sure you give the admin rights to the Python installer
|
|
||||||
|
|
||||||
:: Auto accept ToT
|
:: Install Python 3.11 from MS Store
|
||||||
ECHO Y | winget list >NUL
|
ECHO Y | winget install -he 9NRWMJP3717K
|
||||||
|
|
||||||
:: Install Python
|
|
||||||
winget install -he Python.Python.3.11
|
|
||||||
|
|
||||||
:: Verbose
|
:: Verbose
|
||||||
ECHO Download and installation of dependencies...
|
ECHO Download and installation of dependencies...
|
||||||
|
|
||||||
|
:: Install dependencies
|
||||||
|
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe -m pip install -r .\requirements.txt
|
||||||
|
|
||||||
|
:: Run app
|
||||||
|
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe .\main.py
|
||||||
|
|
||||||
|
) ELSE (
|
||||||
|
:: Check dependencies
|
||||||
|
python.exe -m pip install -r .\requirements.txt > NUL
|
||||||
|
|
||||||
|
:: Run app
|
||||||
|
python.exe .\main.py
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Check dependencies
|
|
||||||
python -m pip install -r .\requirements.txt >NUL
|
|
||||||
|
|
||||||
:: Run app
|
|
||||||
python .\main.py
|
|
||||||
|
|
||||||
EXIT /b
|
EXIT /b
|
||||||
|
|
Reference in a new issue