mshtml: Try installing Gecko from local file in DllRegisterServer.
This commit is contained in:
parent
2cb3c5de90
commit
71894ead1f
|
@ -498,7 +498,7 @@ static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL install_wine_gecko(void)
|
BOOL install_wine_gecko(BOOL silent)
|
||||||
{
|
{
|
||||||
HANDLE hsem;
|
HANDLE hsem;
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ BOOL install_wine_gecko(void)
|
||||||
*/
|
*/
|
||||||
if(!install_from_registered_dir()
|
if(!install_from_registered_dir()
|
||||||
&& !install_from_default_dir()
|
&& !install_from_default_dir()
|
||||||
&& (url = get_url()))
|
&& !silent && (url = get_url()))
|
||||||
DialogBoxW(hInst, MAKEINTRESOURCEW(ID_DWL_DIALOG), 0, installer_proc);
|
DialogBoxW(hInst, MAKEINTRESOURCEW(ID_DWL_DIALOG), 0, installer_proc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -454,6 +454,9 @@ static HRESULT register_server(BOOL do_register)
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
ERR("typelib registration failed: %08x\n", hres);
|
ERR("typelib registration failed: %08x\n", hres);
|
||||||
|
|
||||||
|
if(do_register && SUCCEEDED(hres))
|
||||||
|
load_gecko(TRUE);
|
||||||
|
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -382,9 +382,11 @@ HRESULT get_client_disp_property(IOleClientSite*,DISPID,VARIANT*);
|
||||||
|
|
||||||
HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
|
HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
|
||||||
|
|
||||||
|
BOOL load_gecko(BOOL);
|
||||||
void close_gecko(void);
|
void close_gecko(void);
|
||||||
void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
|
void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
|
||||||
void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
|
void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
|
||||||
|
BOOL install_wine_gecko(BOOL);
|
||||||
|
|
||||||
void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWORD);
|
void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWORD);
|
||||||
|
|
||||||
|
@ -448,8 +450,6 @@ void release_nodes(HTMLDocument*);
|
||||||
|
|
||||||
IHTMLElementCollection *create_all_collection(HTMLDOMNode*);
|
IHTMLElementCollection *create_all_collection(HTMLDOMNode*);
|
||||||
|
|
||||||
BOOL install_wine_gecko(void);
|
|
||||||
|
|
||||||
/* commands */
|
/* commands */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD id;
|
DWORD id;
|
||||||
|
|
|
@ -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 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];
|
PRUnichar gre_path[MAX_PATH];
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
|
@ -380,7 +380,7 @@ static BOOL load_gecko(void)
|
||||||
loading_thread = GetCurrentThreadId();
|
loading_thread = GetCurrentThreadId();
|
||||||
|
|
||||||
if(load_wine_gecko(gre_path)
|
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);
|
ret = init_xpcom(gre_path);
|
||||||
else
|
else
|
||||||
MESSAGE("Could not load Mozilla. HTML rendering will be disabled.\n");
|
MESSAGE("Could not load Mozilla. HTML rendering will be disabled.\n");
|
||||||
|
@ -1495,7 +1495,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
|
||||||
NSContainer *ret;
|
NSContainer *ret;
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
if(!load_gecko())
|
if(!load_gecko(FALSE))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ret = mshtml_alloc(sizeof(NSContainer));
|
ret = mshtml_alloc(sizeof(NSContainer));
|
||||||
|
|
Loading…
Reference in New Issue