-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAmpleWeb.bat
More file actions
45 lines (39 loc) · 870 Bytes
/
Copy pathAmpleWeb.bat
File metadata and controls
45 lines (39 loc) · 870 Bytes
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
@echo off
cd /d "%~dp0"
:: Check Node.js
where node >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Node.js is not installed.
echo Download from: https://nodejs.org/
pause
exit /b 1
)
:: Check npm
where npm >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: npm is not installed.
pause
exit /b 1
)
:: Install dependencies if needed
if not exist "node_modules" (
echo Installing dependencies...
call npm install
if %errorlevel% neq 0 (
echo ERROR: npm install failed.
pause
exit /b 1
)
)
:: Check ROMs
set "ROM_DIR=public\roms"
set "NEED_ROMS=1"
if exist "%ROM_DIR%\*.zip" set "NEED_ROMS=0"
if "%NEED_ROMS%"=="1" (
echo.
echo [!] ROMs not found in %ROM_DIR%.
echo Launching ROM Downloader...
powershell -ExecutionPolicy Bypass -File download_roms.ps1
)
:: Start dev server
node server.js