Ver código fonte

update of script of launching

spacexerq 1 dia atrás
pai
commit
c66ac1ae47
1 arquivos alterados com 12 adições e 12 exclusões
  1. 12 12
      install.ps1

+ 12 - 12
install.ps1

@@ -1,5 +1,5 @@
 # ==============================================================================
-#  lf_mri_platform  One-time installation script
+#  lf_mri_platform -- One-time installation script
 #  Run as: .\install.ps1
 #  Requires: Windows 10/11, PowerShell 5.1+, internet access
 # ==============================================================================
@@ -17,7 +17,7 @@ function Write-OK($msg)   { Write-Host "    [OK] $msg" -ForegroundColor Green }
 function Write-Warn($msg) { Write-Host "    [!!] $msg" -ForegroundColor Yellow }
 function Write-Fail($msg) { Write-Host "    [FAIL] $msg" -ForegroundColor Red; exit 1 }
 
-# ── 1. Check prerequisites ────────────────────────────────────────────────────
+# -- 1. Check prerequisites ----------------------------------------------------
 Write-Step "Checking prerequisites"
 
 try {
@@ -30,7 +30,7 @@ try {
     $dockerVer = & docker --version 2>&1
     Write-OK "Docker: $dockerVer"
 } catch {
-    Write-Warn "Docker not found — backend services won't start without it."
+    Write-Warn "Docker not found -- backend services will not start without it."
     Write-Warn "Install Docker Desktop: https://www.docker.com/products/docker-desktop/"
 }
 
@@ -39,14 +39,14 @@ try {
     Write-OK "Docker Compose: $composeVer"
 } catch { Write-Warn "Docker Compose not found (included in Docker Desktop >= 3.0)" }
 
-# ── 2. Create Python virtual environment for the GUI ─────────────────────────
+# -- 2. Create Python virtual environment for the GUI -------------------------
 Write-Step "Creating Python virtual environment for GUI"
 
 $venvPath = Join-Path $GuiDir ".venv"
 if (-not (Test-Path $GuiDir)) { Write-Fail "GUI directory not found: $GuiDir" }
 
 if (Test-Path $venvPath) {
-    Write-Warn "Venv already exists at $venvPath  skipping creation"
+    Write-Warn "Venv already exists at $venvPath -- skipping creation"
 } else {
     & $PythonExe -m venv $venvPath
     Write-OK "Created venv at $venvPath"
@@ -54,7 +54,7 @@ if (Test-Path $venvPath) {
 
 $pip = Join-Path $venvPath "Scripts\pip.exe"
 
-# ── 3. Install GUI dependencies ───────────────────────────────────────────────
+# -- 3. Install GUI dependencies ----------------------------------------------
 Write-Step "Installing GUI dependencies"
 
 $guiReqs = Join-Path $GuiDir "requirements.txt"
@@ -67,14 +67,14 @@ if (Test-Path $guiReqs) {
 $lfScannerPyproject = Join-Path $LibsDir "pyproject.toml"
 $lfScannerSetup     = Join-Path $LibsDir "setup.py"
 
-if (Test-Path $lfScannerPyproject -or (Test-Path $lfScannerSetup)) {
+if ((Test-Path $lfScannerPyproject) -or (Test-Path $lfScannerSetup)) {
     & $pip install -e $LibsDir --quiet
     Write-OK "lf-scanner installed (editable)"
 } else {
-    Write-Warn "lf-scanner has no pyproject.toml/setup.py  adding to PYTHONPATH only"
+    Write-Warn "lf-scanner has no pyproject.toml/setup.py -- adding to PYTHONPATH only"
 }
 
-# ── 4. Copy .env for Docker services ─────────────────────────────────────────
+# -- 4. Copy .env for Docker services -----------------------------------------
 Write-Step "Setting up Docker environment config"
 
 $envFile    = Join-Path $Root ".env"
@@ -84,10 +84,10 @@ if (-not (Test-Path $envFile)) {
     Copy-Item $envExample $envFile
     Write-OK ".env created from .env.example"
 } else {
-    Write-Warn ".env already exists  not overwriting"
+    Write-Warn ".env already exists -- not overwriting"
 }
 
-# ── 5. Create desktop shortcuts ────────────────────────────────────────────────
+# -- 5. Create desktop shortcuts ----------------------------------------------
 Write-Step "Creating desktop shortcuts"
 
 $desktopPath   = [Environment]::GetFolderPath("Desktop")
@@ -114,7 +114,7 @@ $scAll.Description      = "Start LF-MRI services + GUI"
 $scAll.Save()
 Write-OK "Shortcut: 'LF-MRI Start All.lnk' on Desktop"
 
-# ── 6. Summary ────────────────────────────────────────────────────────────────
+# -- 6. Summary ---------------------------------------------------------------
 Write-Host ""
 Write-Host "============================================================" -ForegroundColor Green
 Write-Host "  Installation complete!" -ForegroundColor Green