Module: wine Branch: master Commit: 71894ead1fb0eaef0edf15097f6503cbe6218dd3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=71894ead1fb0eaef0edf15097f...
Author: Jacek Caban jacek@codeweavers.com Date: Sun Oct 14 01:49:19 2007 +0200
mshtml: Try installing Gecko from local file in DllRegisterServer.
---
dlls/mshtml/install.c | 4 ++-- dlls/mshtml/main.c | 3 +++ dlls/mshtml/mshtml_private.h | 4 ++-- dlls/mshtml/nsembed.c | 6 +++--- 4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index db3f7f6..364884f 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -498,7 +498,7 @@ static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA return FALSE; }
-BOOL install_wine_gecko(void) +BOOL install_wine_gecko(BOOL silent) { HANDLE hsem;
@@ -516,7 +516,7 @@ BOOL install_wine_gecko(void) */ if(!install_from_registered_dir() && !install_from_default_dir() - && (url = get_url())) + && !silent && (url = get_url())) DialogBoxW(hInst, MAKEINTRESOURCEW(ID_DWL_DIALOG), 0, installer_proc); }
diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index e0645f8..898ff14 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -454,6 +454,9 @@ static HRESULT register_server(BOOL do_register) if(FAILED(hres)) ERR("typelib registration failed: %08x\n", hres);
+ if(do_register && SUCCEEDED(hres)) + load_gecko(TRUE); + return hres; }
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 8ae5f1d..4c63f60 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -382,9 +382,11 @@ HRESULT get_client_disp_property(IOleClientSite*,DISPID,VARIANT*);
HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
+BOOL load_gecko(BOOL); void close_gecko(void); void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*); void init_nsio(nsIComponentManager*,nsIComponentRegistrar*); +BOOL install_wine_gecko(BOOL);
void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWORD);
@@ -448,8 +450,6 @@ void release_nodes(HTMLDocument*);
IHTMLElementCollection *create_all_collection(HTMLDOMNode*);
-BOOL install_wine_gecko(void); - /* commands */ typedef struct { DWORD id; diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index a2a1d47..8cead97 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -361,7 +361,7 @@ static CRITICAL_SECTION_DEBUG cs_load_gecko_dbg = }; static CRITICAL_SECTION cs_load_gecko = { &cs_load_gecko_dbg, -1, 0, 0, 0, 0 };
-static BOOL load_gecko(void) +BOOL load_gecko(BOOL silent) { PRUnichar gre_path[MAX_PATH]; BOOL ret = FALSE; @@ -380,7 +380,7 @@ static BOOL load_gecko(void) loading_thread = GetCurrentThreadId();
if(load_wine_gecko(gre_path) - || (install_wine_gecko() && load_wine_gecko(gre_path))) + || (install_wine_gecko(silent) && load_wine_gecko(gre_path))) ret = init_xpcom(gre_path); else MESSAGE("Could not load Mozilla. HTML rendering will be disabled.\n"); @@ -1495,7 +1495,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent) NSContainer *ret; nsresult nsres;
- if(!load_gecko()) + if(!load_gecko(FALSE)) return NULL;
ret = mshtml_alloc(sizeof(NSContainer));