-
-
Notifications
You must be signed in to change notification settings - Fork 41
Reduce dependency preflight noise and fix WiX v6 detection #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,7 +12,6 @@ | |||||
| - .NET Framework 4.8.1 SDK & Targeting Pack | ||||||
| - Windows SDK | ||||||
| - WiX Toolset v6 (installer builds restore via NuGet) | ||||||
| - NuGet CLI | ||||||
| - .NET SDK 8.x+ | ||||||
|
|
||||||
| .PARAMETER FailOnMissing | ||||||
|
|
@@ -21,6 +20,12 @@ | |||||
| .PARAMETER IncludeOptional | ||||||
| If specified, also checks optional dependencies like clangd for Serena. | ||||||
|
|
||||||
| .PARAMETER Detailed | ||||||
| If specified, prints the full per-dependency section headers and success details instead of the compact summary-only output. | ||||||
|
|
||||||
| .PARAMETER PassThru | ||||||
| If specified, returns the dependency result objects for scripting callers instead of writing them implicitly. | ||||||
|
|
||||||
| .EXAMPLE | ||||||
| # Quick check | ||||||
| .\Build\Agent\Verify-FwDependencies.ps1 | ||||||
|
|
@@ -32,12 +37,22 @@ | |||||
| .EXAMPLE | ||||||
| # Include Serena dependencies | ||||||
| .\Build\Agent\Verify-FwDependencies.ps1 -IncludeOptional | ||||||
|
|
||||||
| .EXAMPLE | ||||||
| # Show full dependency-by-dependency output | ||||||
| .\Build\Agent\Verify-FwDependencies.ps1 -IncludeOptional -Detailed | ||||||
|
|
||||||
| .EXAMPLE | ||||||
| # Capture structured results for automation | ||||||
| $results = .\Build\Agent\Verify-FwDependencies.ps1 -IncludeOptional -PassThru | ||||||
| #> | ||||||
|
|
||||||
| [CmdletBinding()] | ||||||
| param( | ||||||
| [switch]$FailOnMissing, | ||||||
| [switch]$IncludeOptional | ||||||
| [switch]$IncludeOptional, | ||||||
| [switch]$Detailed, | ||||||
| [switch]$PassThru | ||||||
| ) | ||||||
|
|
||||||
| $ErrorActionPreference = 'Stop' | ||||||
|
|
@@ -52,11 +67,13 @@ function Test-Dependency { | |||||
| try { | ||||||
| $result = & $Check | ||||||
| if ($result) { | ||||||
| Write-Host "[OK] $Name" -ForegroundColor Green | ||||||
| if ($result -is [string] -and $result.Length -gt 0 -and $result.Length -lt 100) { | ||||||
| Write-Host " $result" -ForegroundColor DarkGray | ||||||
| if ($Detailed) { | ||||||
| Write-Host "[OK] $Name" -ForegroundColor Green | ||||||
| if ($result -is [string] -and $result.Length -gt 0 -and $result.Length -lt 100) { | ||||||
| Write-Host " $result" -ForegroundColor DarkGray | ||||||
| } | ||||||
| } | ||||||
| return @{ Name = $Name; Found = $true; Info = $result } | ||||||
| return @{ Name = $Name; Found = $true; IsRequired = ($Required -eq "Required"); Info = $result } | ||||||
| } | ||||||
| else { | ||||||
| throw "Check returned null/false" | ||||||
|
|
@@ -67,7 +84,7 @@ function Test-Dependency { | |||||
| $status = if ($Required -eq "Required") { "[FAIL]" } else { "[WARN]" } | ||||||
| Write-Host "$status $Name" -ForegroundColor $color | ||||||
| Write-Host " $_" -ForegroundColor DarkGray | ||||||
| return @{ Name = $Name; Found = $false; Required = ($Required -eq "Required"); Error = $_.ToString() } | ||||||
| return @{ Name = $Name; Found = $false; IsRequired = ($Required -eq "Required"); Error = $_.ToString() } | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -102,15 +119,19 @@ function Find-DotNetFrameworkSdkTool { | |||||
| # MAIN SCRIPT | ||||||
| # ============================================================================ | ||||||
|
|
||||||
| Write-Host "=== FieldWorks Dependency Verification ===" -ForegroundColor Cyan | ||||||
| Write-Host "" | ||||||
| if ($Detailed) { | ||||||
| Write-Host "=== FieldWorks Dependency Verification ===" -ForegroundColor Cyan | ||||||
| Write-Host "" | ||||||
| } | ||||||
|
|
||||||
| $results = @() | ||||||
|
|
||||||
| # ---------------------------------------------------------------------------- | ||||||
| # Required Dependencies | ||||||
| # ---------------------------------------------------------------------------- | ||||||
| Write-Host "--- Required Dependencies ---" -ForegroundColor Cyan | ||||||
| if ($Detailed) { | ||||||
| Write-Host "--- Required Dependencies ---" -ForegroundColor Cyan | ||||||
| } | ||||||
|
|
||||||
| # .NET Framework targeting pack (4.8+) | ||||||
| $results += Test-Dependency -Name ".NET Framework Targeting Pack (4.8+)" -Check { | ||||||
|
|
@@ -177,16 +198,6 @@ $results += Test-Dependency -Name "al.exe (.NET Framework SDK)" -Check { | |||||
| throw "al.exe not found in Windows SDK NETFX tool folders" | ||||||
| } | ||||||
|
|
||||||
| # NuGet CLI (legacy — build uses dotnet restore since CPM migration) | ||||||
| $results += Test-Dependency -Name "NuGet CLI (legacy)" -Required "Optional" -Check { | ||||||
| $nuget = Get-Command nuget.exe -ErrorAction SilentlyContinue | ||||||
| if ($nuget) { | ||||||
| $version = (& nuget.exe help 2>&1 | Select-Object -First 1) | ||||||
| return $version | ||||||
| } | ||||||
| throw "nuget.exe not found in PATH (no longer required; build uses dotnet restore)" | ||||||
| } | ||||||
|
|
||||||
| # .NET SDK | ||||||
| $results += Test-Dependency -Name ".NET SDK" -Check { | ||||||
| $dotnet = Get-Command dotnet.exe -ErrorAction SilentlyContinue | ||||||
|
|
@@ -206,8 +217,22 @@ $results += Test-Dependency -Name "WiX Toolset (v6 via NuGet)" -Required "Option | |||||
| throw "Installer project not found: $wixProj" | ||||||
| } | ||||||
|
|
||||||
| $wixProjText = Get-Content -LiteralPath $wixProj -Raw | ||||||
| if ($wixProjText -match "WixToolset\\.Sdk") { | ||||||
| [xml]$wixProjXml = Get-Content -LiteralPath $wixProj | ||||||
|
||||||
| [xml]$wixProjXml = Get-Content -LiteralPath $wixProj | |
| [xml]$wixProjXml = Get-Content -Raw -LiteralPath $wixProj |
Uh oh!
There was an error while loading. Please reload this page.