-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
47 lines (40 loc) · 1.06 KB
/
start.bat
File metadata and controls
47 lines (40 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
@echo off
REM ============================================================
REM SmartDoc AI - Launcher
REM Single window, auto-exit on app close
REM ============================================================
setlocal enabledelayedexpansion
title SmartDoc AI
echo.
echo ========================================
echo SmartDoc AI
echo ========================================
echo.
REM Kill old Electron
taskkill /F /IM electron.exe 2>NUL
REM Check Python venv
set BACKEND_DIR=%~dp0backend
if not exist "%BACKEND_DIR%\venv\Scripts\python.exe" (
echo [SETUP] Creating Python environment...
cd /d "%BACKEND_DIR%"
python -m venv venv
venv\Scripts\pip install -r requirements.txt >nul
echo [OK] Python ready
)
REM Check Node.js
where node.exe >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Node.js not found
pause
exit /b 1
)
REM Launch Electron (this stays open until user closes app)
echo [START] Starting SmartDoc AI...
echo.
cd /d "%~dp0frontend"
call npm start
REM Cleanup on exit
echo.
echo App closed. Goodbye!
timeout /t 2 /nobreak >nul
exit /b 0