diff --git a/installer/PowerToysSetupVNext/generateDscResourcesWxs.ps1 b/installer/PowerToysSetupVNext/generateDscResourcesWxs.ps1 deleted file mode 100644 index f518815590..0000000000 --- a/installer/PowerToysSetupVNext/generateDscResourcesWxs.ps1 +++ /dev/null @@ -1,102 +0,0 @@ -[CmdletBinding()] -Param( - [Parameter(Mandatory = $True)] - [string]$dscWxsFile, - [Parameter(Mandatory = $True)] - [string]$Platform, - [Parameter(Mandatory = $True)] - [string]$Configuration -) - -$ErrorActionPreference = 'Stop' - -$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path - -# Find build output directory with DSCModules subfolder -$buildOutputDir = Join-Path $scriptDir "..\..\$Platform\$Configuration\DSCModules" - -if (-not (Test-Path $buildOutputDir)) { - Write-Error "Build output directory not found: '$buildOutputDir'" - exit 1 -} - -# Find all DSC manifest JSON files -$dscFiles = Get-ChildItem -Path $buildOutputDir -Filter "microsoft.powertoys.*.settings.dsc.resource.json" -File - -if (-not $dscFiles) { - Write-Warning "No DSC manifest files found in '$buildOutputDir'" - # Create empty component group - $wxsContent = @" - - - - - - - - - -"@ - Set-Content -Path $dscWxsFile -Value $wxsContent - exit 0 -} - -Write-Host "Found $($dscFiles.Count) DSC manifest file(s)" - -# Generate WiX fragment -$wxsContent = @" - - - - - - -"@ - -$componentRefs = @() - -foreach ($file in $dscFiles) { - $componentId = "DscResource_" + ($file.BaseName -replace '[^A-Za-z0-9_]', '_') - $fileId = $componentId + "_File" - $guid = [System.Guid]::NewGuid().ToString().ToUpper() - - $componentRefs += $componentId - - $wxsContent += @" - - - - - - - -"@ -} - -$wxsContent += @" - - - - - - -"@ - -foreach ($componentId in $componentRefs) { - $wxsContent += @" - - -"@ -} - -$wxsContent += @" - - - - -"@ - -# Write the WiX file -Set-Content -Path $dscWxsFile -Value $wxsContent - -Write-Host "Generated DSC resources WiX fragment: '$dscWxsFile'"