@echo off
echo Starting Antigravity with CDP on port 9000...
echo.

REM 일반적인 설치 경로들을 순서대로 시도
set "AG_PATH="

if exist "%LOCALAPPDATA%\Programs\Antigravity\Antigravity.exe" (
    set "AG_PATH=%LOCALAPPDATA%\Programs\Antigravity\Antigravity.exe"
)
if "%AG_PATH%"=="" if exist "%ProgramFiles%\Antigravity\Antigravity.exe" (
    set "AG_PATH=%ProgramFiles%\Antigravity\Antigravity.exe"
)
if "%AG_PATH%"=="" if exist "%ProgramFiles(x86)%\Antigravity\Antigravity.exe" (
    set "AG_PATH=%ProgramFiles(x86)%\Antigravity\Antigravity.exe"
)

if "%AG_PATH%"=="" (
    echo [ERROR] Antigravity.exe 를 찾을 수 없습니다.
    echo 아래 경로를 확인해주세요:
    echo   - %LOCALAPPDATA%\Programs\Antigravity\
    echo   - %ProgramFiles%\Antigravity\
    echo.
    echo 수동 실행: "경로\Antigravity.exe" --remote-debugging-port=9000
    pause
    exit /b 1
)

echo Found: %AG_PATH%
start "" "%AG_PATH%" --remote-debugging-port=9000
echo Done. Antigravity should be starting with CDP on port 9000.
pause
