-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathsetup.bat
More file actions
69 lines (61 loc) · 1.72 KB
/
setup.bat
File metadata and controls
69 lines (61 loc) · 1.72 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
echo ===================================================
echo AI Studio Proxy API - Setup (Windows)
echo ===================================================
echo.
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Python not found. Please install Python 3.9+
echo https://www.python.org/downloads/
pause
exit /b 1
)
echo [OK] Python detected.
set "UV_CMD=uv"
uv --version >nul 2>&1
if %errorlevel% neq 0 (
echo [INFO] Installing uv...
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
set "PATH=%USERPROFILE%\.local\bin;%PATH%"
uv --version >nul 2>&1
if %errorlevel% neq 0 (
if exist "%USERPROFILE%\.local\bin\uv.exe" (
echo [INFO] Using uv from absolute path...
set "UV_CMD=%USERPROFILE%\.local\bin\uv.exe"
) else (
echo [ERROR] uv installation failed.
echo Please restart terminal and try again.
pause
exit /b 1
)
)
)
echo [OK] uv ready.
echo.
echo [INFO] Installing dependencies...
call "%UV_CMD%" sync
if %errorlevel% neq 0 (
echo [ERROR] Dependency installation failed.
pause
exit /b 1
)
echo.
echo [INFO] Downloading Camoufox browser...
call "%UV_CMD%" run camoufox fetch
if %errorlevel% neq 0 (
echo [WARNING] Browser download may have issues.
echo You can try later: uv run camoufox fetch
) else (
echo [OK] Browser downloaded.
)
echo.
echo ===================================================
echo Setup Complete!
echo ===================================================
echo.
echo To start:
echo 1. Double-click 'start_webui.bat' for Web UI
echo 2. Double-click 'start_cmd.bat' for CLI
echo.
pause