-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.bat
More file actions
68 lines (61 loc) · 1.6 KB
/
install.bat
File metadata and controls
68 lines (61 loc) · 1.6 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
@echo off
setlocal
set "REPO_URL=https://github.com/tanzcoding/AlphaSolve/archive/refs/heads/main.zip"
set "REPO_DIR=AlphaSolve-main"
echo ========================================
echo AlphaSolve Installer
echo ========================================
echo.
:: -- 1. Install uv -------------------------------------------------
where uv >nul 2>nul
if %errorlevel%==0 (
echo [1/3] uv already installed, skipping...
goto :download
)
echo [1/3] Installing uv...
echo.
powershell -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex"
if %errorlevel% neq 0 (
echo [ERROR] Failed to install uv.
pause
exit /b 1
)
set "PATH=%USERPROFILE%\.cargo\bin;%PATH%"
:: -- 2. Download AlphaSolve ----------------------------------------
:download
echo.
echo [2/3] Downloading AlphaSolve...
echo.
if exist "%REPO_DIR%" rmdir /s /q "%REPO_DIR%"
curl -fsSL %REPO_URL% -o alpha.zip
if %errorlevel% neq 0 (
echo [ERROR] Download failed. Check your internet connection.
pause
exit /b 1
)
tar -xf alpha.zip
del alpha.zip
:: -- 3. Install ----------------------------------------------------
echo.
echo [3/3] Installing AlphaSolve...
echo.
cd /d "%REPO_DIR%"
uv tool install .
if %errorlevel% neq 0 (
echo [ERROR] Installation failed.
pause
exit /b 1
)
cd ..
rmdir /s /q "%REPO_DIR%"
echo.
echo ========================================
echo Installation complete!
echo ========================================
echo.
echo To get started:
echo 1. Create a folder anywhere, put a problem.md in it
echo 2. Right-click the folder - "Open in Terminal"
echo 3. Run: alphasolve
echo.
pause