From 334cce342647d4de4f4c0e0dedad573cd12e8bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Sun, 12 Jan 2025 15:09:59 +0100 Subject: [PATCH] make: Support new WOW64 in separate bin dir. Based on a patch by Billy Laws. --- Makefile.in | 11 ++++++++++- proton | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 84a3da14..909c38ce 100644 --- a/Makefile.in +++ b/Makefile.in @@ -458,11 +458,20 @@ ifeq ($(findstring i386,$(unix_ARCHS)),) $(call install-strip,$(WINE_x86_64_DST)/bin/wineserver,$(DST_DIR)/bin) cp -a $(WINE_x86_64_DST)/bin/msidb $(DST_DIR)/bin/ else + cp -a $(WINE_x86_64_DST)/bin/wine64 $(WINE_x86_64_DST)/bin/wine + cp -a $(WINE_x86_64_DST)/bin/wine64-preloader $(WINE_x86_64_DST)/bin/wine-preloader + mkdir -p $(DST_DIR)/bin $(call install-strip,$(WINE_x86_64_DST)/bin/wine64,$(DST_DIR)/bin) $(call install-strip,$(WINE_x86_64_DST)/bin/wine64-preloader,$(DST_DIR)/bin) $(call install-strip,$(WINE_x86_64_DST)/bin/wineserver,$(DST_DIR)/bin) - cp -a $(WINE_x86_64_DST)/bin/msidb $(DST_DIR)/bin + cp -a $(WINE_x86_64_DST)/bin/msidb $(DST_DIR)/bin/ + + mkdir -p $(DST_DIR)/bin-wow64 + $(call install-strip,$(WINE_x86_64_DST)/bin/wine,$(DST_DIR)/bin-wow64) + $(call install-strip,$(WINE_x86_64_DST)/bin/wine-preloader,$(DST_DIR)/bin-wow64) + $(call install-strip,$(WINE_x86_64_DST)/bin/wineserver,$(DST_DIR)/bin-wow64) + cp -a $(WINE_x86_64_DST)/bin/msidb $(DST_DIR)/bin-wow64/ endif mkdir -p $(DST_DIR)/share diff --git a/proton b/proton index d39502a6..6fd44575 100755 --- a/proton +++ b/proton @@ -529,6 +529,12 @@ class Proton: self.wineserver_bin = self.bin_dir + "wineserver" self.dist_lock = FileLock(self.path("dist.lock"), timeout=-1) + if os.environ.get("PROTON_USE_WOW64", None) == "1" or not file_exists(self.wine_bin, follow_symlinks=True): + self.bin_dir = self.path("files/bin-wow64/") + self.wine_bin = self.bin_dir + "wine" + self.wine64_bin = self.bin_dir + "wine" + self.wineserver_bin = self.bin_dir + "wineserver" + def path(self, d): return self.base_dir + d @@ -1673,6 +1679,7 @@ class Session: self.log_file.write("Language: LC_ALL " + str(self.env.get("HOST_LC_ALL", None)) + ", LC_MESSAGES " + str(self.env.get("LC_MESSAGES", None)) + ", LC_CTYPE " + str(self.env.get("LC_CTYPE", None)) + "\n") + self.log_file.write("PATH: " + str(self.env.get("PATH", None)) + "\n") #dump some important variables into the log header for var in ["WINEDLLOVERRIDES", "WINEDEBUG"]: