-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlaunch-electron.bat
More file actions
36 lines (31 loc) · 1.12 KB
/
Copy pathlaunch-electron.bat
File metadata and controls
36 lines (31 loc) · 1.12 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
@echo off
setlocal
:: -----------------------------------------------------------------------
:: launch-electron.bat — Build the .NET backend, install Electron deps
:: (once), then start the desktop app.
:: Requires: Node.js on PATH (https://nodejs.org)
:: -----------------------------------------------------------------------
where node >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo [ERROR] Node.js not found on PATH.
echo Download it from https://nodejs.org and re-run this script.
pause
exit /b 1
)
:: Always publish the .NET backend before launching
echo [launch] Building .NET backend...
call build.bat publish
if %ERRORLEVEL% neq 0 ( echo [launch] Build failed. & pause & exit /b 1 )
:: Install Electron once
if not exist "electron\node_modules" (
echo [launch] Installing Electron dependencies...
cd electron
npm install
if %ERRORLEVEL% neq 0 ( echo [launch] npm install failed. & pause & exit /b 1 )
cd ..
)
echo [launch] Starting SS14 Editor desktop app...
cd electron
npm start
if %ERRORLEVEL% neq 0 ( echo [launch] npm start failed with error %ERRORLEVEL%. )
pause