-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
29 lines (28 loc) · 1.12 KB
/
install.bat
File metadata and controls
29 lines (28 loc) · 1.12 KB
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
@echo off
echo Checking for Python...
where python >nul 2>&1
if %errorlevel% equ 0 goto done
where python3 >nul 2>&1
if %errorlevel% equ 0 goto done
echo Python not found, downloading...
set PYTHON_ZIP=%TEMP%\py.zip
powershell -Command "Invoke-WebRequest -Uri 'https://www.python.org/ftp/python/3.11.8/python-3.11.8-embed-amd64.zip' -OutFile '%PYTHON_ZIP%'"
echo Extracting Python...
if not exist "%~dp0tools" mkdir "%~dp0tools"
powershell -Command "Expand-Archive -Path '%PYTHON_ZIP%' -DestinationPath '%~dp0tools\python' -Force"
echo lib> "%~dp0tools\python\python311._pth"
echo libs>> "%~dp0tools\python\python311._pth"
echo .>> "%~dp0tools\python\python311._pth"
echo Scripts>> "%~dp0tools\python\python311._pth"
powershell -Command "Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile '%~dp0tools\python\get-pip.py'"
"%~dp0tools\python\python.exe" "%~dp0tools\python\get-pip.py"
"%~dp0tools\python\Scripts\pip.exe" install flask flask-cors psutil
echo Python installed.
:done
echo.
echo Installation complete!
echo Run: start.bat
echo.
set /p RUN=Launch now? (Y/n):
if /i "%RUN%"=="" set RUN=y
if /i "%RUN%"=="y" start.bat