From 840d9aecc60632db03bf4188759a5a28be1f7a66 Mon Sep 17 00:00:00 2001 From: yuyoyuppe Date: Thu, 12 Mar 2020 21:14:21 +0300 Subject: [PATCH] MSIX: add debug configuration option for package building --- 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 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\