Jacek Caban : mshtml: Added config key to specify Gecko path.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 7 06:38:16 CST 2005
Module: wine
Branch: refs/heads/master
Commit: b586f6face74f39921b9618a0431e5d6fb30514a
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b586f6face74f39921b9618a0431e5d6fb30514a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Dec 7 13:07:42 2005 +0100
mshtml: Added config key to specify Gecko path.
---
dlls/mshtml/nsembed.c | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index 079e18f..6380c48 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -186,6 +186,29 @@ static BOOL get_mozctl_path(PRUnichar *g
return TRUE;
}
+static BOOL get_wine_gecko_path(PRUnichar *gre_path)
+{
+ HKEY hkey;
+ DWORD res, type, size = MAX_PATH;
+
+ static const WCHAR wszMshtmlKey[] = {
+ 'S','o','f','t','w','a','r','e','\\','W','i','n','e',
+ '\\','M','S','H','T','M','L',0};
+ static const WCHAR wszGeckoPath[] =
+ {'G','e','c','k','o','P','a','t','h',0};
+
+ /* @@ Wine registry key: HKCU\Software\Wine\MSHTML */
+ res = RegOpenKeyW(HKEY_CURRENT_USER, wszMshtmlKey, &hkey);
+ if(res != ERROR_SUCCESS)
+ return FALSE;
+
+ res = RegQueryValueExW(hkey, wszGeckoPath, NULL, &type, (LPBYTE)gre_path, &size);
+ if(res != ERROR_SUCCESS || type != REG_SZ)
+ return FALSE;
+
+ return TRUE;
+}
+
static BOOL load_gecko()
{
nsresult nsres;
@@ -206,7 +229,8 @@ static BOOL load_gecko()
return pCompMgr != NULL;
tried_load = TRUE;
- if(!get_mozctl_path(gre_path) && !get_mozilla_path(gre_path)) {
+ if(!get_wine_gecko_path(gre_path) && !get_mozctl_path(gre_path)
+ && !get_mozilla_path(gre_path)) {
MESSAGE("Could not load Mozilla. HTML rendering will be disabled.\n");
return FALSE;
}
More information about the wine-cvs
mailing list