From 48206e32537d47031a7a79ad9097eddb2f944c70 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 7 Jan 2018 19:11:13 +0000 Subject: [PATCH 1/2] Fix x86/x64 installer uninstalling each other when installing either of them: -Make x86 installer to be installed as a x86 component (-arch argument to candle.exe) -Make the UpgradeCode unique per platform Additionally, the architecture was appended to the package name to be able to distinguish the installations. Simplified architecture variable use to have only 1 variable for it. --- assets/Product.wxs | 15 +++++++++------ build.psm1 | 3 +-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index ed98172a4a0..c4a256c6656 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -6,18 +6,21 @@ + + + + + + - - - - - + + - + diff --git a/build.psm1 b/build.psm1 index 9df7a8839d3..c20b48daf9b 100644 --- a/build.psm1 +++ b/build.psm1 @@ -2140,7 +2140,6 @@ function New-MSIPackage [Environment]::SetEnvironmentVariable("ProductVersion", $ProductVersion, "Process") [Environment]::SetEnvironmentVariable("ProductSemanticVersion", $ProductSemanticVersion, "Process") [Environment]::SetEnvironmentVariable("ProductVersionWithName", $productVersionWithName, "Process") - [Environment]::SetEnvironmentVariable("ProductTargetArchitecture", $ProductTargetArchitecture, "Process") $ProductProgFilesDir = "ProgramFiles64Folder" if ($ProductTargetArchitecture -eq "x86") { @@ -2164,7 +2163,7 @@ function New-MSIPackage } $WiXHeatLog = & $wixHeatExePath dir $ProductSourcePath -dr $productVersionWithName -cg $productVersionWithName -gg -sfrag -srd -scom -sreg -out $wixFragmentPath -var env.ProductSourcePath -v - $WiXCandleLog = & $wixCandleExePath "$ProductWxsPath" "$wixFragmentPath" -out (Join-Path "$env:Temp" "\\") -ext WixUIExtension -ext WixUtilExtension -arch x64 -v + $WiXCandleLog = & $wixCandleExePath "$ProductWxsPath" "$wixFragmentPath" -out (Join-Path "$env:Temp" "\\") -ext WixUIExtension -ext WixUtilExtension -arch $ProductTargetArchitecture -v $WiXLightLog = & $wixLightExePath -out $msiLocationPath $wixObjProductPath $wixObjFragmentPath -ext WixUIExtension -ext WixUtilExtension -dWixUILicenseRtf="$LicenseFilePath" -v Remove-Item -ErrorAction SilentlyContinue *.wixpdb -Force From f02b0a5fc06b37641c9ba8272b04f38dd32ca24a Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 8 Jan 2018 19:36:36 +0000 Subject: [PATCH 2/2] add requested comment about that product code is product id. --- assets/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index c4a256c6656..56eeaef66f9 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -17,7 +17,7 @@ - +