OpenText: skip WJ_Office, IBM_qks, mmcs .hep profiles

Per West Jefferson request, those three connection profiles aren't used
on shopfloor PCs and just clutter the HostExplorer session picker.
They stay in the bundled source tree (dependencies/opentext/Profile/)
for rollback, we just don't copy them into the runtime destinations.

Implementation:
- New optional Exclude list on $contentMap entries
- Copy-HummingbirdContent filters files through Exclude before copying
- Also removes any stale excluded files from the destination up-front,
  so a PC that got them from an older install gets cleaned up on
  re-deploy (defensive - no production PC has the 15.0.SP1.2 marker
  yet so this won't actually fire in practice)
- NO version bump: 15.0.SP1.2 stays, per explicit request. First
  imaging run picks up the new logic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-04-09 14:37:52 -04:00
parent c464f45f4f
commit b91a0a4bb7

View File

@@ -201,9 +201,23 @@ if ($mspExit -ne 0 -and $mspExit -ne 3010) {
Write-SetupLog ""
Write-SetupLog "Step 3: Deploying profiles/keymaps/menus/macros..."
# Map of source subdir -> destination subdir relative to the Hummingbird root
# Map of source subdir -> destination subdir relative to the Hummingbird root.
# Optional Exclude list drops specific filenames from both the source-to-dest
# copy AND from the destination if they were left over from a prior install.
$contentMap = @(
@{ Src = 'Profile'; Dst = 'Profile' }
@{
Src = 'Profile'
Dst = 'Profile'
# West Jefferson site-specific: these three .hep sessions aren't used
# on shopfloor PCs and just clutter the HostExplorer session picker.
# Leaving the .hep files in the bundled source for rollback, just
# skipping the deploy step.
Exclude = @(
'WJ_Office.hep',
'IBM_qks.hep',
'mmcs.hep'
)
}
@{ Src = 'Accessories\EB'; Dst = 'Accessories\EB' }
@{ Src = 'HostExplorer\Keymap'; Dst = 'HostExplorer\Keymap' }
@{ Src = 'HostExplorer\Menu'; Dst = 'HostExplorer\Menu' }
@@ -219,7 +233,27 @@ function Copy-HummingbirdContent {
if (-not (Test-Path $srcPath)) { continue }
$dstPath = Join-Path $RootDst $entry.Dst
New-Item -Path $dstPath -ItemType Directory -Force | Out-Null
# Remove any previously-deployed excluded files from the destination
# - handles the case where a PC got them from an older install.
if ($entry.Exclude) {
foreach ($name in $entry.Exclude) {
$stale = Join-Path $dstPath $name
if (Test-Path -LiteralPath $stale) {
try {
Remove-Item -LiteralPath $stale -Force -ErrorAction Stop
Write-SetupLog " $Label : removed stale $name"
} catch {
Write-SetupLog " $Label : failed to remove $stale : $_"
}
}
}
}
$files = Get-ChildItem -Path $srcPath -File -ErrorAction SilentlyContinue
if ($entry.Exclude) {
$files = @($files | Where-Object { $entry.Exclude -notcontains $_.Name })
}
foreach ($f in $files) {
Copy-Item -Path $f.FullName -Destination $dstPath -Force
}