Change the install path, registry key path and environment component.

Install path is now %ProgramFiles%\dotnet
Registry root is now "HKLM\SOFTWARE\dotnet\Setup"
Env variables setup is now associated with a versioned component - the
registry keys. Environment resource cannot serve as a keypath hence it is
coupled with a registry key which is the key path for the component.
This commit is contained in:
Sridhar Periyasamy 2015-11-20 17:44:48 -08:00
parent da70b047e9
commit 040e7f5d84
4 changed files with 13 additions and 28 deletions

View file

@ -13,7 +13,6 @@
<MediaTemplate CompressionLevel="mszip" EmbedCab="yes"/> <MediaTemplate CompressionLevel="mszip" EmbedCab="yes"/>
<Feature Id="MainFeature" Title="Main Feature" Level="1"> <Feature Id="MainFeature" Title="Main Feature" Level="1">
<ComponentGroupRef Id="InstallFiles" /> <ComponentGroupRef Id="InstallFiles" />
<ComponentRef Id="SetEnvVars" />
<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">
@ -25,18 +24,17 @@
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" /> <Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
<!--Property Id="ARPNOMODIFY" Value="1" /--> <!--Property Id="ARPNOMODIFY" Value="1" /-->
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" /> <WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
<Property Id="WIXUI_INSTALLDIR" Value="DOTNETHOME"/> <Property Id="WIXUI_INSTALLDIR" Value="DOTNETHOME"/>
<UIRef Id="WixUI_InstallDir" /> <UIRef Id="WixUI_InstallDir" />
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
</Product> </Product>
<Fragment> <Fragment>
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)" Name="$(var.Program_Files)"> <Directory Id="$(var.Program_Files)" Name="$(var.Program_Files)">
<Directory Id="ProgramFilesFolder.Microsoft" Name="Microsoft"> <Directory Id="DOTNETHOME" Name="dotnet"/>
<Directory Id="DOTNETHOME" Name="dotnet"/>
</Directory>
</Directory> </Directory>
</Directory> </Directory>
</Fragment> </Fragment>

View file

@ -1,13 +0,0 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
<?include "Variables.wxi" ?>
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Component Id="SetEnvVars" Guid="{E503A496-DE1B-4646-81D4-47213B4CCFAF}">
<Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]bin" Permanent="no" Part="last" Action="set" System="yes" />
<Environment Id="E_DOTNET_HOME" Name="DOTNET_HOME" Value="[DOTNETHOME]" Permanent="no" Part="all" Action="set" System="yes" />
</Component>
</DirectoryRef>
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
</Fragment>
</Wix>

View file

@ -43,7 +43,7 @@ function RunHeat
Write-Host Running heat.. Write-Host Running heat..
.\heat.exe dir `"$inputDir`" -template fragment -sreg -gg -var var.DotnetSrc -cg InstallFiles -srd -dr DOTNETHOME -out $InstallFileswsx | Out-Null .\heat.exe dir `"$inputDir`" -template fragment -sreg -gg -var var.DotnetSrc -cg InstallFiles -srd -dr DOTNETHOME -out $InstallFileswsx | Out-Host
if($LastExitCode -ne 0) if($LastExitCode -ne 0)
{ {
@ -66,10 +66,9 @@ function RunCandle
.\candle.exe -dDotnetSrc="$inputDir" -dMicrosoftEula="$RepoRoot\packaging\osx\resources\en.lproj\eula.rtf" -dBuildVersion="$env:DOTNET_BUILD_VERSION" -arch x64 ` .\candle.exe -dDotnetSrc="$inputDir" -dMicrosoftEula="$RepoRoot\packaging\osx\resources\en.lproj\eula.rtf" -dBuildVersion="$env:DOTNET_BUILD_VERSION" -arch x64 `
-ext WixDependencyExtension.dll ` -ext WixDependencyExtension.dll `
"$AuthWsxRoot\dotnet.wxs" ` "$AuthWsxRoot\dotnet.wxs" `
"$AuthWsxRoot\envvars.wxs" `
"$AuthWsxRoot\provider.wxs" ` "$AuthWsxRoot\provider.wxs" `
"$AuthWsxRoot\registrykeys.wxs" ` "$AuthWsxRoot\registrykeys.wxs" `
$InstallFileswsx | Out-Null $InstallFileswsx | Out-Host
if($LastExitCode -ne 0) if($LastExitCode -ne 0)
{ {
@ -91,11 +90,10 @@ function RunLight
.\light -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension ` .\light -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
-cultures:en-us ` -cultures:en-us `
dotnet.wixobj ` dotnet.wixobj `
envvars.wixobj `
provider.wixobj ` provider.wixobj `
registrykeys.wixobj ` registrykeys.wixobj `
$InstallFilesWixobj ` $InstallFilesWixobj `
-out $DotnetMSIOutput | Out-Null -out $DotnetMSIOutput | Out-Host
if($LastExitCode -ne 0) if($LastExitCode -ne 0)
{ {

View file

@ -4,12 +4,14 @@
<Fragment> <Fragment>
<ComponentGroup Id="AuthoredRegistryKeys"> <ComponentGroup Id="AuthoredRegistryKeys">
<Component Directory="TARGETDIR" Guid="*" Win64="$(var.Win64AttributeValue)"> <Component Directory="TARGETDIR" Guid="*" Win64="$(var.Win64AttributeValue)">
<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Dotnet CLI\Setup"> <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup">
<RegistryValue Action="write" Name="Install" Type="integer" Value="1" /> <RegistryValue Action="write" Name="Install" Type="integer" Value="1" KeyPath="yes"/>
<RegistryValue Action="write" Name="InstallDir" Type="string" Value="[DOTNETHOME]" /> <RegistryValue Action="write" Name="InstallDir" Type="string" Value="[DOTNETHOME]" />
<RegistryValue Action="write" Name="Version" Type="string" Value="$(var.Dotnet_ProductVersion)" /> <RegistryValue Action="write" Name="Version" Type="string" Value="$(var.Dotnet_ProductVersion)" />
</RegistryKey> </RegistryKey>
</Component> <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]bin" Permanent="no" Part="last" Action="set" System="yes" />
<Environment Id="E_DOTNET_HOME" Name="DOTNET_HOME" Value="[DOTNETHOME]" Permanent="no" Part="all" Action="set" System="yes" />
</Component>
</ComponentGroup> </ComponentGroup>
</Fragment> </Fragment>
</Wix> </Wix>