-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
59 lines (50 loc) · 1.48 KB
/
Copy pathinstall.bat
File metadata and controls
59 lines (50 loc) · 1.48 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
@echo off
chcp 65001 >nul 2>&1
REM Polar Installer for Windows
REM
REM Usage: git clone https://github.com/hbsjz-swl/dlc-cli.git && cd dlc-cli && install.bat
setlocal
set APP_HOME=%USERPROFILE%\.dlc
echo.
echo Installing Polar - Local AI Coding Agent ...
echo Install dir: %APP_HOME%
echo.
if not exist "%APP_HOME%\bin" mkdir "%APP_HOME%\bin"
REM Copy jar and launcher from local clone
if exist "dlc.jar" (
echo Copying files from local directory...
copy /Y "dlc.jar" "%APP_HOME%\dlc.jar" >nul
) else (
echo Error: dlc.jar not found in current directory.
echo Please run this from the cloned repository.
pause
exit /b 1
)
REM Copy launcher scripts from bin/
if exist "bin\polar.cmd" (
copy /Y "bin\polar.cmd" "%APP_HOME%\bin\polar.cmd" >nul
) else (
echo Error: bin\polar.cmd not found.
pause
exit /b 1
)
if exist "bin\dlc.cmd" copy /Y "bin\dlc.cmd" "%APP_HOME%\bin\dlc.cmd" >nul
echo Created launcher: %APP_HOME%\bin\polar.cmd
REM Add to user PATH
echo %PATH% | findstr /i ".dlc\bin" >nul 2>&1
if errorlevel 1 (
echo Adding to PATH...
powershell -Command "[Environment]::SetEnvironmentVariable('PATH', [Environment]::GetEnvironmentVariable('PATH', 'User') + ';%APP_HOME%\bin', 'User')"
echo Added %APP_HOME%\bin to user PATH
)
echo.
echo Polar installed successfully!
echo.
echo Close and reopen your terminal, then run:
echo cd \your\project
echo polar
echo.
echo Update to latest version:
echo polar upgrade
echo.
pause