-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding detection and retargeting of DOTNETHOME (#7785)
* Adding detection and retargeting of DOTNETHOME When x64 is installed on non-x64 machine, place in an x64 subdirectory. * Remove test value of dotnet folder * Fix ProgramFilesFolder preprocessor variable usage * Refactor Set_DOTNETHOME_x64 into a single shared source file * Add CA ID for INSTALLING_IN_EMULATION. * Define Platform consistently * Move workload registration to platform specific * Refactor INSTALLING_IN_EMULATION property Don't need to use a registry search since environment of the MSIServer process can be read (TBD pending reccomendation from MSI team). Also make property work for any architecture, in case we wish to use it more generically (EG: to condition PATH entry in host installer). * Make platform comparison case insensitive * Respond to feedback
- Loading branch information
Showing
9 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
<?ifndef Platform?> | ||
<?define Platform = "$(sys.BUILDARCH)"?> | ||
<?endif?> | ||
|
||
<!-- InstallerArchitecture matches the expected values for PROCESSOR_ARCHITECTURE | ||
https://docs.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details --> | ||
<?if $(var.Platform)~=x86?> | ||
<?define InstallerArchitecture="X86"?> | ||
<?elseif $(var.Platform)~=x64?> | ||
<?define InstallerArchitecture="AMD64"?> | ||
<?elseif $(var.Platform)~=arm64?> | ||
<?define InstallerArchitecture="ARM64"?> | ||
<?else?> | ||
<?error Unknown platform, $(var.Platform) ?>? | ||
<?endif?> | ||
|
||
<Fragment> | ||
<!-- Identify when installing in emulation as when PROCESSOR_ARCHITECTURE does not match the installer architecture | ||
https://docs.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details --> | ||
<SetProperty Action="Set_NON_NATIVE_ARCHITECTURE" Id="NON_NATIVE_ARCHITECTURE" Value="true" Before="CostFinalize"> | ||
NOT %PROCESSOR_ARCHITECTURE="$(var.InstallerArchitecture)" | ||
</SetProperty> | ||
</Fragment> | ||
|
||
<?if $(var.Platform)~=x64?> | ||
<Fragment> | ||
<!-- When running in a non-native architecture and user hasn't specified install directory, | ||
install to an x64 subdirectory. | ||
This is only define for x64, since x86 has redirection and no other native architecture can install ARM64 today --> | ||
<SetProperty Action="Set_DOTNETHOME_NON_NATIVE_ARCHITECTURE" Id="DOTNETHOME" Value="[ProgramFiles64Folder]dotnet\x64\" After="Set_NON_NATIVE_ARCHITECTURE"> | ||
NON_NATIVE_ARCHITECTURE AND NOT DOTNETHOME | ||
</SetProperty> | ||
</Fragment> | ||
<?endif?> | ||
</Wix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters