-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathinstall.bat
More file actions
125 lines (109 loc) · 2.36 KB
/
Copy pathinstall.bat
File metadata and controls
125 lines (109 loc) · 2.36 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@echo off
REM Quorum installation script for Windows
setlocal
echo Installing Quorum...
echo.
REM Check Python
echo Checking Python...
python --version >nul 2>&1
if errorlevel 1 (
echo [FAIL] Python not found. Please install Python 3.11 or higher.
pause
exit /b 1
)
echo [OK] Python found
python --version
REM Check Node.js
echo Checking Node.js...
node --version >nul 2>&1
if errorlevel 1 (
echo [FAIL] Node.js not found. Please install Node.js 18 or higher.
pause
exit /b 1
)
echo [OK] Node.js found
node --version
REM Check npm
echo Checking npm...
call npm --version >nul 2>&1
if errorlevel 1 (
echo [FAIL] npm not found. Please install npm.
pause
exit /b 1
)
echo [OK] npm found
call npm --version
echo.
REM Check/install uv
echo Checking uv...
call uv --version >nul 2>&1
if errorlevel 1 (
echo Installing uv...
call pip install uv
if errorlevel 1 (
echo [FAIL] Failed to install uv. Please install manually: pip install uv
pause
exit /b 1
)
)
echo [OK] uv found
call uv --version
echo.
REM Remove incompatible venv if it exists (e.g., from WSL)
if exist .venv (
if not exist .venv\Scripts\python.exe (
echo Removing incompatible virtual environment...
rmdir /s /q .venv
)
)
REM Install Python dependencies with uv
echo Installing Python dependencies...
call uv sync
if errorlevel 1 (
echo [FAIL] Failed to install Python dependencies
pause
exit /b 1
)
echo [OK] Python dependencies installed
echo.
REM Install and build frontend
echo Installing frontend dependencies...
cd frontend
call npm install
if errorlevel 1 (
echo [FAIL] Failed to install frontend dependencies
cd ..
pause
exit /b 1
)
echo [OK] Frontend dependencies installed
echo Building frontend...
call npm run build
if errorlevel 1 (
echo [FAIL] Failed to build frontend
cd ..
pause
exit /b 1
)
echo [OK] Frontend built
cd ..
echo.
REM Create .env if not exists
if not exist .env (
echo Creating .env from .env.example...
copy .env.example .env >nul
echo [NOTE] Please edit .env and add your API keys
) else (
echo .env already exists
)
echo.
echo ========================================
echo Installation complete!
echo ========================================
echo.
echo Next steps:
echo 1. Edit .env with your API keys
echo 2. Run: quorum.bat
echo.
pause
endlocal