From 931f2dc30240354b3fd7491a89ef8d68cf6eada4 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 2 Apr 2023 21:43:48 +0200 Subject: [PATCH] fix first launch without python --- run.bat | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/run.bat b/run.bat index 619e0f3..0e91ef9 100644 --- a/run.bat +++ b/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... + + :: 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