-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
97 lines (83 loc) · 2.68 KB
/
start.bat
File metadata and controls
97 lines (83 loc) · 2.68 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@echo off
echo.
echo SynapseRGB Launcher
echo ===================
echo.
echo NOTE: Norton 360 must have these folders excluded or cargo build will fail:
echo C:\Users\%USERNAME%\.cargo\
echo %~dp0core\target\
echo Norton 360 ^> Settings ^> Antivirus ^> Scans and Risks ^> Exclusions
echo.
REM Add Rust to PATH. Rustup installed under dorof profile.
set "RUSTUP_BIN=C:\Users\dorof\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin"
if exist "%RUSTUP_BIN%\cargo.exe" (
set "PATH=%RUSTUP_BIN%;%PATH%"
echo Found Rust at %RUSTUP_BIN%
)
REM Also try the standard cargo bin location
if exist "C:\Users\dorof\.cargo\bin\cargo.exe" (
set "PATH=C:\Users\dorof\.cargo\bin;%PATH%"
)
if exist "C:\Users\%USERNAME%\.cargo\bin\cargo.exe" (
set "PATH=C:\Users\%USERNAME%\.cargo\bin;%PATH%"
)
REM Final check
where cargo >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Rust/Cargo not found.
echo Expected at: C:\Users\dorof\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\cargo.exe
echo Please install Rust from https://rustup.rs or fix the path in start.bat
echo.
pause
exit /b 1
)
REM Check if node is installed
where node >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Node.js not found. Install from https://nodejs.org
pause
exit /b 1
)
echo [1/3] Installing dashboard dependencies...
cd /d %~dp0dashboard
if not exist node_modules (
call npm install --silent
)
echo [2/3] Installing MCP dependencies...
cd /d %~dp0mcp
if not exist node_modules (
call npm install --silent
)
call npm run build >nul 2>&1
echo [3/3] Starting all services...
echo.
REM Free ports 7777 and 7778 if held by stale processes from a previous run
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":7777 " ^| findstr "LISTENING"') do (
echo Killing stale process on port 7777 (PID %%a)
taskkill /PID %%a /F >nul 2>&1
)
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":7778 " ^| findstr "LISTENING"') do (
echo Killing stale process on port 7778 (PID %%a)
taskkill /PID %%a /F >nul 2>&1
)
REM Start core in new window, passing PATH explicitly
cd /d %~dp0core
start "SynapseRGB Core" cmd /k "set PATH=%RUSTUP_BIN%;%PATH% && call cargo run"
REM Wait for core to start
timeout /t 5 /nobreak >nul
REM Start dashboard
cd /d %~dp0dashboard
start "SynapseRGB Dashboard" cmd /k "npm run dev"
REM Wait for dashboard to start
timeout /t 4 /nobreak >nul
REM Open browser
echo Opening browser to http://localhost:7778
start "" "http://localhost:7778"
echo.
echo SynapseRGB is starting!
echo Core: http://localhost:7777
echo Dashboard: http://localhost:7778
echo.
echo Press any key to close this window (services keep running)
pause >nul