Skip to content

Adding x64 on ARM64 support to installers #58059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
<!-- Used for the Rich Navigation indexing task -->
<add key="richnav" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />

<!-- NO MERGE: test only feed for picking up arcade changes still in PR -->
<add key="ericstj" value="https://www.myget.org/F/ericstj-staging/api/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21418.12</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21418.12</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21418.12</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21418.12</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-ericstj.21429.1</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21418.12</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21418.12</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-ericstj.21429.1</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21418.12</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21418.12</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.21418.12</MicrosoftDotNetPackageTestingVersion>
Expand Down
38 changes: 33 additions & 5 deletions src/installer/pkg/sfx/installers/host.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<Fragment>

<ComponentGroup Id="InstallSharedHostandDetectionKeys">
<ComponentGroup Id="InstallSharedHostandDetectionKeys" Directory="DOTNETHOME">

<!-- When installing the SharedHost; copy all files to the traditional default install location: 'ProgramFiles'\dotnet even when installing into a custom location.

Expand All @@ -20,17 +20,32 @@
1. the legacy SDK can be subsequently installed
2. the user runs 'dotnet' commands directly against 'ProgramFiles'\dotnet\dotnet.exe -->

<Component Id="cmpCoreHost" Directory="DOTNETHOME" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}" >
<Component Id="cmpCoreHost" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}" >
<File Id="fileCoreHostExe" KeyPath="yes" Source="$(var.HostSrc)\dotnet.exe">
<CopyFile Id="copyFileCoreHostExe" DestinationDirectory="PROGRAMFILES_DOTNET" />
</File>
</Component>

<Component Id="cmpSharedHostVersionRegistry" Guid="*">
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost">
<RegistryValue Action="write" Name="Version" Type="string" Value="$(var.NugetVersion)"/>
<RegistryValue KeyPath="yes" Action="write" Name="Version" Type="string" Value="$(var.NugetVersion)"/>
</RegistryKey>
</Component>

<Component Id="cmdPath" Guid="*">
<?if $(var.Platform) = x64 ?>
<!-- For x64 installer, only add to PATH when actually on native platform -->
<Condition>NOT INSTALLING_IN_EMULATION</Condition>
<?endif?>

<!-- A stable keypath with the right SxS characteristics for our PATH entry-->
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost">
<RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/>
</RegistryKey>
<Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" />
</Component>

<Component Id="cmpLicenseFiles" Directory="DOTNETHOME" Guid="{A61CBE5B-1282-4F29-90AD-63597AA2372E}">
<Component Id="cmpLicenseFiles" Guid="{A61CBE5B-1282-4F29-90AD-63597AA2372E}">
<File Id="fileLicenseTxt" KeyPath="yes" Source="$(var.HostSrc)\LICENSE.txt">
<CopyFile Id="copyFileLicenseTxt" DestinationDirectory="PROGRAMFILES_DOTNET" />
</File>
Expand All @@ -47,6 +62,19 @@
<DirectoryRef Id="$(var.Program_Files)">
<Directory Id="PROGRAMFILES_DOTNET" Name="dotnet" />
</DirectoryRef>

<?if $(var.Platform) = x64 ?>
<CustomActionRef Id="Set_DOTNETHOME_x64" />
<CustomActionRef Id="Set_PROGRAMFILES_DOTNET_x64" />
<?endif?>
</Fragment>

<Fragment>
<CustomActionRef Id="Set_INSTALLING_IN_EMULATION" />

<!-- Unlike DOTNETHOME which gives precedence to a user specified value over an x64 suffix, here we always want the suffixed path -->
<SetProperty Action="Set_PROGRAMFILES_DOTNET_x64" Id="PROGRAMFILES_DOTNET" Value="[$(var.Program_Files)]dotnet\x64\" Before="CostFinalize">
INSTALLING_IN_EMULATION
</SetProperty>
</Fragment>

</Wix>