|
1 | | -<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
| 1 | +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" |
| 2 | + xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> |
2 | 3 |
|
3 | 4 | <?include "$(var.SharedWixDir)\variables.wxi" ?> |
4 | 5 |
|
|
19 | 20 | 1. the legacy SDK can be subsequently installed |
20 | 21 | 2. the user runs 'dotnet' commands directly against 'ProgramFiles'\dotnet\dotnet.exe --> |
21 | 22 |
|
22 | | - <Component Id="cmpCoreHost" Directory="DOTNETHOME" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}" > |
| 23 | + <Component Id="cmpCoreHost" Directory="DOTNETHOME" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}"> |
23 | 24 | <File Id="fileCoreHostExe" KeyPath="yes" Source="$(var.HostSrc)\dotnet.exe"> |
24 | 25 | <CopyFile Id="copyFileCoreHostExe" DestinationDirectory="PROGRAMFILES_DOTNET" /> |
25 | 26 | </File> |
|
38 | 39 | </Component> |
39 | 40 |
|
40 | 41 | <?if $(var.Platform)~=x64 ?> |
41 | | - <!-- For x64 installer, only add the sharedhost key when actually on native architecture. --> |
42 | | - <Component Id="cmpPath" Directory="DOTNETHOME" Guid="*" Condition="NON_NATIVE_ARCHITECTURE"> |
43 | | - <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
44 | | - <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
45 | | - <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
46 | | - </RegistryKey> |
47 | | - </Component> |
| 42 | + <!-- For x64 installer, only add the sharedhost key when actually on native architecture. --> |
| 43 | + <Component Id="cmpPath" Directory="DOTNETHOME" Condition="NOT NON_NATIVE_ARCHITECTURE"> |
| 44 | + <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
| 45 | + <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
| 46 | + <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
| 47 | + </RegistryKey> |
| 48 | + </Component> |
48 | 49 | <?elseif $(var.Platform)~=x86 ?> |
49 | | - <!-- For x86 installer, only add the key when not on 64-bit platform. --> |
50 | | - <Component Id="cmpPath" Directory="DOTNETHOME" Guid="*" Condition="NOT VersionNT64"> |
51 | | - <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
52 | | - <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
53 | | - <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
54 | | - </RegistryKey> |
55 | | - </Component> |
| 50 | + <!-- For x86 installer, only add the key when not on 64-bit platform. --> |
| 51 | + <Component Id="cmpPath" Directory="DOTNETHOME" Condition="NOT VersionNT64"> |
| 52 | + <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
| 53 | + <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
| 54 | + <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
| 55 | + </RegistryKey> |
| 56 | + </Component> |
56 | 57 | <?else?> |
57 | | - <!-- TODO Is this case needed? --> |
58 | | - <Component Id="cmpPath" Directory="DOTNETHOME" Guid="*"> |
59 | | - <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
60 | | - <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
61 | | - <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
62 | | - </RegistryKey> |
63 | | - </Component> |
| 58 | + <Component Id="cmpPath" Directory="DOTNETHOME"> |
| 59 | + <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
| 60 | + <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
| 61 | + <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
| 62 | + </RegistryKey> |
| 63 | + </Component> |
64 | 64 | <?endif?> |
65 | 65 |
|
66 | 66 | <Component Id="cmpLicenseFiles" Directory="DOTNETHOME" Guid="{A61CBE5B-1282-4F29-90AD-63597AA2372E}"> |
|
89 | 89 |
|
90 | 90 | <Fragment> |
91 | 91 | <Property Id="DISABLE_SETTING_HOST_PATH" Secure="yes"> |
92 | | - <RegistrySearch Id="DisableSettingHostPathSearch" Root="HKLM" Key="SOFTWARE\Microsoft\.NET" Type="raw" Name="DisableSettingHostPath"/> |
| 92 | + <RegistrySearch Id="DisableSettingHostPathSearch" Root="HKLM" Key="SOFTWARE\Microsoft\.NET" Type="raw" Name="DisableSettingHostPath" /> |
93 | 93 | </Property> |
94 | 94 |
|
95 | | - <Component Id="cmpSetPath" Guid="{0B910ED8-0877-473D-8658-647382324433}" Directory="DOTNETHOME"> |
96 | | - <CreateFolder /> |
97 | | - <!-- Always set the SYSTEM PATH, unless DisableSettingHostPath is 1. --> |
98 | | - <?if $(var.Platform)~=x64 ?> |
99 | | - <!-- For x64 installer, only add to PATH when actually on native architecture. --> |
100 | | - <Condition><![CDATA[DISABLE_SETTING_HOST_PATH <> "#1" AND NOT NON_NATIVE_ARCHITECTURE]]></Condition> |
101 | | - <?elseif $(var.Platform)~=x86 ?> |
102 | | - <!-- For x86 installer, only add to PATH when not on 64-bit platform. --> |
103 | | - <Condition><![CDATA[DISABLE_SETTING_HOST_PATH <> "#1" AND NOT VersionNT64]]></Condition> |
104 | | - <?endif?> |
105 | | - <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
106 | | - </Component> |
| 95 | + <?if $(var.Platform)~=x64 ?> |
| 96 | + <Component Id="cmpSetPath" Guid="{0B910ED8-0877-473D-8658-647382324433}" Directory="DOTNETHOME" Condition="DISABLE_SETTING_HOST_PATH <> "#1" AND NOT NON_NATIVE_ARCHITECTURE"> |
| 97 | + <CreateFolder /> |
| 98 | + <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
| 99 | + </Component> |
| 100 | + <?elseif $(var.Platform)~=x86 ?> |
| 101 | + <Component Id="cmpSetPath" Guid="{0B910ED8-0877-473D-8658-647382324433}" Directory="DOTNETHOME" Condition="DISABLE_SETTING_HOST_PATH <> "#1" AND NOT VersionNT64"> |
| 102 | + <CreateFolder /> |
| 103 | + <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
| 104 | + </Component> |
| 105 | + <?else?> |
| 106 | + <Component Id="cmpSetPath" Guid="{0B910ED8-0877-473D-8658-647382324433}" Directory="DOTNETHOME"> |
| 107 | + <CreateFolder /> |
| 108 | + <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
| 109 | + </Component> |
| 110 | + <?endif?> |
| 111 | + |
| 112 | + <util:BroadcastEnvironmentChange Condition="DISABLE_SETTING_HOST_PATH <> "#1"" /> |
| 113 | + |
| 114 | + <!-- TODO change t something like: --> |
| 115 | + <!-- <util:BroadcastEnvironmentChange Action="set" Sequence="afterInstallFinalize" /> |
107 | 116 |
|
108 | 117 | <InstallExecuteSequence> |
109 | | - <!-- Only broadcast the change if the component is enabled. --> |
110 | | - <Custom Action="WixBroadcastEnvironmentChange" After="InstallFinalize"> |
111 | | - <![CDATA[DISABLE_SETTING_HOST_PATH <> "#1"]]> |
112 | | - </Custom> |
113 | | - </InstallExecuteSequence> |
| 118 | + <Custom Action="override Wix4BroadcastEnvironmentChange_X86" After="InstallFinalize" Condition="FOO"/> |
| 119 | + </InstallExecuteSequence> --> |
114 | 120 | </Fragment> |
115 | 121 |
|
116 | 122 | <Fragment> |
|
0 commit comments