# appsONLINE Setup - PowerShell Script # Checks prerequisites and installs dependencies Write-Host "`n╔════════════════════════════════════════╗" -ForegroundColor Cyan Write-Host "║ appsONLINE Setup & Verification ║" -ForegroundColor Cyan Write-Host "╚════════════════════════════════════════╝`n" -ForegroundColor Cyan # Check Node.js Write-Host "📦 Checking Node.js..." -ForegroundColor Yellow $nodeCheck = Get-Command node -ErrorAction SilentlyContinue if ($null -ne $nodeCheck) { $nodeVersion = & node --version Write-Host " ✅ Node.js $nodeVersion found`n" -ForegroundColor Green } else { Write-Host " ❌ Node.js not found!" -ForegroundColor Red Write-Host " Download from: https://nodejs.org/`n" -ForegroundColor Yellow } # Check npm Write-Host "📦 Checking npm..." -ForegroundColor Yellow $npmCheck = Get-Command npm -ErrorAction SilentlyContinue if ($null -ne $npmCheck) { $npmVersion = & npm --version Write-Host " ✅ npm $npmVersion found`n" -ForegroundColor Green } else { Write-Host " ❌ npm not found!`n" -ForegroundColor Red } # Check .NET SDK Write-Host "📦 Checking .NET SDK..." -ForegroundColor Yellow $dotnetCheck = Get-Command dotnet -ErrorAction SilentlyContinue if ($null -ne $dotnetCheck) { $dotnetVersion = & dotnet --version Write-Host " ✅ .NET SDK $dotnetVersion found`n" -ForegroundColor Green } else { Write-Host " ❌ .NET SDK 8.0+ not found!" -ForegroundColor Red Write-Host " Download from: https://dotnet.microsoft.com/download`n" -ForegroundColor Yellow } # Check for .csproj files Write-Host "📁 Scanning for MVC applications..." -ForegroundColor Yellow $csprojFiles = Get-ChildItem -Path $PSScriptRoot -Filter "*.csproj" -Recurse -Depth 4 if ($csprojFiles.Count -gt 0) { Write-Host " ✅ Found $($csprojFiles.Count) MVC application(s):" -ForegroundColor Green $csprojFiles | ForEach-Object { $relativePath = Resolve-Path -Path $_.FullName -Relative Write-Host " - $relativePath" } Write-Host "" } else { Write-Host " ⚠️ No MVC applications found (yet)" -ForegroundColor Yellow Write-Host " You can add them later in subfolders`n" -ForegroundColor Gray } # Check dependencies Write-Host "📚 Checking dependencies..." -ForegroundColor Yellow $nodeModulesPath = Join-Path -Path $PSScriptRoot -ChildPath "node_modules" if (Test-Path -Path $nodeModulesPath) { Write-Host " ✅ Dependencies already installed`n" -ForegroundColor Green } else { Write-Host " Installing dependencies..." -ForegroundColor Yellow npm install if ($LASTEXITCODE -eq 0) { Write-Host " ✅ Dependencies installed successfully`n" -ForegroundColor Green } else { Write-Host " ❌ Failed to install dependencies!" -ForegroundColor Red Write-Host "" exit 1 } } # Summary Write-Host "╔════════════════════════════════════════╗" -ForegroundColor Green Write-Host "║ ✅ Setup complete! ║" -ForegroundColor Green Write-Host "╚════════════════════════════════════════╝`n" -ForegroundColor Green Write-Host "🚀 To start the launcher, run:" -ForegroundColor Cyan Write-Host " npm start" -ForegroundColor White Write-Host "" Write-Host "Or execute this script:" -ForegroundColor Cyan Write-Host " .\start.ps1" -ForegroundColor White Write-Host "" Write-Host "Or double-click the batch file:" -ForegroundColor Cyan Write-Host " start.bat" -ForegroundColor White Write-Host ""