-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
84 lines (75 loc) · 2.98 KB
/
Copy pathstart.bat
File metadata and controls
84 lines (75 loc) · 2.98 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@echo off
title GeirdevVideoGen - Windows One-Touch Launcher
:: 🎬 GeirdevVideoGen - Windows One-Touch Launcher
echo ==========================================================
echo 🎬 GeirdevVideoGen - Windows One-Touch Launcher
echo ==========================================================
echo.
:: 1. Check Node.js & npm presence and initiate unattended silent installation if missing
where node >nul 2>nul
set NODE_CHECK=%errorlevel%
where npm >nul 2>nul
set NPM_CHECK=%errorlevel%
if %NODE_CHECK% neq 0 (
echo ⚠️ [System Notice] Node.js is not installed on your computer.
echo ⚙ [Auto-Installer] Initiating automated silent Node.js installation...
echo.
:: Inspect and trigger winget on Windows 10/11
where winget >nul 2>nul
if %errorlevel% equ 0 (
echo 💾 Installing Node.js LTS silently using Windows Package Manager (winget)...
echo.
winget install OpenJS.NodeJS.LTS --silent --accept-source-agreements --accept-package-agreements
) else (
echo 💾 Downloading official Windows installer (MSI) from Node.js servers...
:: PowerShell Failsafe download & msiexec silent install
powershell -Command "Invoke-WebRequest -Uri 'https://nodejs.org/dist/v20.12.2/node-v20.12.2-x64.msi' -OutFile 'node_install.msi'"
if not exist node_install.msi (
echo ❌ Error: Failed to download Node.js installer. Please check your internet connection.
pause
exit /b 1
)
echo.
echo ⚙ Installing Node.js silently. Please wait a moment...
msiexec /i node_install.msi /qn /norestart
del node_install.msi
)
:: Instantly bind PATH variables to current cmd session
set "PATH=%SystemDrive%\Program Files\nodejs\;%PATH%"
set "PATH=%APPDATA%\npm;%PATH%"
:: Final verification
where node >nul 2>nul
if %errorlevel% neq 0 (
echo.
echo ❌ Error: Silent installation failed or was blocked.
echo 💡 Manual Guide: Please visit https://nodejs.org directly to install it.
echo.
pause
exit /b 1
)
echo ✅ [Success] Node.js has been successfully installed on your computer!
echo.
) else (
echo ✅ [Checked] Node.js and npm are present and healthy!
echo.
)
:: 2. Automatically install required library dependencies (npm install)
echo 📦 [1/2] Installing required project dependencies and components...
echo (This may take 15 seconds to a minute depending on your connection.)
echo.
call npm install
if %errorlevel% neq 0 (
echo.
echo ❌ Error: Failed to install project dependencies.
echo Please check your network status.
echo.
pause
exit /b 1
)
echo ✅ [Success] Project dependencies successfully configured!
echo.
:: 3. Parallel backend/frontend bootstrapper with browser auto-open
echo 🚀 [2/2] Launching local servers and web studio...
echo (Your web browser window will open automatically in a moment!)
echo.
call npm run start