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 @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