I wish there was a nicer way to do this, but SystemSupportedProcessorArchitectures is incomplete on ARM64EC even on Windows so there isn't really a cleaner way I can find.
-- v2: msi: Dynamically determine supported package architectures.
From: Billy Laws blaws05@gmail.com
--- dlls/msi/package.c | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 89b4c09dfa4..fcf43f949a2 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1158,27 +1158,39 @@ static UINT parse_suminfo( MSISUMMARYINFO *si, MSIPACKAGE *package ) return ERROR_SUCCESS; }
+static BOOL validate_package_platform( enum platform platform ) +{ + USHORT proc_machine, native_machine; + IsWow64Process2( GetCurrentProcess(), &proc_machine, &native_machine ); + switch (platform) + { + case PLATFORM_INTEL: + return native_machine == IMAGE_FILE_MACHINE_I386 || + native_machine == IMAGE_FILE_MACHINE_AMD64 || + native_machine == IMAGE_FILE_MACHINE_ARM64; + case PLATFORM_X64: + return native_machine == IMAGE_FILE_MACHINE_AMD64 || + native_machine == IMAGE_FILE_MACHINE_ARM64; + case PLATFORM_ARM: + return native_machine == IMAGE_FILE_MACHINE_ARM; + case PLATFORM_ARM64: + return native_machine == IMAGE_FILE_MACHINE_ARM64; + case PLATFORM_INTEL64: + default: + return FALSE; + } +} + static UINT validate_package( MSIPACKAGE *package ) { UINT i;
- if (package->platform == PLATFORM_INTEL64) - return ERROR_INSTALL_PLATFORM_UNSUPPORTED; -#ifndef __arm__ - if (package->platform == PLATFORM_ARM) - return ERROR_INSTALL_PLATFORM_UNSUPPORTED; -#endif -#ifndef __aarch64__ - if (package->platform == PLATFORM_ARM64) + if (!validate_package_platform( package->platform )) return ERROR_INSTALL_PLATFORM_UNSUPPORTED; -#endif - if (package->platform == PLATFORM_X64) - { - if (!is_64bit && !is_wow64) - return ERROR_INSTALL_PLATFORM_UNSUPPORTED; - if (package->version < 200) - return ERROR_INSTALL_PACKAGE_INVALID; - } + + if (package->platform == PLATFORM_X64 && package->version < 200) + return ERROR_INSTALL_PACKAGE_INVALID; + if (!package->num_langids) { return ERROR_SUCCESS;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=149858
Your paranoid android.
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
=== debian11b (build log) ===
Task: Could not create the wow64 wineprefix: Failed to disable the crash dialogs: Task: WineTest did not produce the wow64 report
I get a test failure at package:2502 after you followed up on my comments. Not sure why the CI pipeline didn't show this failure. It turns out that we should assume PLATFORM_INTEL if the template property is missing as stated in the documentation (we're already treating the empty string as PLATFORM_INTEL). Can you add this commit before yours and approve this MR?[msi.diff](/uploads/ccef6fcd72964cecbc46d04409bea5f4/msi.diff)