This repository has been archived on 2023-09-02. You can view files and clone it, but cannot push or open issues or pull requests.
csh/run.bat

32 lines
708 B
Batchfile
Raw Normal View History

2023-04-02 20:37:04 +02:00
@ECHO off
:: Check python installation
2023-04-02 21:43:48 +02:00
python.exe --version > NUL
2023-04-02 22:37:54 +02:00
:: Clean potential error or python version
2023-04-02 21:43:48 +02:00
CLS
2023-04-02 22:37:54 +02:00
2023-04-02 20:37:04 +02:00
IF errorlevel 1 (
ECHO Installation of Python not found, installation...
2023-04-02 21:43:48 +02:00
:: Install Python 3.11 from MS Store
ECHO Y | winget install -he 9NRWMJP3717K
2023-04-02 20:37:04 +02:00
ECHO Download and installation of dependencies...
2023-04-02 21:43:48 +02:00
:: Install dependencies
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe -m pip install -r .\requirements.txt
:: Run app
%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe .\main.py
2023-04-02 20:37:04 +02:00
2023-04-02 21:43:48 +02:00
) ELSE (
:: Check dependencies
python.exe -m pip install -r .\requirements.txt > NUL
:: Run app
python.exe .\main.py
)
2023-04-02 20:37:04 +02:00
EXIT /b