From 584b2518f3ea6ea52c448f38426276ec3c1cd3ee Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 19:44:59 +0000 Subject: [PATCH] Fix 32-bit process initialization in experimental WOW64 mode - Added unix-side architecture subdirectories (x86_64-unix, i386-unix) to ARCH_SUBDIRS to support builtin library discovery in modern Wine layouts. - Extended WINEDLLPATH generation in WineTkgRunner to include UNIFIED_BASE_LIB_SUBDIRS (e.g., files/lib) and all architecture-specific subfolders. - Resolves 'cannot find builtin library' errors for 32-bit applications running in experimental WOW64 mode with Proton GE and Proton-CachyOS. Co-authored-by: weter11 <14630689+weter11@users.noreply.github.com> --- src/infra/runners/wine_tkg.rs | 6 +++++- src/proton.rs | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/infra/runners/wine_tkg.rs b/src/infra/runners/wine_tkg.rs index 800945b..3d6cf2c 100644 --- a/src/infra/runners/wine_tkg.rs +++ b/src/infra/runners/wine_tkg.rs @@ -694,7 +694,11 @@ impl Runner for WineTkgRunner { // the .dll.so PE loader stubs it needs to bridge into native DLLs. let active_runner = crate::utils::resolve_runner(proton, &library_root); let runner_root = crate::utils::derive_runner_root(&active_runner); - for lib_sub in crate::proton::UNIFIED_LIB_SUBDIRS { + + let mut all_lib_dirs = crate::proton::UNIFIED_LIB_SUBDIRS.to_vec(); + all_lib_dirs.extend_from_slice(crate::proton::UNIFIED_BASE_LIB_SUBDIRS); + + for lib_sub in all_lib_dirs { let p = runner_root.join(lib_sub); if p.exists() { let s = p.to_string_lossy().to_string(); diff --git a/src/proton.rs b/src/proton.rs index 9f478b3..ea59748 100644 --- a/src/proton.rs +++ b/src/proton.rs @@ -42,6 +42,8 @@ pub const UNIFIED_BASE_LIB_SUBDIRS: &[&str] = &[ pub const ARCH_SUBDIRS: &[(&str, &str)] = &[ ("x86_64", "x86_64-windows"), ("i386", "i386-windows"), + ("x86_64", "x86_64-unix"), + ("i386", "i386-unix"), ]; pub const COMPONENT_FAMILIES: &[&str] = &[