-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
82 lines (73 loc) · 1.85 KB
/
setup.bat
File metadata and controls
82 lines (73 loc) · 1.85 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
@echo on
echo ======================================================================
echo OFMentor - Setup and Installation
echo ======================================================================
echo This script will install all required dependencies for OFMentor
echo.
REM Check if Python is installed
where python >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Python is not installed or not in PATH
echo Please install Python 3.9+ and try again
pause
exit /b 1
)
REM Check if Node.js is installed
where npm >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Node.js is not installed or not in PATH
echo Please install Node.js 18+ and try again
pause
exit /b 1
)
REM Create logs directory
if not exist logs mkdir logs
echo.
echo [Step 1/4] Installing Python backend dependencies...
echo.
pip install -e OFMentor || (
echo ERROR: Failed to install Python dependencies
pause
exit /b 1
)
echo.
echo [Step 2/4] Installing frontend dependencies...
echo.
cd ofmentor-ui
call npm install || (
echo ERROR: Failed to install frontend dependencies
cd ..
pause
exit /b 1
)
echo.
echo [Step 3/4] Building frontend...
echo.
call npm run build || (
echo ERROR: Failed to build frontend
cd ..
pause
exit /b 1
)
cd ..
echo.
echo [Step 4/4] Setting up environment...
echo.
if not exist .env (
echo Warning: .env file not found, using default configuration
echo Please set up your API keys manually
) else (
echo Found .env file with configuration
)
echo.
echo ======================================================================
echo Installation complete!
echo.
echo To start OFMentor:
echo - Backend: python start_ofmentor.py
echo - Frontend: cd ofmentor-ui ^&^& npm start
echo.
echo Or use 'run.bat' to start both at once
echo ======================================================================
echo.
pause