mshtml: Try installing Gecko from local file in DllRegisterServer.

This commit is contained in:
Jacek Caban 2007-10-14 01:49:19 +02:00 committed by Alexandre Julliard
parent 2cb3c5de90
commit 71894ead1f
4 changed files with 10 additions and 7 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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));