Merge pull request #2789 from Sridhar-MS/msi-2713

Change the host MSI dependency key for correct reference counting.
This commit is contained in:
Piotr Puszkiewicz 2016-05-03 13:43:20 -07:00
commit 34a8a5ad11
12 changed files with 21 additions and 13 deletions

View file

@ -13,7 +13,7 @@
<ComponentGroupRef Id="AuthoredRegistryKeys"/> <ComponentGroupRef Id="AuthoredRegistryKeys"/>
</Feature> </Feature>
<Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install"> <Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
<ComponentRef Id="Dotnet_CLI_$(var.Dotnet_DisplayVersion)" /> <ComponentRef Id="$(var.DependencyKeyId)" />
</Feature> </Feature>
<Property Id="ProductFamily" Value="$(var.ProductFamily)" /> <Property Id="ProductFamily" Value="$(var.ProductFamily)" />
<Property Id="ProductEdition" Value="$(var.ProductEdition)" /> <Property Id="ProductEdition" Value="$(var.ProductEdition)" />

View file

@ -2,8 +2,8 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
<?include "Variables.wxi" ?> <?include "Variables.wxi" ?>
<Fragment> <Fragment>
<Component Id="Dotnet_CLI_$(var.Dotnet_DisplayVersion)" Directory="TARGETDIR" Win64="no" Guid="3B7DF8C8-9BB9-3F4C-8CBF-E393E4D7FF43"> <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no" Guid="3B7DF8C8-9BB9-3F4C-8CBF-E393E4D7FF43">
<dep:Provides Key="Dotnet.CLI_$(var.Dotnet_DisplayVersion)" /> <dep:Provides Key="$(var.DependencyKey)" />
</Component> </Component>
</Fragment> </Fragment>
</Wix> </Wix>

View file

@ -25,4 +25,7 @@
<?else?> <?else?>
<?error Invalid Platform ($(var.Platform))?> <?error Invalid Platform ($(var.Platform))?>
<?endif?> <?endif?>
<?define DependencyKey = "Dotnet_CLI_$(var.Dotnet_DisplayVersion)_$(var.Platform)"?>
<?define DependencyKeyId = "$(var.DependencyKey)" ?>
</Include> </Include>

View file

@ -7,7 +7,6 @@ param(
[Parameter(Mandatory=$true)][string]$WixRoot, [Parameter(Mandatory=$true)][string]$WixRoot,
[Parameter(Mandatory=$true)][string]$ProductMoniker, [Parameter(Mandatory=$true)][string]$ProductMoniker,
[Parameter(Mandatory=$true)][string]$DotnetMSIVersion, [Parameter(Mandatory=$true)][string]$DotnetMSIVersion,
[Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion,
[Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion,
[Parameter(Mandatory=$true)][string]$Architecture, [Parameter(Mandatory=$true)][string]$Architecture,
[Parameter(Mandatory=$true)][string]$WixObjRoot [Parameter(Mandatory=$true)][string]$WixObjRoot
@ -31,7 +30,6 @@ function RunCandle
-dMicrosoftEula="$RepoRoot\packaging\osx\clisdk\resources\en.lproj\eula.rtf" ` -dMicrosoftEula="$RepoRoot\packaging\osx\clisdk\resources\en.lproj\eula.rtf" `
-dProductMoniker="$ProductMoniker" ` -dProductMoniker="$ProductMoniker" `
-dBuildVersion="$DotnetMSIVersion" ` -dBuildVersion="$DotnetMSIVersion" `
-dDisplayVersion="$DotnetCLIDisplayVersion" `
-dNugetVersion="$DotnetCLINugetVersion" ` -dNugetVersion="$DotnetCLINugetVersion" `
-arch $Architecture ` -arch $Architecture `
"$AuthWsxRoot\host.wxs" ` "$AuthWsxRoot\host.wxs" `

View file

@ -13,7 +13,7 @@
<ComponentGroupRef Id="AuthoredRegistryKeys"/> <ComponentGroupRef Id="AuthoredRegistryKeys"/>
</Feature> </Feature>
<Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install"> <Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
<ComponentRef Id="Dotnet_CLI_SharedHost_$(var.Dotnet_DisplayVersion)" /> <ComponentRef Id="$(var.DependencyKeyId)" />
</Feature> </Feature>
<Property Id="ProductCPU" Value="$(var.Platform)" /> <Property Id="ProductCPU" Value="$(var.Platform)" />
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" /> <Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />

View file

@ -2,8 +2,8 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
<?include "Variables.wxi" ?> <?include "Variables.wxi" ?>
<Fragment> <Fragment>
<Component Id="Dotnet_CLI_SharedHost_$(var.Dotnet_DisplayVersion)" Directory="TARGETDIR" Win64="no" Guid="82516259-FF21-446E-A432-1FFCA5A02296"> <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no" Guid="82516259-FF21-446E-A432-1FFCA5A02296">
<dep:Provides Key="Dotnet_CLI_SharedHost_$(var.Dotnet_DisplayVersion)" /> <dep:Provides Key="$(var.DependencyKey)" />
</Component> </Component>
</Fragment> </Fragment>
</Wix> </Wix>

View file

@ -5,7 +5,6 @@
<?define Servicing_Key_SPIndex = "0" ?> <?define Servicing_Key_SPIndex = "0" ?>
<?define Servicing_Key_SPName = "Beta" ?> <?define Servicing_Key_SPName = "Beta" ?>
<?define Dotnet_ProductVersion = "$(var.BuildVersion)" ?> <?define Dotnet_ProductVersion = "$(var.BuildVersion)" ?>
<?define Dotnet_DisplayVersion = "$(var.DisplayVersion)" ?>
<?define Dotnet_BuildVersion = "$(var.BuildVersion)" ?> <?define Dotnet_BuildVersion = "$(var.BuildVersion)" ?>
<?define Manufacturer = "Microsoft Corporation" ?> <?define Manufacturer = "Microsoft Corporation" ?>
<?define ProductName = "$(var.ProductMoniker) ($(var.NugetVersion) $(sys.BUILDARCH))" ?> <?define ProductName = "$(var.ProductMoniker) ($(var.NugetVersion) $(sys.BUILDARCH))" ?>
@ -26,4 +25,7 @@
<?else?> <?else?>
<?error Invalid Platform ($(var.Platform))?> <?error Invalid Platform ($(var.Platform))?>
<?endif?> <?endif?>
<?define DependencyKey = "Dotnet_CLI_SharedHost_$(var.Platform)"?>
<?define DependencyKeyId = "$(var.DependencyKey)" ?>
</Include> </Include>

View file

@ -25,6 +25,7 @@ function RunCandleForBundle
Write-Host Running candle for bundle.. Write-Host Running candle for bundle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\sharedframework" $AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\sharedframework"
$SharedFrameworkComponentVersion = $SharedFrameworkNugetVersion.Replace('-', '_');
.\candle.exe -nologo ` .\candle.exe -nologo `
-dMicrosoftEula="$RepoRoot\packaging\osx\sharedframework\resources\en.lproj\eula.rtf" ` -dMicrosoftEula="$RepoRoot\packaging\osx\sharedframework\resources\en.lproj\eula.rtf" `
@ -35,6 +36,7 @@ function RunCandleForBundle
-dSharedHostMsiSourcePath="$SharedHostMSIFile" ` -dSharedHostMsiSourcePath="$SharedHostMSIFile" `
-dFrameworkName="$SharedFrameworkNugetName" ` -dFrameworkName="$SharedFrameworkNugetName" `
-dFrameworkDisplayVersion="$SharedFrameworkNugetVersion" ` -dFrameworkDisplayVersion="$SharedFrameworkNugetVersion" `
-dFrameworkComponentVersion="$SharedFrameworkComponentVersion" `
-dFrameworkUpgradeCode="$SharedFrameworkUpgradeCode" ` -dFrameworkUpgradeCode="$SharedFrameworkUpgradeCode" `
-arch "$Architecture" ` -arch "$Architecture" `
-ext WixBalExtension.dll ` -ext WixBalExtension.dll `

View file

@ -2,8 +2,8 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
<?include "Variables.wxi" ?> <?include "Variables.wxi" ?>
<Fragment> <Fragment>
<Component Id="DotNet_CLI_SharedFramework_$(var.FrameworkName)_$(var.FrameworkComponentVersion)" Directory="TARGETDIR" Win64="no" Guid="F47B3A4D-7CEB-4F18-8464-0F6C5978E08E"> <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no" Guid="F47B3A4D-7CEB-4F18-8464-0F6C5978E08E">
<dep:Provides Key="DotNet.CLI.SharedFramework.$(var.FrameworkName)_$(var.FrameworkComponentVersion)" /> <dep:Provides Key="$(var.DependencyKey)" />
</Component> </Component>
</Fragment> </Fragment>
</Wix> </Wix>

View file

@ -34,7 +34,7 @@
</Component> </Component>
</Feature> </Feature>
<Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install"> <Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
<ComponentRef Id="DotNet_CLI_SharedFramework_$(var.FrameworkName)_$(var.FrameworkComponentVersion)" /> <ComponentRef Id="$(var.DependencyKeyId)" />
</Feature> </Feature>
<Property Id="MSIFASTINSTALL" Value="7" /> <Property Id="MSIFASTINSTALL" Value="7" />

View file

@ -28,4 +28,7 @@
<?else?> <?else?>
<?error Invalid Platform ($(var.Platform))?> <?error Invalid Platform ($(var.Platform))?>
<?endif?> <?endif?>
<?define DependencyKey = "DotNet.CLI.SharedFramework.$(var.FrameworkName)_$(var.FrameworkComponentVersion)_$(var.Platform)"?>
<?define DependencyKeyId = "$(var.DependencyKey)" ?>
</Include> </Include>

View file

@ -150,7 +150,7 @@ namespace Microsoft.DotNet.Cli.Build
Cmd("powershell", "-NoProfile", "-NoLogo", Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"), Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"),
inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, MsiVersion, CliDisplayVersion, CliNugetVersion, Arch, wixObjRoot) inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, MsiVersion, CliNugetVersion, Arch, wixObjRoot)
.Execute() .Execute()
.EnsureSuccessful(); .EnsureSuccessful();
return c.Success(); return c.Success();