Alright, here is a patch and script file.  One interesting thing, I can run 
konqueror fine but mozilla appears to have some issue starting up.  I get 
these odd error messages on the console with mozilla:

Failed to create E:\/gconfd-cmorgan: No such file or directory
Failed to create E:\/gconfd-cmorgan: No such file or directory

Is this due to wine setting the TEMP environment variable?  I've tried 
overriding that in the winebrowser script but it doesn't seem to make any 
difference.  Ideas on how to fix this?

One other issue, what to do when the user doesn't have a web browser 
installed?   I can't imagine this is a likely case but in any event since the 
script will exist there won't be any kind of error returned by ShellExecute() 
when it is called on a url.  Not something to worry about?


* tools/winebrowser, tools/wineinstall, tools/Makefile.in, winedefault.reg
Chris Morgan <[EMAIL PROTECTED]>
Add  HKEY_LOCAL_MACHINE\software\classes\http\shell\open\command key and 
value.  Winebrowser script.  Makefile changes to install/remove script.  
Wineinstall should create a simlink from windows/winebrowser.exe to the 
location of winebrowser on the machine.


Chris




On Saturday 27 December 2003 09:50 pm, Chris Morgan wrote:
> In trying to install the United Devices application the installer prompts
> me to go to a website to get the msi installer.  Wine doesn't have a
> HKEY_LOCAL_MACHINE\software\classes\http\shell\open\command key in the
> registery.  I was thinking about making a shell script something along the
> lines of:
>
> if browserX exists
>   browserX $1
> else if browserY exists
>   browserY $1
> ...
>
>
> I would imagine most people have mozilla installed on their machines and we
> can check for konqueror, opera and other browsers.  I've created a simple
> 'winebrowser' script, placed it in /usr/local/bin manually thus far, set
> the value for the above key to 'winebrowser %1' and symlinked /wine/system/
> winebrowser.exe to /usr/local/bin/winebrowser.
>
> Sound reasonable?  Comments? ;-)
>
> Chris
--- /dev/null	2003-12-09 22:40:48.000000000 -0500
+++ tools/winebrowser	2003-12-28 12:45:06.000000000 -0500
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Script to provide a default browser for ShellExecuting a URL
+# Chris Morgan <[EMAIL PROTECTED]>
+# 2003/12/28
+
+if [  -n "`which mozilla`" ]
+then
+  mozilla $*
+  exit 0
+elif [ -n "`which konqueror`" ]
+then
+  konqueror $*
+  exit 0
+elif [ -n "`which mozilla-firebird`" ]
+then
+  mozilla-firebird $*
+  exit 0
+elif [ -n "`which opera`" ]
+then
+  opera $*
+  exit 0
+fi
+
+exit 1
+
+
Index: tools/wineinstall
===================================================================
RCS file: /home/wine/wine/tools/wineinstall,v
retrieving revision 1.62
diff -u -r1.62 wineinstall
--- tools/wineinstall	26 Nov 2003 03:55:01 -0000	1.62
+++ tools/wineinstall	28 Dec 2003 22:25:32 -0000
@@ -145,6 +145,7 @@
   link_app uninstaller  "$CROOT/windows/uninstall.exe"
   link_app winhelp      "$CROOT/windows/winhelp.exe"
   link_app winhelp      "$CROOT/windows/winhlp32.exe"
+  ln -f -s `which winebrowser` "$CROOT/windows/winebrowser.exe"
 }
 
 # startup...
Index: tools/Makefile.in
===================================================================
RCS file: /home/wine/wine/tools/Makefile.in,v
retrieving revision 1.37
diff -u -r1.37 Makefile.in
--- tools/Makefile.in	20 Nov 2003 22:02:15 -0000	1.37
+++ tools/Makefile.in	28 Dec 2003 22:25:32 -0000
@@ -43,9 +43,10 @@
 install::
 	$(MKINSTALLDIRS) $(bindir) $(mandir)/man$(prog_manext)
 	$(INSTALL_SCRIPT) $(SRCDIR)/winemaker $(bindir)/winemaker
+	$(INSTALL_SCRIPT) $(SRCDIR)/winebrowser $(bindir)/winebrowser
 	$(INSTALL_DATA) $(SRCDIR)/winemaker.man $(mandir)/man$(prog_manext)/winemaker.$(prog_manext)
 
 uninstall::
-	$(RM) $(bindir)/winemaker $(mandir)/man$(prog_manext)/winemaker.$(prog_manext)
+	$(RM) $(bindir)/winemaker $(bindir)/winebrowser $(mandir)/man$(prog_manext)/winemaker.$(prog_manext)
 
 ### Dependencies:
Index: winedefault.reg
===================================================================
RCS file: /home/wine/wine/winedefault.reg,v
retrieving revision 1.83
diff -u -r1.83 winedefault.reg
--- winedefault.reg	8 Dec 2003 22:19:12 -0000	1.83
+++ winedefault.reg	28 Dec 2003 22:25:43 -0000
@@ -4620,3 +4620,7 @@
 [HKEY_CLASSES_ROOT\CLSID\{E436EBB3-524F-11CE-9F53-0020AF0BA770}\InprocServer32]
 @="quartz.dll"
 "ThreadingModel"="Both"
+
+# Map requests to open "http" entries to winebroswer
+[HKEY_LOCAL_MACHINE\software\classes\http\shell\open\command]
[EMAIL PROTECTED]"winebrowser %1"

Reply via email to