Windows ARM: Remove workarounds no longer needed

This commit is contained in:
Kay Hayen
2025-01-18 18:14:48 +01:00
parent 1b64089150
commit 390db24294
2 changed files with 2 additions and 19 deletions

View File

@@ -837,10 +837,8 @@ def setupCCompiler(env, lto_mode, pgo_mode, job_count, onefile_compile):
if env.mingw_mode and env.target_arch == "x86_64" and env.python_version < (3, 12):
env.Append(CPPDEFINES=["MS_WIN64"])
# For shell API usage to lookup app folders we need this. Note that on Windows ARM
# we didn't manage to have a "shell32.lib" that is not considered corrupt, so we
# have to do this.
if env.msvc_mode and env.target_arch != "arm64":
# For shell API usage to lookup app folders we need this.
if env.msvc_mode:
env.Append(LIBS=["Shell32"])
# Since Fedora 36, the system Python will not link otherwise.

View File

@@ -748,26 +748,11 @@ char const *getBinaryFilenameHostEncoded(bool resolve_symlinks) {
static bool appendStringCSIDLPathW(wchar_t *target, int csidl_id, size_t buffer_size) {
wchar_t path_buffer[MAX_PATH];
#if !defined(_M_ARM64)
int res = SHGetFolderPathW(NULL, csidl_id, NULL, 0, path_buffer);
if (res != S_OK) {
return false;
}
#else
// spell-checker: ignore USERPROFILE,LOCALAPPDATA
DWORD res = 0;
if (csidl_id == CSIDL_PROFILE) {
res = GetEnvironmentVariableW(L"USERPROFILE", path_buffer, sizeof(path_buffer));
} else if (csidl_id == CSIDL_LOCAL_APPDATA) {
res = GetEnvironmentVariableW(L"LOCALAPPDATA", path_buffer, sizeof(path_buffer));
}
if (res == 0 || res > sizeof(path_buffer)) {
return false;
}
#endif
appendWStringSafeW(target, path_buffer, buffer_size);
return true;