-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathquorum.bat
More file actions
49 lines (39 loc) · 1.06 KB
/
quorum.bat
File metadata and controls
49 lines (39 loc) · 1.06 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
@echo off
REM Quorum launcher for Windows
setlocal
set "SCRIPT_DIR=%~dp0"
set "FRONTEND_DIR=%SCRIPT_DIR%frontend"
REM Check if Python venv exists (install.bat must be run first)
if not exist "%SCRIPT_DIR%.venv\Scripts\python.exe" (
echo.
echo [ERROR] Quorum is not installed.
echo.
echo Please run install.bat first:
echo install.bat
echo.
pause
exit /b 1
)
REM Check if compiled JS exists
if not exist "%FRONTEND_DIR%\dist\index.js" (
echo Building frontend...
cd /d "%FRONTEND_DIR%"
call npm run build
cd /d "%SCRIPT_DIR%"
)
REM Tell Node where Python is (so frontend can spawn backend)
set "QUORUM_PYTHON=%SCRIPT_DIR%.venv\Scripts\python.exe"
REM Set signal file for spinner coordination
set "QUORUM_SIGNAL_FILE=%TEMP%\quorum-ready-%RANDOM%"
echo Starting Quorum...
REM Run Node
node "%FRONTEND_DIR%\dist\index.js"
REM Check for error
if errorlevel 1 (
echo.
echo [ERROR] Quorum exited with an error.
pause
)
REM Cleanup signal file if it exists
if exist "%QUORUM_SIGNAL_FILE%" del "%QUORUM_SIGNAL_FILE%"
endlocal