fix first launch without python
This commit is contained in:
parent
beaa76b1e1
commit
931f2dc302
1 changed files with 17 additions and 14 deletions
27
run.bat
27
run.bat
|
@ -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...
|
||||
)
|
||||
|
||||
:: Check dependencies
|
||||
python -m pip install -r .\requirements.txt >NUL
|
||||
:: Install dependencies
|
||||
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe -m pip install -r .\requirements.txt
|
||||
|
||||
:: Run app
|
||||
python .\main.py
|
||||
%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
|
||||
)
|
||||
|
||||
EXIT /b
|
||||
|
|
Reference in a new issue