-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
124 lines (115 loc) · 3.21 KB
/
Copy pathsetup.bat
File metadata and controls
124 lines (115 loc) · 3.21 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
@echo off
REM =========================================
REM HMSCC Platform - Automated Setup Script
REM =========================================
REM This script installs all dependencies for
REM Frontend, Backend, and Compiler
setlocal enabledelayedexpansion
echo.
echo =========================================
echo HMSCC Platform - Complete Setup
echo =========================================
echo.
REM Get current directory
set ROOT_DIR=%cd%
echo Checking prerequisites...
where npm >nul 2>nul
if %errorlevel% neq 0 (
echo ERROR: npm is not installed or not in PATH
echo Please install Node.js from https://nodejs.org/
pause
exit /b 1
)
where cmake >nul 2>nul
if %errorlevel% neq 0 (
echo WARNING: cmake is not installed
echo Compiler will not build. Install from https://cmake.org/
)
echo.
echo =========================================
echo 1. Installing Frontend Dependencies
echo =========================================
cd /d "%ROOT_DIR%\frontend"
if %errorlevel% neq 0 (
echo ERROR: Could not enter frontend directory
pause
exit /b 1
)
call npm install
if %errorlevel% neq 0 (
echo ERROR: Frontend installation failed
pause
exit /b 1
)
echo ✓ Frontend dependencies installed
echo.
echo =========================================
echo 2. Installing Backend Dependencies
echo =========================================
cd /d "%ROOT_DIR%\backend"
if %errorlevel% neq 0 (
echo ERROR: Could not enter backend directory
pause
exit /b 1
)
call npm install
if %errorlevel% neq 0 (
echo ERROR: Backend installation failed
pause
exit /b 1
)
echo ✓ Backend dependencies installed
echo.
echo =========================================
echo 3. Building Compiler (Optional)
echo =========================================
where cmake >nul 2>nul
if %errorlevel% equ 0 (
cd /d "%ROOT_DIR%\compiler"
if not exist build mkdir build
cd /d "%ROOT_DIR%\compiler\build"
cmake ..
if %errorlevel% equ 0 (
cmake --build . --config Release
if %errorlevel% equ 0 (
echo ✓ Compiler built successfully
) else (
echo ✗ Compiler build failed (non-critical)
)
) else (
echo ✗ CMake configuration failed
)
) else (
echo ⊘ Skipping compiler build (cmake not found)
echo You can build manually later:
echo cd compiler ^&^& mkdir build ^&^& cd build
echo cmake .. ^&^& cmake --build . --config Release
)
echo.
echo =========================================
echo Setup Complete! ✓
echo =========================================
echo.
echo To start development:
echo.
echo Terminal 1 - Frontend (http://localhost:5173):
echo cd frontend
echo npm run dev
echo.
echo Terminal 2 - Backend (http://localhost:5001):
echo cd backend
echo npm start
echo.
echo Terminal 3 - Test API:
echo curl http://localhost:5001/health
echo curl -X POST http://localhost:5001/compile ^
echo -H "Content-Type: application/json" ^
echo -d "{\"code\":\"arena () { speak 42; }\"}"
echo.
echo Documentation:
echo - FIX_SUMMARY.md - Setup and fix details
echo - DEPLOYMENT_GUIDE.md - Deploy to Render
echo - QUICK_REFERENCE.md - API and usage
echo.
echo =========================================
pause