Skip to content
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

Use WIX_NATIVE_MACHINE to detect native architecture of target machine #8000

Merged
merged 2 commits into from
Oct 6, 2021

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Oct 6, 2021

This leverages the feature I added to Wix which reads the native architecture from the recent feature:
wixtoolset/wix3@75699d8

<?if $(var.Platform)~=x86?>
<?define InstallerArchitecture="X86"?>
<?define InstallerNativeMachine=332?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably define these constants so that everyone can use them eventually. For now we do have the link, but something like <?define NativeMachine_ARM64=43620?> in a shared include or lib would be nice for 7.0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm doing that in installer where we need all the values in the bundle. Here we need the value for a single arch.

Yeah consolidating more would be nice.

@ericstj
Copy link
Member Author

ericstj commented Oct 6, 2021

Manually tested this in dotnet/runtime by building host.

x64 install

WixQueryNativeMachine:  Entering WixQueryNativeMachine in C:\Users\erics\AppData\Local\Temp\MSIB974.tmp, version 3.14.5722.0
MSI (c) (70!90) [09:04:05:784]: PROPERTY CHANGE: Adding WIX_NATIVE_MACHINE property. Its value is '34404'.
Action ended 9:04:05: WixQueryNativeMachine. Return value 1.
...
MSI (c) (70:80) [09:04:05:798]: Skipping action: Set_NON_NATIVE_ARCHITECTURE (condition is false)

This will require that dotnet/runtime#59500 be merged before runtime can ingest this change.

@ericstj ericstj merged commit 244e6dc into dotnet:main Oct 6, 2021
@ericstj
Copy link
Member Author

ericstj commented Oct 6, 2021

/backport to release/6.0

ericstj added a commit to ericstj/arcade that referenced this pull request Oct 6, 2021
dotnet#8000)

* Use WIX_NATIVE_MACHINE to detect native architecture of target machine

* Reference WIX_NATIVE_MACHINE property
@ericstj
Copy link
Member Author

ericstj commented Oct 6, 2021

Here's this working on an ARM64 machine. 👍

Action start 16:00:04: WixQueryNativeMachine.
MSI (c) (94:A4) [16:00:04:381]: Invoking remote custom action. DLL: C:\Users\ericstj\AppData\Local\Temp\MSIDE70.tmp, Entrypoint: WixQueryNativeMachine
WixQueryNativeMachine:  Entering WixQueryNativeMachine in C:\Users\ericstj\AppData\Local\Temp\MSIDE70.tmp, version 3.14.5722.0
MSI (c) (94!0C) [16:00:04:538]: PROPERTY CHANGE: Adding WIX_NATIVE_MACHINE property. Its value is '43620'.
Action ended 16:00:04: WixQueryNativeMachine. Return value 1.
...
MSI (c) (94:F0) [16:00:04:695]: Doing action: Set_NON_NATIVE_ARCHITECTURE
MSI (c) (94:F0) [16:00:04:695]: Note: 1: 2205 2:  3: ActionText 
Action 16:00:04: Set_NON_NATIVE_ARCHITECTURE. 
Action start 16:00:04: Set_NON_NATIVE_ARCHITECTURE.
MSI (c) (94:F0) [16:00:04:695]: PROPERTY CHANGE: Adding NON_NATIVE_ARCHITECTURE property. Its value is 'true'.
Action ended 16:00:04: Set_NON_NATIVE_ARCHITECTURE. Return value 1.

mmitche pushed a commit that referenced this pull request Oct 7, 2021
#8000) (#8003)

* Use WIX_NATIVE_MACHINE to detect native architecture of target machine

* Reference WIX_NATIVE_MACHINE property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants