fix first launch without python

This commit is contained in:
Mylloon 2023-04-02 21:43:48 +02:00
parent beaa76b1e1
commit 931f2dc302
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

31
run.bat
View file

@ -1,27 +1,30 @@
@ECHO off
:: Check python installation
python --version >NUL
python.exe --version > NUL
CLS
IF errorlevel 1 (
:: Verbose
ECHO
ECHO Installation of Python not found, installation...
ECHO Make sure you give the admin rights to the Python installer
:: Auto accept ToT
ECHO Y | winget list >NUL
:: Install Python
winget install -he Python.Python.3.11
:: Install Python 3.11 from MS Store
ECHO Y | winget install -he 9NRWMJP3717K
:: Verbose
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