[PATCH] mscoree: Handle the shared wine-mono installation like the msi case.

Francois Gouget fgouget at codeweavers.com
Sun Mar 22 08:23:30 CDT 2020

Expect to find the wine-mono-<ver> directory in the same location as the
msi file, that is inside the mono directory.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>

I propose this patch to bring the shared Mono install case in line with 
the MSI case and Gecko, as per the last point in the following email:


I don't think it's worth keeping backward compatibility, i.e. look in 
../wine-mono-<ver> then ../mono/wine-mono-<ver> (or vice versa), but if 
that's deemed important, let me know.

 dlls/mscoree/metahost.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c
index 3786f3afc5c..df0417e0f6d 100644
--- a/dlls/mscoree/metahost.c
+++ b/dlls/mscoree/metahost.c
@@ -784,16 +784,15 @@ static BOOL get_mono_path_datadir(LPWSTR path)
     static const WCHAR winedatadirW[] = {'W','I','N','E','D','A','T','A','D','I','R',0};
     static const WCHAR winebuilddirW[] = {'W','I','N','E','B','U','I','L','D','D','I','R',0};
     static const WCHAR unix_prefix[] = {'\\','?','?','\\','u','n','i','x','\\'};
-    static const WCHAR monoW[] = {'\\','m','o','n','o',0};
-    static const WCHAR dotdotW[] = {'\\','.','.',0};
+    static const WCHAR monoW[] = {'\\','.','.','\\','m','o','n','o',0};
     const WCHAR *data_dir, *suffix;
     WCHAR *package_dir;
     BOOL ret;
     if ((data_dir = _wgetenv( winedatadirW )))
-        suffix = monoW;
+        suffix = monoW + 3;
     else if ((data_dir = _wgetenv( winebuilddirW )))
-        suffix = dotdotW;
+        suffix = monoW;
         return FALSE;

More information about the wine-devel mailing list