-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
69 lines (61 loc) · 1.93 KB
/
Copy pathinstall.bat
File metadata and controls
69 lines (61 loc) · 1.93 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
setlocal EnableDelayedExpansion
echo ==========================================
echo GNUTempo Windows Installer
echo ==========================================
echo.
:: 1. Check if Python is installed
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Python is not installed or not in PATH.
echo Please install Python from https://www.python.org/downloads/
echo Make sure to check "Add Python to PATH" during installation.
pause
exit /b 1
)
echo [OK] Python found.
python -c "import sys; print('Version:', sys.version)"
:: 2. Install dependencies (pygame)
echo.
echo Installing dependencies (pygame)...
pip install pygame
if %errorlevel% neq 0 (
echo [WARNING] Failed to install pygame automatically.
echo Please run: pip install pygame
) else (
echo [OK] Dependencies installed.
)
:: 3. Create the 'gnutempo' command wrapper
echo.
echo Creating system command...
set "SCRIPT_DIR=%~dp0"
set "WRAPPER_FILE=%SCRIPT_DIR%gnutempo.cmd"
(
echo @echo off
echo python "%SCRIPT_DIR%OpenTempo.py" %%*
) > "!WRAPPER_FILE!"
echo [OK] Created wrapper script: gnutempo.cmd
:: 4. Instructions for PATH
echo.
echo ==========================================
echo INSTALLATION COMPLETE
echo ==========================================
echo.
echo To run 'gnutempo' from any terminal, you need to add this folder to your PATH.
echo.
echo Current Folder: %SCRIPT_DIR%
echo.
echo OPTION A (Easy): Run this script from this folder always.
echo Usage: .\gnutempo start
echo.
echo OPTION B (System-wide): Add this folder to your Environment Variables.
echo 1. Press Win+R, type 'sysdm.cpl', hit Enter.
echo 2. Go to 'Advanced' tab -> 'Environment Variables'.
echo 3. Under 'User variables', find 'Path', select it, click 'Edit'.
echo 4. Click 'New' and paste: %SCRIPT_DIR%
echo 5. Click OK on all windows.
echo 6. Restart your terminal.
echo.
echo After Option B, you can run 'gnutempo' from anywhere!
echo.
pause