mirror of https://github.com/BOINC/boinc.git
Merge pull request #5935 from BOINC/vko_arm64_fix_platform_name
[Windows] Set correct platform name when running BOINC client on Windows on ARM.
This commit is contained in:
commit
51803c6bf4
|
@ -24,6 +24,9 @@
|
|||
#include "boinc_win.h"
|
||||
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
|
||||
LPFN_ISWOW64PROCESS fnIsWow64Process;
|
||||
#ifndef SIM
|
||||
#include "hostinfo.h"
|
||||
#endif
|
||||
#else
|
||||
#include "config.h"
|
||||
#include <cstdio>
|
||||
|
@ -172,7 +175,24 @@ int launch_child_process_to_detect_emulated_cpu() {
|
|||
void CLIENT_STATE::detect_platforms() {
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN32__)
|
||||
#if defined(_WIN64) && defined(_M_X64)
|
||||
#if defined(_ARM64_)
|
||||
add_platform("windows_arm64");
|
||||
#ifndef SIM
|
||||
// according to
|
||||
// https://learn.microsoft.com/en-us/windows/arm/apps-on-arm-x86-emulation
|
||||
// Windows 10 on ARM can run x86 applications,
|
||||
// and Windows 11 on ARM can run x86_64 applications
|
||||
// so we will add these platfroms as well
|
||||
OSVERSIONINFOEX osvi;
|
||||
BOOL bOsVersionInfoEx = get_OSVERSIONINFO(osvi);
|
||||
if (osvi.dwMajorVersion >= 10) {
|
||||
add_platform("windows_intelx86");
|
||||
if (osvi.dwBuildNumber >= 22000) {
|
||||
add_platform("windows_x86_64");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#elif defined(_WIN64) && defined(_M_X64)
|
||||
add_platform("windows_x86_64");
|
||||
add_platform("windows_intelx86");
|
||||
#else
|
||||
|
|
|
@ -386,8 +386,8 @@ int get_os_information(
|
|||
}
|
||||
} else {
|
||||
if (osvi.dwBuildNumber >= 26100) {
|
||||
strlcat(os_name, "Windows Server 2025", os_name_size);
|
||||
} else if (osvi.dwBuildNumber >= 25398) {
|
||||
strlcat(os_name, "Windows Server 2025", os_name_size);
|
||||
} else if (osvi.dwBuildNumber >= 25398) {
|
||||
strlcat(os_name, "Windows Server 23H2", os_name_size);
|
||||
} else if (osvi.dwBuildNumber >= 20348) {
|
||||
strlcat(os_name, "Windows Server 2022", os_name_size);
|
||||
|
|
|
@ -172,6 +172,12 @@ public:
|
|||
|
||||
extern void make_secure_random_string(char*);
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef SIM
|
||||
extern BOOL get_OSVERSIONINFO(OSVERSIONINFOEX& osvi);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
extern int get_wsl_information(WSL_DISTROS &distros);
|
||||
extern int get_processor_group(HANDLE);
|
||||
|
|
Loading…
Reference in New Issue