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@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:
https://www.winehq.org/pipermail/wine-devel/2020-January/158129.html
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; else return FALSE;
I think it would be best to make this sort of change next time we update the package.
On Sun, 22 Mar 2020, Esme (they/them) wrote:
I think it would be best to make this sort of change next time we update the package.
But the more we wait the more likely it is people will depend on the current setup (e.g. wt-daily, then the TestBot).
I'm not sure, it feels like we'd be saving ourselves effort at the cost of packagers having to add a symlink for the current wine-mono release, specifically, in a -1 update or something.
Also, I don't really like this: + suffix = monoW + 3; It doesn't seem worth the 12 bytes it saves in the binary.
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@codeweavers.com ---
Also, I don't really like this:
suffix = monoW + 3;
It doesn't seem worth the 12 bytes it saves in the binary.
At least that's a simple tweak.
dlls/mscoree/metahost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 3786f3afc5c..df01f9b77ff 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -785,7 +785,7 @@ static BOOL get_mono_path_datadir(LPWSTR path) 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 dotdotmonoW[] = {'\','.','.','\','m','o','n','o',0}; const WCHAR *data_dir, *suffix; WCHAR *package_dir; BOOL ret; @@ -793,7 +793,7 @@ static BOOL get_mono_path_datadir(LPWSTR path) if ((data_dir = _wgetenv( winedatadirW ))) suffix = monoW; else if ((data_dir = _wgetenv( winebuilddirW ))) - suffix = dotdotW; + suffix = dotdotmonoW; else return FALSE;
Signed-off-by: Vincent Povirk vincent@codeweavers.com
I misunderstood what this did before. I can see that packaging isn't a concern for this case.