-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathstart.bat
More file actions
59 lines (50 loc) · 1.34 KB
/
start.bat
File metadata and controls
59 lines (50 loc) · 1.34 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
:: Crow AI Platform — Windows Launcher
:: Double-click this file to start the setup wizard.
cd /d "%~dp0"
echo.
echo =================================================
echo Crow AI Platform
echo =================================================
echo.
:: Check for Node.js
where node >nul 2>nul
if errorlevel 1 (
echo Node.js is required but not installed.
echo.
echo Opening the Node.js download page...
echo Install Node.js, then double-click this file again.
echo.
start https://nodejs.org
pause
exit /b 1
)
for /f "tokens=1 delims=." %%a in ('node -v') do set NODE_VER=%%a
set NODE_VER=%NODE_VER:v=%
if %NODE_VER% LSS 18 (
echo Node.js is too old. Need version 18 or newer.
echo Opening the Node.js download page...
start https://nodejs.org
pause
exit /b 1
)
echo Node.js found — OK
:: Install dependencies if needed
if not exist "node_modules" (
echo Installing dependencies (first run only^)...
npm install --silent
)
:: Initialize database if needed
if not exist "data\crow.db" (
echo Initializing database...
node scripts\init-db.js
)
:: Open the setup wizard
echo.
echo Opening setup wizard in your browser...
echo If it doesn't open, go to: http://localhost:3456
echo.
echo Close this window when you're done with setup.
echo.
start http://localhost:3456
node scripts\wizard-web.js