Changes to dotnet MSI authoring based on netfx mtpack authoring.

- Added reg keys to detect installation.
- Added dependency provider keys
This commit is contained in:
Sridhar Periyasamy 2015-11-17 20:32:02 -08:00
parent 6a0a982f2f
commit 57b1b5b290
3 changed files with 59 additions and 33 deletions

View file

@ -4,7 +4,7 @@
},
"dependencies": {
"WiX.Toolset.2015": "3.10.0.1503"
"WiX": "3.10.0.2103-pre1"
},
"frameworks": {

View file

@ -1,33 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="{12897D7D-AC14-4971-AF57-157E8D327C79}" Language="1033" Manufacturer="Microsoft" Name="Dotnet CLI" UpgradeCode="{FCBF9710-A891-4FF5-8909-48E6EEC9180A}" Version="1.0.0.0">
<?include "Variables.wxi" ?>
<Product Id="*" Name="$(var.ProductName)" Language="$(var.ProductLanguage)" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package Compressed="yes" InstallerVersion="200" />
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
<Property Id="WIXUI_INSTALLDIR" Value="DOTNETHOME"/>
<UIRef Id="WixUI_InstallDir" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="DOTNETHOME" Name="dotnet"/>
</Directory>
</Directory>
<DirectoryRef Id="TARGETDIR">
<Component Id="SETENVVARS" Guid="{E503A496-DE1B-4646-81D4-47213B4CCFAF}">
<Environment Id="PATH" Name="PATH" Value="[DOTNETHOME]bin" Permanent="no" Part="last" Action="set" System="no" />
<Environment Id="DOTNET_HOME" Name="DOTNET_HOME" Value="[DOTNETHOME]" Permanent="no" Part="all" Action="set" System="no" />
</Component>
</DirectoryRef>
<Feature Id="SetEnvVarsFeature" Level="1" Title="Set required env vars">
<ComponentRef Id="SETENVVARS" />
</Feature>
<Feature Id="DotnetFilesFeatures" Level="1" Title="Dotnet Files">
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)" IncludeMinimum="no" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" Language="$(var.LCID)" />
<UpgradeVersion Minimum="0.0.0.0" Maximum="$(var.ProductVersion)" IncludeMinimum="no" IncludeMaximum="no" Property="WIX_DOWNGRADE_DETECTED" Language="$(var.LCID)" />
</Upgrade>
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
</InstallExecuteSequence>
<MediaTemplate CompressionLevel="mszip" EmbedCab="yes"/>
<Feature Id="MainFeature" Title="Main Feature" Level="1">
<ComponentGroupRef Id="InstallFiles" />
<ComponentRef Id="SetEnvVars" />
<ComponentGroupRef Id="AuthoredRegistryKeys"/>
</Feature>
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<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)" />
</Feature>
<Property Id="ProductFamily" Value="$(var.ProductFamily)" />
<Property Id="ProductEdition" Value="$(var.ProductEdition)" />
<Property Id="ProductCPU" Value="$(var.Platform)" />
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
<!--Property Id="ARPNOMODIFY" Value="1" /-->
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
<Property Id="WIXUI_INSTALLDIR" Value="DOTNETHOME"/>
<UIRef Id="WixUI_InstallDir" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)" Name="$(var.Program_Files)">
<Directory Id="ProgramFilesFolder.Microsoft" Name="Microsoft">
<Directory Id="DOTNETHOME" Name="dotnet"/>
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>

View file

@ -18,7 +18,7 @@ function AcquireWixTools
Write-Host Restoring Wixtools..
$result = Join-Path $env:TEMP WiX
$result = $env:TEMP
.\dotnet restore $RepoRoot\packaging\windows\WiXTools --packages $result | Out-Null
@ -29,7 +29,7 @@ function AcquireWixTools
}
else
{
$result = Join-Path $result WiX.Toolset.2015\3.10.0.1503\tools\wix
$result = Join-Path $result WiX\3.10.0.2103-pre1\tools
}
popd
@ -61,8 +61,15 @@ function RunCandle
pushd "$WixRoot"
Write-Host Running candle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows"
.\candle.exe -dDotnetSrc="$inputDir" -dMicrosoftEula="$RepoRoot\packaging\osx\resources\en.lproj\eula.rtf" "$RepoRoot\packaging\windows\dotnet.wxs" $InstallFileswsx | Out-Null
.\candle.exe -dDotnetSrc="$inputDir" -dMicrosoftEula="$RepoRoot\packaging\osx\resources\en.lproj\eula.rtf" -dBuildVersion="$env:DOTNET_BUILD_VERSION" -arch x64 `
-ext WixDependencyExtension.dll `
"$AuthWsxRoot\dotnet.wxs" `
"$AuthWsxRoot\envvars.wxs" `
"$AuthWsxRoot\provider.wxs" `
"$AuthWsxRoot\registrykeys.wxs" `
$InstallFileswsx | Out-Null
if($LastExitCode -ne 0)
{
@ -81,7 +88,14 @@ function RunLight
Write-Host Running light..
.\light -ext WixUIExtension -cultures:en-us dotnet.wixobj $InstallFilesWixobj -out $DotnetMSIOutput | Out-Null
.\light -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
-cultures:en-us `
dotnet.wixobj `
envvars.wixobj `
provider.wixobj `
registrykeys.wixobj `
$InstallFilesWixobj `
-out $DotnetMSIOutput | Out-Null
if($LastExitCode -ne 0)
{
@ -117,7 +131,6 @@ if([string]::IsNullOrEmpty($WixRoot))
if(-Not (RunHeat))
{
Write-Host Fooooobar
return -1
}
@ -139,4 +152,7 @@ if(!(Test-Path $DotnetMSIOutput))
Write-Host -ForegroundColor Green "Successfully create dotnet MSI - $DotnetMSIOutput"
return 0
$PublishScript = Join-Path $PSScriptRoot "..\..\scripts\publish\publish.ps1"
& $PublishScript -file $DotnetMSIOutput
exit $LastExitCode