-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.bat
33 lines (29 loc) · 784 Bytes
/
run.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@echo off
chcp 65001
echo.
cd %~dp0
%SYSTEMROOT%\py.exe -V > NUL 2>&1
IF %ERRORLEVEL% neq 0 goto reattempt
if exist "config.ini" (
%SYSTEMROOT%\py.exe -m pipenv run python WebcamMonitor.py
) else (
%SYSTEMROOT%\py.exe -m pipenv run python camutils.py
echo "initialized 'config.ini'. Please configure the file before running the program."
)
PAUSE
goto end
:reattempt
py.exe -V > NUL 2>&1
if %ERRORLEVEL% neq 0 goto message
if exist "config.ini" (
py.exe -m pipenv run python WebcamMonitor.py
) else (
py.exe -m pipenv run python camutils.py
echo "initialized 'config.ini'. Please configure the file before running the program."
)
PAUSE
goto end
:message
echo "There is no valid Python 3.13.0 or higher available. Please install Python ^>=3.13.0."
PAUSE
:end