diff --git a/installer/MSIX/build_msix.ps1 b/installer/MSIX/build_msix.ps1 index 6762d0286a04..f49424240059 100644 --- a/installer/MSIX/build_msix.ps1 +++ b/installer/MSIX/build_msix.ps1 @@ -1 +1,13 @@ -makeappx build /v /overwrite /f PackagingLayout.xml /id "PowerToys-x64" /op bin\ +param ( + [bool]$debug = 0 +) + +$PackagingLayoutFile = "PackagingLayout.xml" + +if ($debug) { + (Get-Content $PackagingLayoutFile) ` + -replace 'x64\\Release\\', 'x64\Debug\' ` + | Out-File -Encoding utf8 "$env:temp\$PackagingLayoutFile" + $PackagingLayoutFile = "$env:temp\$PackagingLayoutFile" +} +makeappx build /v /overwrite /f $PackagingLayoutFile /id "PowerToys-x64" /op bin\