Repository navigation
Expand file tree
/
Copy pathstart-dev.bat
More file actions
68 lines (59 loc) · 1.56 KB
/
Copy pathstart-dev.bat
File metadata and controls
68 lines (59 loc) · 1.56 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
@echo off
echo Starting Handwriting Transcription App Development Environment...
echo.
REM Check if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python is not installed or not in PATH
echo Please install Python 3.8+ and try again
pause
exit /b 1
)
REM Check if Node.js is installed
node --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Node.js is not installed or not in PATH
echo Please install Node.js 16+ and try again
pause
exit /b 1
)
REM Create Python virtual environment if it doesn't exist
if not exist "backend\venv" (
echo Creating Python virtual environment...
cd backend
python -m venv venv
cd ..
)
REM Install Python dependencies
echo Installing Python dependencies...
cd backend
call venv\Scripts\activate.bat
pip install -r requirements.txt
if errorlevel 1 (
echo ERROR: Failed to install Python dependencies
pause
exit /b 1
)
REM Start Python backend in background
echo Starting Python backend server...
start "Backend Server" cmd /c "call venv\Scripts\activate.bat && python main.py"
cd ..
REM Install Node.js dependencies if node_modules doesn't exist
if not exist "node_modules" (
echo Installing Node.js dependencies...
npm install
if errorlevel 1 (
echo ERROR: Failed to install Node.js dependencies
pause
exit /b 1
)
)
REM Wait a moment for backend to start
echo Waiting for backend to start...
timeout /t 5 /nobreak >nul
REM Start Electron app
echo Starting Electron application...
npm run dev
echo.
echo Development session ended.
pause