From 398b7a5a25ecaf7e7f73a9e953747b83c09c813b Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Fri, 13 Mar 2020 00:37:30 +0300 Subject: [PATCH] MSIX: add debug configuration option for package building (#1561) --- installer/MSIX/build_msix.ps1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/installer/MSIX/build_msix.ps1 b/installer/MSIX/build_msix.ps1 index 6762d0286a..f494242400 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\