From d2d80c6832262a1d95ffd957a41fc5c80188a572 Mon Sep 17 00:00:00 2001 From: "Raghu Shantha [MSFT]" Date: Wed, 29 Mar 2017 13:36:44 -0700 Subject: [PATCH] Use Product Semantic version in the MSI installer where possible (#3435) --- assets/Product.wxs | 14 ++++++++------ build.psm1 | 11 ++++++----- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index 48375ffb81..e4bea5860d 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -10,14 +10,16 @@ + + - + @@ -55,7 +57,7 @@ - + @@ -63,11 +65,11 @@ - + @@ -75,7 +77,7 @@ diff --git a/build.psm1 b/build.psm1 index d5d5cb5de5..ebefa46b13 100644 --- a/build.psm1 +++ b/build.psm1 @@ -2490,8 +2490,8 @@ function New-MSIPackage Write-Verbose "Place dependencies such as icons to $assetsInSourcePath" Copy-Item "$AssetsPath\*.ico" $assetsInSourcePath -Force - $productVersionWithName = $ProductName + "_" + $ProductVersion - $productSemanticVersionWithName = $ProductName + "_" + $ProductSemanticVersion + $productVersionWithName = $ProductName + '_' + $ProductVersion + $productSemanticVersionWithName = $ProductName + '-' + $ProductSemanticVersion Write-Verbose "Create MSI for Product $productSemanticVersionWithName" @@ -2500,7 +2500,8 @@ function New-MSIPackage [Environment]::SetEnvironmentVariable("ProductName", $ProductName, "Process") [Environment]::SetEnvironmentVariable("ProductGuid", $ProductGuid, "Process") [Environment]::SetEnvironmentVariable("ProductVersion", $ProductVersion, "Process") - [Environment]::SetEnvironmentVariable("ProductVersionWithName", $productVersionWithName, "Process") + [Environment]::SetEnvironmentVariable("ProductSemanticVersion", $ProductSemanticVersion, "Process") + [Environment]::SetEnvironmentVariable("ProductVersionWithName", $productVersionWithName, "Process") [Environment]::SetEnvironmentVariable("ProductTargetArchitecture", $ProductTargetArchitecture, "Process") $ProductProgFilesDir = "ProgramFiles64Folder" if ($ProductTargetArchitecture -eq "x86") @@ -2625,7 +2626,7 @@ function New-AppxPackage Write-Verbose "Place AppxManifest dependencies such as images to $assetsInSourcePath" Copy-Item "$AssetsPath\*.png" $assetsInSourcePath -Force - $appxPackageName = $PackageName + "_" + $PackageSemanticVersion + $appxPackageName = $PackageName + "-" + $PackageSemanticVersion if ($PackageNameSuffix) { $appxPackageName = $appxPackageName, $PackageNameSuffix -join "-" } @@ -2667,7 +2668,7 @@ function New-ZipPackage $ProductSemanticVersion = Get-PackageSemanticVersion -Version $PackageVersion - $zipPackageName = $PackageName + "_" + $ProductSemanticVersion + $zipPackageName = $PackageName + "-" + $ProductSemanticVersion if ($PackageNameSuffix) { $zipPackageName = $zipPackageName, $PackageNameSuffix -join "-" }