forked from GTJasonMK/lessAI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-lessai.bat
More file actions
56 lines (46 loc) · 1.28 KB
/
start-lessai.bat
File metadata and controls
56 lines (46 loc) · 1.28 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
@echo off
setlocal EnableExtensions EnableDelayedExpansion
title LessAI Launcher
cd /d "%~dp0"
echo ========================================
echo LessAI Launcher
echo ========================================
echo(
call "scripts\lessai-windows-common.bat" require_tools
if errorlevel 1 (
echo(
pause
exit /b 1
)
call "scripts\lessai-windows-common.bat" prepare_node_env
call "scripts\lessai-windows-common.bat" ensure_deps
set "EXIT_CODE=!ERRORLEVEL!"
if not "%EXIT_CODE%"=="0" (
echo(
echo [ERROR] Environment check failed with exit code %EXIT_CODE%.
pause
exit /b %EXIT_CODE%
)
echo [INFO] Starting LessAI in dev mode...
echo [INFO] First launch may take a while because Rust will compile.
echo [INFO] Close the app window or this terminal to stop it.
echo(
call "scripts\lessai-windows-common.bat" ensure_dev_port_free 1420
set "EXIT_CODE=!ERRORLEVEL!"
if not "%EXIT_CODE%"=="0" (
echo(
echo [ERROR] Dev server port 1420 is not available.
echo [HINT] Close the program using port 1420, or choose to terminate it when prompted.
pause
exit /b %EXIT_CODE%
)
call pnpm exec tauri dev
set "EXIT_CODE=%ERRORLEVEL%"
echo(
if not "%EXIT_CODE%"=="0" (
echo [ERROR] LessAI exited with code %EXIT_CODE%.
) else (
echo [INFO] LessAI exited normally.
)
pause
exit /b %EXIT_CODE%