Change MSI ProductVersion variable name

This commit is contained in:
Tiago Conceição
2022-10-15 17:53:17 +01:00
parent 7768862f78
commit 4be6597e37
3 changed files with 18 additions and 17 deletions
+7 -6
View File
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!--
MSIProductVersion is defined in UVtools.Installer.wixproj as 0.0.1 for local desktop builds.
You should pass in the MSBuild Property 'MSIProductVersion' to override it during an automated build.
ProductVersion is defined in UVtools.Installer.wixproj as 0.0.1 for local desktop builds.
You should pass in the MSBuild Property 'ProductVersion' to override it during an automated build.
See http://msdn.microsoft.com/en-us/library/windows/desktop/aa370859%28v=vs.85%29.aspx for information on allowable values.
The Product@Id attribute (ProductCode Property) will be a random GUID for each build. This is to support "Major Upgrades" where each install
is a seamless uninstall/reinstall.
Version="$(var.MSIProductVersion)"
Version="$(var.ProductVersion)"
-->
<?define UpgradeCode = "1ea6d212-15c0-425e-b2ec-4b6c60817552"?>
<Product Id="*" Name="UVtools" Language="1033" Version="$(var.MSIProductVersion)" Manufacturer="PTRTECH" UpgradeCode="$(var.UpgradeCode)">
<Product Id="*" Name="UVtools" Language="1033" Version="$(var.ProductVersion)" Manufacturer="PTRTECH" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="301" Compressed="yes" Keywords="MSLA, DLP" Description="MSLA/DLP, file analysis, repair, conversion and manipulation" InstallScope="perMachine" Platform="x64" />
<MediaTemplate EmbedCab="yes" />
@@ -25,12 +25,13 @@
-->
<!-- Product upgrade -->
<!-- https://stackoverflow.com/questions/4227456/windows-installer-deletes-versioned-file-during-product-upgrade-instead-of-down -->
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion OnlyDetect="no" Property="WIX_UPGRADE_DETECTED"
Maximum="$(var.MSIProductVersion)" IncludeMaximum="no" IncludeMinimum="no"
Maximum="$(var.ProductVersion)" IncludeMaximum="no" IncludeMinimum="no"
MigrateFeatures="yes" />
<UpgradeVersion OnlyDetect="yes" Property="WIX_DOWNGRADE_DETECTED"
Minimum="$(var.MSIProductVersion)" IncludeMinimum="no" />
Minimum="$(var.ProductVersion)" IncludeMinimum="no" />
</Upgrade>
<InstallExecuteSequence>
<RemoveExistingProducts Before="CostInitialize" />
+10 -10
View File
@@ -10,12 +10,12 @@
<DefineSolutionProperties>false</DefineSolutionProperties>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<!-- If MSIProductVersion not passed in, try to get it from TFBuild Environments (XAML Builds)-->
<MSIProductVersion Condition=" '$(MSIProductVersion)' == '' ">$([System.Text.RegularExpressions.Regex]::Match($(TF_BUILD_BUILDNUMBER), "\d+.\d+.\d+.\d+"))</MSIProductVersion>
<!-- If MSIProductVersion still not known, try to get it from TFBuild Environments (V.Next Builds)-->
<MSIProductVersion Condition=" '$(MSIProductVersion)' == '' ">$([System.Text.RegularExpressions.Regex]::Match($(BUILD_BUILDNUMBER), "\d+.\d+.\d+.\d+"))</MSIProductVersion>
<!-- If MSIProductVersion still not known, default to lowerbound 0.0.1 for developer builds.-->
<MSIProductVersion Condition=" '$(MSIProductVersion)' == '' ">1.1.1</MSIProductVersion>
<!-- If ProductVersion not passed in, try to get it from TFBuild Environments (XAML Builds)-->
<ProductVersion Condition=" '$(ProductVersion)' == '' ">$([System.Text.RegularExpressions.Regex]::Match($(TF_BUILD_BUILDNUMBER), "\d+.\d+.\d+.\d+"))</ProductVersion>
<!-- If ProductVersion still not known, try to get it from TFBuild Environments (V.Next Builds)-->
<ProductVersion Condition=" '$(ProductVersion)' == '' ">$([System.Text.RegularExpressions.Regex]::Match($(BUILD_BUILDNUMBER), "\d+.\d+.\d+.\d+"))</ProductVersion>
<!-- If ProductVersion still not known, default to lowerbound 0.0.1 for developer builds.-->
<ProductVersion Condition=" '$(ProductVersion)' == '' ">1.1.1</ProductVersion>
<!-- The following allows one cert to be referenced from the certificate store for self-signing in localbuilds and another cert to be passed in during official builds. -->
<AppxCertificateThumbprint Condition=" '$(AppxCertificateThumbprint)' == '' ">
</AppxCertificateThumbprint>
@@ -32,23 +32,23 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;MSIProductVersion=$(MSIProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<DefineConstants>Debug;ProductVersion=$(ProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<WixVariables>WixUIBannerBmp=Resources\Banner.jpg;WixUIDialogBmp=Resources\Dialog.jpg;WixUILicenseRtf=Resources\EULA.rtf</WixVariables>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>MSIProductVersion=$(MSIProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<DefineConstants>ProductVersion=$(ProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<WixVariables>WixUIBannerBmp=Resources\Banner.jpg;WixUIDialogBmp=Resources\Dialog.jpg;WixUILicenseRtf=Resources\EULA.rtf</WixVariables>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug;MSIProductVersion=$(MSIProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<DefineConstants>Debug;ProductVersion=$(ProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<WixVariables>WixUIBannerBmp=Resources\Banner.jpg;WixUIDialogBmp=Resources\Dialog.jpg;WixUILicenseRtf=Resources\EULA.rtf</WixVariables>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DefineConstants>MSIProductVersion=$(MSIProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<DefineConstants>ProductVersion=$(ProductVersion);HarvestPath=$(HarvestPath)</DefineConstants>
<WixVariables>WixUIBannerBmp=Resources\Banner.jpg;WixUIDialogBmp=Resources\Dialog.jpg;WixUILicenseRtf=Resources\EULA.rtf</WixVariables>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>