-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
47 lines (38 loc) · 1.25 KB
/
Copy pathinstall.bat
File metadata and controls
47 lines (38 loc) · 1.25 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@echo off
echo ============================================
echo polycontroller -- Dependency Installer
echo ============================================
echo.
:: Detect working Python command (py launcher first, avoids Windows Store stub)
set PYTHON=
py --version >nul 2>&1
if not errorlevel 1 ( set PYTHON=py & goto :found )
python3 --version >nul 2>&1
if not errorlevel 1 ( set PYTHON=python3 & goto :found )
python --version >nul 2>&1
if not errorlevel 1 ( set PYTHON=python & goto :found )
echo ERROR: Python not found.
echo Install Python from https://python.org and check "Add to PATH" during setup.
echo If Python is already installed, open the Start menu, search "Manage App
echo Execution Aliases" and disable the Python Store entries.
pause
exit /b 1
:found
echo Python command : %PYTHON%
%PYTHON% --version
echo.
:: pygame and pygame-ce cannot coexist -- remove pygame if present
echo Removing old pygame (if installed)...
%PYTHON% -m pip uninstall pygame -y >nul 2>&1
echo Installing dependencies...
%PYTHON% -m pip install --upgrade pip
%PYTHON% -m pip install -r requirements.txt
if errorlevel 1 (
echo.
echo ERROR: Installation failed. Check the output above.
pause
exit /b 1
)
echo.
echo Done! Run start.bat to launch polycontroller.
pause