mshtml: Move load_gecko() call from DllRegisterServer to DllInstall.

With this patch, Wine will no longer ensure that Wine Gecko is available
during prefix creation and update. We have shared Gecko installations
and good support for installing Gecko on demand now.

To ensure that Gecko is installed, one may use DllInstall with something
like |regsvr32 -i mshtml|.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-02-09 13:51:59 +01:00 committed by Alexandre Julliard
parent 6cf0e7fe85
commit 5b362f07f6

View file

@ -524,9 +524,15 @@ DWORD WINAPI RNIGetCompatibleVersion(void)
/***********************************************************************
* DllInstall (MSHTML.@)
*/
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
HRESULT WINAPI DllInstall(BOOL install, const WCHAR *cmdline)
{
FIXME("stub %d %s: returning S_OK\n", bInstall, debugstr_w(cmdline));
TRACE("(%x %s)\n", install, debugstr_w(cmdline));
if(cmdline && *cmdline)
FIXME("unsupported cmdline: %s\n", debugstr_w(cmdline));
else if(install)
load_gecko();
return S_OK;
}
@ -669,9 +675,6 @@ HRESULT WINAPI DllRegisterServer(void)
hres = __wine_register_resources( hInst );
if(SUCCEEDED(hres))
hres = register_server(TRUE);
if(SUCCEEDED(hres))
load_gecko();
return hres;
}