14 lines
1.0 KiB
PowerShell
14 lines
1.0 KiB
PowerShell
param([string]$BundleRoot=(Join-Path $PSScriptRoot '..\artifacts\P_Rec_Annot.bundle'))
|
|
$ErrorActionPreference='Stop'
|
|
$package=Join-Path $BundleRoot 'PackageContents.xml'
|
|
[xml]$xml=Get-Content -LiteralPath $package
|
|
$entry=$xml.ApplicationPackage.Components.ComponentEntry
|
|
if(@($entry).Count -ne 1){throw 'Bundle must have exactly one entry assembly.'}
|
|
if($entry.ModuleName -match '_netload|OrthoLoader|Settings.xml'){throw 'Legacy loading chain is forbidden.'}
|
|
if($entry.ModuleName -notmatch 'PRecAnnot\.Plant3D2026\.dll'){throw 'Unexpected entry assembly.'}
|
|
if(-not (Test-Path (Join-Path $BundleRoot 'Contents\Windows\PRecAnnot.Plant3D2026.dll'))){throw 'Entry assembly is missing.'}
|
|
$forbidden='^(AcMgd|AcDbMgd|AcCoreMgd|AdWindows|PnP.*)\.dll$'
|
|
$forbiddenFiles=Get-ChildItem $BundleRoot -Recurse -File | Where-Object { $_.Name -match $forbidden -or $_.Extension -in '.pdb','.cs' -or $_.FullName -match '\\(bin|obj)\\' }
|
|
if($forbiddenFiles){throw "Bundle contains forbidden files: $($forbiddenFiles.FullName -join ', ')"}
|
|
Write-Host 'Bundle manifest is structurally valid.'
|