Address feedback

This commit is contained in:
Eric StJohn 2021-09-03 15:41:34 -07:00
parent 771924914b
commit 2fa338adf0
5 changed files with 24 additions and 17 deletions

View file

@ -145,6 +145,9 @@
Example: Example:
dotnet-sdk-3.0.100-alpha1-009719-win-x64.exe /install DOTNETHOME_X64="D:\dotnet\x64" DOTNETHOME_X86="D:\dotnet\x86" /log "installation.log" /quiet /norestart dotnet-sdk-3.0.100-alpha1-009719-win-x64.exe /install DOTNETHOME_X64="D:\dotnet\x64" DOTNETHOME_X86="D:\dotnet\x86" /log "installation.log" /quiet /norestart
--> -->
<Variable Name="DOTNETHOME_X86" bal:Overridable="yes" />
<Variable Name="DOTNETHOME_X64" bal:Overridable="yes" />
<Variable Name="DOTNETHOME_ARM64" bal:Overridable="yes" />
<Variable Name="DOTNETHOME" Type="string" Value="[DOTNETHOME_$(var.PlatformToken)]" bal:Overridable="no" /> <Variable Name="DOTNETHOME" Type="string" Value="[DOTNETHOME_$(var.PlatformToken)]" bal:Overridable="no" />
<Variable Name="BUNDLEMONIKER" Type="string" Value="$(var.ProductMoniker)" bal:Overridable="no" /> <Variable Name="BUNDLEMONIKER" Type="string" Value="$(var.ProductMoniker)" bal:Overridable="no" />
<Variable Name="DOTNETSDKVERSION" Type="string" Value="$(var.NugetVersion)" bal:Overridable="no" /> <Variable Name="DOTNETSDKVERSION" Type="string" Value="$(var.NugetVersion)" bal:Overridable="no" />

View file

@ -54,8 +54,8 @@
</Directory> </Directory>
</Directory> </Directory>
<?if $(var.Platform) = x64 ?> <?if $(var.Platform)~=x64?>
<CustomActionRef Id="Set_DOTNETHOME_x64" /> <CustomActionRef Id="Set_DOTNETHOME_NON_NATIVE_ARCHITECTURE" />
<?endif?> <?endif?>
</Fragment> </Fragment>
<Fragment> <Fragment>

View file

@ -5,7 +5,7 @@
<?define Platform = "$(sys.BUILDARCH)"?> <?define Platform = "$(sys.BUILDARCH)"?>
<?endif?> <?endif?>
<!-- The following match the expected values for PROCESSOR_ARCHITECTURE <!-- InstallerArchitecture matches the expected values for PROCESSOR_ARCHITECTURE
https://docs.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details --> https://docs.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details -->
<?if $(var.Platform)~=x86?> <?if $(var.Platform)~=x86?>
<?define InstallerArchitecture="X86"?> <?define InstallerArchitecture="X86"?>
@ -13,21 +13,25 @@
<?define InstallerArchitecture="AMD64"?> <?define InstallerArchitecture="AMD64"?>
<?elseif $(var.Platform)~=arm64?> <?elseif $(var.Platform)~=arm64?>
<?define InstallerArchitecture="ARM64"?> <?define InstallerArchitecture="ARM64"?>
<?else?>
<?error Unknown platform, $(var.Platform) ?>?
<?endif?> <?endif?>
<Fragment> <Fragment>
<!-- Identify when installing in emulation as when PROCESSOR_ARCHITECTURE does not match the installer architecture <!-- 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 --> https://docs.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details -->
<SetProperty Action="Set_INSTALLING_IN_EMULATION" Id="INSTALLING_IN_EMULATION" Value="true" Before="CostFinalize"> <SetProperty Action="Set_NON_NATIVE_ARCHITECTURE" Id="NON_NATIVE_ARCHITECTURE" Value="true" Before="CostFinalize">
NOT %PROCESSOR_ARCHITECTURE="$(var.InstallerArchitecture)" NOT %PROCESSOR_ARCHITECTURE="$(var.InstallerArchitecture)"
</SetProperty> </SetProperty>
</Fragment> </Fragment>
<?if $(var.Platform)=x64?> <?if $(var.Platform)~=x64?>
<Fragment> <Fragment>
<!-- When running in x64 emulation and user hasn't specified install directory, install to an x64 subdirectory--> <!-- When running in a non-native architecture and user hasn't specified install directory,
<SetProperty Action="Set_DOTNETHOME_x64" Id="DOTNETHOME" Value="[ProgramFiles64Folder]dotnet\x64\" After="Set_INSTALLING_IN_EMULATION"> install to an x64 subdirectory.
INSTALLING_IN_EMULATION AND NOT DOTNETHOME 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> </SetProperty>
</Fragment> </Fragment>
<?endif?> <?endif?>

View file

@ -33,8 +33,8 @@
</Directory> </Directory>
</Directory> </Directory>
<?if $(var.Platform) = x64 ?> <?if $(var.Platform)~=x64?>
<CustomActionRef Id="Set_DOTNETHOME_x64" /> <CustomActionRef Id="Set_DOTNETHOME_NON_NATIVE_ARCHITECTURE" />
<?endif?> <?endif?>
</Fragment> </Fragment>
</Wix> </Wix>

View file

@ -33,8 +33,8 @@
</Directory> </Directory>
</Directory> </Directory>
<?if $(var.Platform) = x64 ?> <?if $(var.Platform)~=x64?>
<CustomActionRef Id="Set_DOTNETHOME_x64" /> <CustomActionRef Id="Set_DOTNETHOME_NON_NATIVE_ARCHITECTURE" />
<?endif?> <?endif?>
</Fragment> </Fragment>
</Wix> </Wix>