Re: mshtml: Set IE version when installing wine gecko

2007-11-02 Thread Detlef Riekenberg
On Fr, 2007-11-02 at 16:24 +0100, Jacek Caban wrote:
>  11,,dxdiagn.dll,1
>  11,,hhctrl.ocx,1
>  11,,hlink.dll,1
> +11,,iexplore.exe,1

This is the wrong directory.

In [FakeDllsSection], we use the correct location:
16422,Internet Explorer,iexplore.exe


-- 
 
By by ... Detlef






Re: mshtml: Set IE version when installing wine gecko

2007-11-02 Thread Alexandre Julliard
Jacek Caban <[EMAIL PROTECTED]> writes:

> Alexandre Julliard wrote:
>>
>> The idea would be that there should be an easy way to uninstall it, so
>> if Gecko is installed the app will try to use that, and if it doesn't
>> work we can tell users to uninstall Gecko and let the app install IE
>> instead.  Ultimately of course the goal is that they never need to do
>> that.
>
> How about the attached patch? It adds registration code to iexplore.exe,
> so user may run
> $ wine iexplore -unregserver
> or even better, just for sure:
> $ WINEDLLOVERRIDES=shdocvw,iexplore.exe=b wine iexplore -unregserver
> to unregister iexplore.

Yes, I think that's a good idea.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: mshtml: Set IE version when installing wine gecko

2007-11-02 Thread Jacek Caban
Alexandre Julliard wrote:
>
> The idea would be that there should be an easy way to uninstall it, so
> if Gecko is installed the app will try to use that, and if it doesn't
> work we can tell users to uninstall Gecko and let the app install IE
> instead.  Ultimately of course the goal is that they never need to do
> that.
>   

How about the attached patch? It adds registration code to iexplore.exe,
so user may run
$ wine iexplore -unregserver
or even better, just for sure:
$ WINEDLLOVERRIDES=shdocvw,iexplore.exe=b wine iexplore -unregserver
to unregister iexplore.
It would be wine specific as native doesn't support self registration in
iexplore.exe.
An other option would be to put a separate section in wine.inf so user
could run rundll32 to unregister it, but IMO it is worse due to
complexity of the command.

Thanks,
Jacek
>From 9076a5c4074f5db5ee2577bce5c6c615478e9e61 Mon Sep 17 00:00:00 2001
From: Jacek Caban <[EMAIL PROTECTED]>
Date: Fri, 2 Nov 2007 16:19:28 +0100
Subject: [PATCH] iexplore: Added self-registration code.
To: wine-patches <[EMAIL PROTECTED]>


---
 dlls/shdocvw/factory.c   |   34 +-
 dlls/shdocvw/iexplore.c  |9 -
 dlls/shdocvw/shdocvw.h   |1 +
 dlls/shdocvw/shdocvw.inf |   12 
 tools/wine.inf   |1 +
 5 files changed, 47 insertions(+), 10 deletions(-)

diff --git a/dlls/shdocvw/factory.c b/dlls/shdocvw/factory.c
index ad4330a..2ed62e6 100644
--- a/dlls/shdocvw/factory.c
+++ b/dlls/shdocvw/factory.c
@@ -172,6 +172,23 @@ HRESULT register_class_object(BOOL do_reg)
 return CoRevokeClassObject(cookie);
 }
 
+static HRESULT reg_install(LPCSTR section, STRTABLEA *strtable)
+{
+typeof(RegInstallA) *pRegInstall;
+HMODULE hadvpack;
+HRESULT hres;
+
+static const WCHAR advpackW[] = 
{'a','d','v','p','a','c','k','.','d','l','l',0};
+
+hadvpack = LoadLibraryW(advpackW);
+pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hadvpack, "RegInstall");
+
+hres = pRegInstall(shdocvw_hinstance, section, strtable);
+
+FreeLibrary(hadvpack);
+return hres;
+}
+
 static const GUID CLSID_MicrosoftBrowserArchitecture =
 {0xa5e46e3a, 0x8849, 0x11d1, {0x9d, 0x8c, 0x00, 0xc0, 0x4f, 0xc9, 0x9d, 
0x61}};
 static const GUID CLSID_MruLongList =
@@ -188,15 +205,11 @@ static const GUID CLSID_MruLongList =
 
 static HRESULT register_server(BOOL doregister)
 {
-HRESULT hres;
-HMODULE hAdvpack;
-typeof(RegInstallA) *pRegInstall;
 STRTABLEA strtable;
 STRENTRYA pse[13];
 static CLSID const *clsids[13];
 int i = 0;
-
-static const WCHAR wszAdvpack[] = 
{'a','d','v','p','a','c','k','.','d','l','l',0};
+HRESULT hres;
 
 INF_SET_CLSID(CUrlHistory);
 INF_SET_CLSID(Internet);
@@ -223,10 +236,7 @@ static HRESULT register_server(BOOL doregister)
 strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
 strtable.pse = pse;
 
-hAdvpack = LoadLibraryW(wszAdvpack);
-pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hAdvpack, "RegInstall");
-
-hres = pRegInstall(shdocvw_hinstance, doregister ? "RegisterDll" : 
"UnregisterDll", &strtable);
+hres = reg_install(doregister ? "RegisterDll" : "UnregisterDll", 
&strtable);
 
 for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
 HeapFree(GetProcessHeap(), 0, pse[i].pszValue);
@@ -274,3 +284,9 @@ HRESULT WINAPI DllUnregisterServer(void)
 
 return UnRegisterTypeLib(&LIBID_SHDocVw, 1, 1, LOCALE_SYSTEM_DEFAULT, 
SYS_WIN32);
 }
+
+DWORD register_iexplore(BOOL doregister)
+{
+HRESULT hres = reg_install(doregister ? "RegisterIE" : "UnregisterIE", 
NULL);
+return !SUCCEEDED(hres);
+}
diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c
index adcaeee..c8fa61d 100644
--- a/dlls/shdocvw/iexplore.c
+++ b/dlls/shdocvw/iexplore.c
@@ -192,7 +192,14 @@ DWORD WINAPI IEWinMain(LPSTR szCommandLine, int 
nShowWindow)
 MSG msg;
 HRESULT hres;
 
-FIXME("%s %d\n", debugstr_a(szCommandLine), nShowWindow);
+TRACE("%s %d\n", debugstr_a(szCommandLine), nShowWindow);
+
+if(*szCommandLine == '-' || *szCommandLine == '/') {
+if(!strcasecmp(szCommandLine+1, "regserver"))
+return register_iexplore(TRUE);
+if(!strcasecmp(szCommandLine+1, "unregserver"))
+return register_iexplore(FALSE);
+}
 
 CoInitialize(NULL);
 
diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index db47b63..0b048eb 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -222,6 +222,7 @@ extern void unregister_iewindow_class(void);
 
 HRESULT register_class_object(BOOL);
 HRESULT get_typeinfo(ITypeInfo**);
+DWORD register_iexplore(BOOL);
 
 /* memory allocation functions */
 
diff --git a/dlls/shdocvw/shdocvw.inf b/dlls/shdocvw/shdocvw.inf
index 0cb6498..91de9ee 100644
--- a/dlls/shdocvw/shdocvw.inf
+++ b/dlls/shdocvw/shdocvw.inf
@@ -10,6 +10,14 @@ AddReg=Classes.Reg
 DelReg=Classes.Reg
 
 
+[RegisterIE]
+AddReg=IE.Reg
+
+
+[UnregisterIE]
+DelReg=IE.Reg
+
+
 [Classes.

Re: mshtml: Set IE version when installing wine gecko

2007-11-02 Thread Jacek Caban
Chris Robinson wrote:
> Even if you fix all the apps that have a problem with Gecko, native IE still 
> has rendering differences. And short of reimplementing it ourselves, some 
> people will have a need for native IE (eg. web developers wanting to see what 
> their site looks like in IE). There may even be some other behavioral 
> differences that the majority of people won't care about or even not prefer, 
> while others do.
>   

Sure, but user may always unregister IE before installing it. IMO it's
better to document such things than depend what user has done with Wine
prefix before trying to install IE. These keys will only make the
installing process more tricky but not impossible.

Jacek




Re: mshtml: Set IE version when installing wine gecko

2007-11-01 Thread Alexandre Julliard
Jacek Caban <[EMAIL PROTECTED]> writes:

> But currently, if you use the new installing way (from hard drive),
> Gecko installs during wineprefixcreate if user has it set up correctly.
> It means that some users will have always set IE version, others won't.
> It's definitely not what we want. We may consider reverting installing
> Gecko from DllRegisterServer to make it at least the same for all.

The idea would be that there should be an easy way to uninstall it, so
if Gecko is installed the app will try to use that, and if it doesn't
work we can tell users to uninstall Gecko and let the app install IE
instead.  Ultimately of course the goal is that they never need to do
that.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: mshtml: Set IE version when installing wine gecko

2007-11-01 Thread Chris Robinson
On Thursday 01 November 2007 12:40:25 pm Jacek Caban wrote:
> The real solution is to always set IE version. To do it we have to fix
> apps that block it. The problem, apart from that I didn't have time to
> make bug hunting on them yet, is that we don't really have a list of
> such apps. Quicken is the main example, but who knows what are the
> others? It would be great if we had it somewhere in bugzilla or wiki.

Even if you fix all the apps that have a problem with Gecko, native IE still 
has rendering differences. And short of reimplementing it ourselves, some 
people will have a need for native IE (eg. web developers wanting to see what 
their site looks like in IE). There may even be some other behavioral 
differences that the majority of people won't care about or even not prefer, 
while others do.




Re: mshtml: Set IE version when installing wine gecko

2007-11-01 Thread Jacek Caban
Chris Robinson wrote:
> Actually, Alexendre agreed to the patch *because* it sets the version when 
> Gecko is installed. This allows people to still install native IE if they 
> wish, and allows apps that need native IE to be able to have it, by 
> installing IE before Gecko. Alexendre wasn't willing to have the version 
> always set because some apps may need native IE, and because some people may 
> want native IE.
>
> However, setting the version when installing Gecko allows apps that need to 
> detect IE by its version, to be able to do so.
>   

But currently, if you use the new installing way (from hard drive),
Gecko installs during wineprefixcreate if user has it set up correctly.
It means that some users will have always set IE version, others won't.
It's definitely not what we want. We may consider reverting installing
Gecko from DllRegisterServer to make it at least the same for all.

The real solution is to always set IE version. To do it we have to fix
apps that block it. The problem, apart from that I didn't have time to
make bug hunting on them yet, is that we don't really have a list of
such apps. Quicken is the main example, but who knows what are the
others? It would be great if we had it somewhere in bugzilla or wiki.

Jacek




Re: mshtml: Set IE version when installing wine gecko

2007-11-01 Thread Chris Robinson
On Thursday 01 November 2007 10:47:36 am Jacek Caban wrote:
> Hi Chris,
>
> This patch is already committed, but, I'm afraid, it's wrong. Setting
> these registries has nothing to do with installing Gecko. Setting them
> in Gecko installer will only make supporting it harder. We don't want to
> tell user to "run iexplore about:blank" to get an app working.

Actually, Alexendre agreed to the patch *because* it sets the version when 
Gecko is installed. This allows people to still install native IE if they 
wish, and allows apps that need native IE to be able to have it, by 
installing IE before Gecko. Alexendre wasn't willing to have the version 
always set because some apps may need native IE, and because some people may 
want native IE.

However, setting the version when installing Gecko allows apps that need to 
detect IE by its version, to be able to do so.




Re: mshtml: Set IE version when installing wine gecko

2007-11-01 Thread Jacek Caban
Hi Chris,

This patch is already committed, but, I'm afraid, it's wrong. Setting
these registries has nothing to do with installing Gecko. Setting them
in Gecko installer will only make supporting it harder. We don't want to
tell user to "run iexplore about:blank" to get an app working.

I will send a better patch that always sets them. Last time Alexandre
didn't accept such a patch, because of apps that need native IE and
install it only when this key is not found. It looks like it's time for
such change.


Thanks,
Jacek