forked from Wechat-ggGitHub/wechat-claude-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-windows.cmd
More file actions
50 lines (40 loc) · 845 Bytes
/
start-windows.cmd
File metadata and controls
50 lines (40 loc) · 845 Bytes
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
@echo off
setlocal
set NO_PAUSE=0
if /I "%~1"=="--no-pause" set NO_PAUSE=1
cd /d "%~dp0"
echo == WeChat OpenCode Windows desktop starter ==
echo Project: %cd%
echo.
where node >nul 2>nul
if errorlevel 1 (
echo Error: Node.js is not installed or not in PATH.
goto :fail
)
where npm >nul 2>nul
if errorlevel 1 (
echo Error: npm is not installed or not in PATH.
goto :fail
)
where opencode >nul 2>nul
if errorlevel 1 (
echo Error: opencode is not installed or not in PATH.
goto :fail
)
echo Installing dependencies...
call npm install
if errorlevel 1 goto :fail
echo.
echo Starting Electron desktop console...
call npm run desktop
if errorlevel 1 goto :fail
goto :end
:fail
echo.
echo Startup failed. See the error above.
if "%NO_PAUSE%"=="0" pause
exit /b 1
:end
echo.
echo Desktop console exited.
if "%NO_PAUSE%"=="0" pause