Node.js/Express server with web GUI for converting Google Maps links to DXF files. Includes optional Python ML server for satellite lot detection. Co-authored-by: Cursor <cursoragent@cursor.com>
52 lines
1.4 KiB
Batchfile
52 lines
1.4 KiB
Batchfile
@echo off
|
|
title MAPS to DXF
|
|
cd /d "%~dp0"
|
|
|
|
where node >nul 2>&1
|
|
if %errorlevel% neq 0 (
|
|
echo Node.js not found. Installing via Windows Package Manager...
|
|
winget install OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements 2>nul
|
|
if %errorlevel% neq 0 (
|
|
echo.
|
|
echo Could not install Node.js automatically. Opening download page...
|
|
start https://nodejs.org/
|
|
echo.
|
|
echo After installing Node.js, close this window and double-click Start.bat again.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo.
|
|
echo Node.js installed. Please close this window, then double-click Start.bat again.
|
|
pause
|
|
exit /b 0
|
|
)
|
|
|
|
if not exist "node_modules" (
|
|
echo Installing dependencies...
|
|
call npm install
|
|
) else if not exist "node_modules\multer" (
|
|
echo Installing missing dependencies...
|
|
call npm install
|
|
)
|
|
|
|
if exist "ml_server\segment_server.py" (
|
|
where python >nul 2>&1
|
|
if %errorlevel% equ 0 (
|
|
start "MAPS to DXF - ML Server" cmd /k "call %~sdp0Start_ML_Server.bat"
|
|
timeout /t 2 /nobreak >nul
|
|
) else (
|
|
where py >nul 2>&1
|
|
if %errorlevel% equ 0 (
|
|
start "MAPS to DXF - ML Server" cmd /k "call %~sdp0Start_ML_Server.bat"
|
|
timeout /t 2 /nobreak >nul
|
|
)
|
|
)
|
|
)
|
|
|
|
echo Starting MAPS to DXF...
|
|
echo Browser will open. Keep this window open while using the app.
|
|
if exist "ml_server\segment_server.py" echo (ML server started in the other window - enable "Use server-side ML segmentation" in the app.)
|
|
echo.
|
|
call npm start
|
|
pause
|