Shopfloor Display: move kiosk app install to preinstall system
Install-KioskApp.cmd wrapper reads display-type.txt and runs the matching Inno Setup installer (Lobby or Dashboard). Replaces the standalone 09-Setup-Display.ps1 for uniform app install pipeline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,45 +1,9 @@
|
||||
# 09-Setup-Display.ps1 -- Display-specific setup (runs after Shopfloor baseline)
|
||||
# Reads display-type.txt to install either LobbyDisplay or Dashboard kiosk app.
|
||||
|
||||
$enrollDir = "C:\Enrollment"
|
||||
$typeFile = Join-Path $enrollDir "display-type.txt"
|
||||
$setupDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
if (-not (Test-Path $typeFile)) {
|
||||
Write-Warning "No display-type.txt found - skipping display setup."
|
||||
return
|
||||
}
|
||||
|
||||
$displayType = (Get-Content $typeFile -First 1).Trim()
|
||||
Write-Host "=== Display Setup: $displayType ==="
|
||||
|
||||
switch ($displayType) {
|
||||
"Lobby" {
|
||||
$installer = Join-Path $setupDir "GEAerospaceLobbyDisplaySetup.exe"
|
||||
$appName = "Lobby Display"
|
||||
}
|
||||
"Dashboard" {
|
||||
$installer = Join-Path $setupDir "GEAerospaceDashboardSetup.exe"
|
||||
$appName = "Dashboard"
|
||||
}
|
||||
default {
|
||||
Write-Warning "Unknown display type: $displayType"
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Test-Path $installer)) {
|
||||
Write-Warning "$appName installer not found at $installer - skipping."
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Installing $appName..."
|
||||
$proc = Start-Process -FilePath $installer -ArgumentList '/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', "/LOG=C:\Enrollment\$appName-install.log" -Wait -PassThru
|
||||
|
||||
if ($proc.ExitCode -eq 0) {
|
||||
Write-Host "$appName installed successfully."
|
||||
} else {
|
||||
Write-Warning "$appName exited with code $($proc.ExitCode). Check C:\Enrollment\$appName-install.log"
|
||||
}
|
||||
|
||||
Write-Host "=== Display Setup Complete ==="
|
||||
# 09-Setup-Display.ps1 -- Display-specific setup (runs after Shopfloor baseline)
|
||||
#
|
||||
# Kiosk app installation moved to preinstall.json (Install-KioskApp.cmd wrapper).
|
||||
# The wrapper reads display-type.txt and installs the matching kiosk app during
|
||||
# the baseline preinstall phase (00-PreInstall-MachineApps.ps1).
|
||||
#
|
||||
# This script is intentionally empty. Remove it once confirmed working.
|
||||
|
||||
Write-Host "=== Display Setup: kiosk app installed via preinstall system ==="
|
||||
|
||||
Reference in New Issue
Block a user