Author: nextgens
Date: 2008-05-09 08:38:48 +0000 (Fri, 09 May 2008)
New Revision: 19870

Modified:
   trunk/apps/new_installer/res/unix/bin/browse.sh
Log:
new_installer: make the ff detection code work on macos

Modified: trunk/apps/new_installer/res/unix/bin/browse.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/browse.sh     2008-05-09 08:06:36 UTC 
(rev 19869)
+++ trunk/apps/new_installer/res/unix/bin/browse.sh     2008-05-09 08:38:48 UTC 
(rev 19870)
@@ -15,6 +15,19 @@
        "`cat firefox.location`" -no-remote -P freenet "$1" &
 }

+maybeCreateFFProfile()
+{
+       if test -x "$1"
+       then
+               echo "$1" > firefox.location
+               echo Firefox found, creating a profile for freenet
+               "$1" "file://$INSTALL_PATH/dont-close-me.html" &
+               "$1" -no-remote -CreateProfile "freenet $PWD/firefox_profile" 
>/dev/null
+               browseURL "$URL"
+               exit
+       fi
+}
+
 if test -e firefox.location
 then
        "`cat firefox.location`" "file://$INSTALL_PATH/dont-close-me.html" &
@@ -23,17 +36,15 @@
        echo Detecting the location of Firefox
        for name in $POSSIBLE_NAMES
        do
-               TRY="`which $name 2>/dev/null`"
-               if test -x "$TRY"
-               then
-                       echo "$TRY" > firefox.location
-                       echo Firefox found, creating a profile for freenet
-                       "$TRY" "file://$INSTALL_PATH/dont-close-me.html" &
-                       "$TRY" -no-remote -CreateProfile "freenet 
$PWD/firefox_profile" >/dev/null
-                       browseURL "$URL"
-                       exit
-               fi
+               maybeCreateFFProfile "`which $name 2>/dev/null`"
        done
+
+       if test `uname -s` = "Darwin"
+       then
+               maybeCreateFFProfile 
"$HOME/Applications/Firefox.app/Contents/MacOS/firefox"
+               maybeCreateFFProfile 
"/Applications/Firefox.app/Contents/MacOS/firefox"
+       fi
+
        echo The installer was unable to locate Mozilla Firefox on your computer
        java -Djava.net.preferIPv4Stack=true -cp bin/browser.jar 
BareBonesBrowserLaunch "$URL" &
 fi


Reply via email to