Author: nextgens
Date: 2008-03-15 02:57:29 +0000 (Sat, 15 Mar 2008)
New Revision: 18539

Removed:
   trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh
   trunk/apps/new_installer/res/windows/bin/install_ff_profile.cmd
Modified:
   trunk/apps/new_installer/ProcessPanel.Spec.xml
   trunk/apps/new_installer/install.xml
   trunk/apps/new_installer/res/unix/bin/browse.sh
   trunk/apps/new_installer/res/windows/browse.cmd
Log:
new_installer: assume the user doesn't know what he wants... remove the 
FirefoxProfile pack (see 
http://archives.freenetproject.org/message/20080314.183550.358ca54e.en.html)

Modified: trunk/apps/new_installer/ProcessPanel.Spec.xml
===================================================================
--- trunk/apps/new_installer/ProcessPanel.Spec.xml      2008-03-15 02:31:56 UTC 
(rev 18538)
+++ trunk/apps/new_installer/ProcessPanel.Spec.xml      2008-03-15 02:57:29 UTC 
(rev 18539)
@@ -13,19 +13,6 @@
                <executefile name="$INSTALL_PATH\bin\setup.cmd"/>
        </job>

-       <job name="Setting up the Firefox Profile">
-               <os family="unix"/>
-               <executefile name="$INSTALL_PATH/bin/install_ff_profile.sh"/>
-       </job>
-       <job name="Setting up the Firefox Profile">
-               <os family="mac"/>
-               <executefile name="$INSTALL_PATH/bin/install_ff_profile.sh"/>
-       </job>
-       <job name="Setting up the Firefox Profile">
-               <os family="windows"/>
-               <executefile name="$INSTALL_PATH\bin\install_ff_profile.cmd"/>
-       </job>
-
        <job name="Setting the Updater up">
                <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_updater.sh"/>

Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml        2008-03-15 02:31:56 UTC (rev 
18538)
+++ trunk/apps/new_installer/install.xml        2008-03-15 02:57:29 UTC (rev 
18539)
@@ -116,6 +116,7 @@
                                <exclude name="*/**/.svn"/>
                                <exclude name="*/**/.svn/**"/>
                                <include name="bin/**/*"/>
+                               <include name="firefox_profile/**/*"/>
                                <include name="wrapper.conf"/>
                                <include name="welcome.html"/>
                                <include name="welcome.*.html"/>
@@ -147,7 +148,7 @@

                        <executable 
targetfile="$INSTALL_PATH\bin\remove_service.bat" keep="true" 
stage="uninstall"/>
                        <parsable targetfile="$INSTALL_PATH\bin\cleanup.cmd"/>
-                       <parsable 
targetfile="$INSTALL_PATH\bin\install_ff_profile.cmd"/>
+                       <parsable targetfile="$INSTALL_PATH\browse.cmd"/>
                        <parsable 
targetfile="$INSTALL_PATH\bin\install_freenet-ext.cmd"/>
                        <parsable 
targetfile="$INSTALL_PATH\bin\install_freenet-stable-latest.cmd"/>
                        <parsable 
targetfile="$INSTALL_PATH\bin\install_frost.cmd"/>
@@ -179,10 +180,10 @@

                        <executable targetfile="$INSTALL_PATH/run.sh" 
type="bin" stage="never" keep="true"/>
                        <executable targetfile="$INSTALL_PATH/bin/setup.sh" 
type="bin" stage="never"/>
+                       <parsable targetfile="$INSTALL_PATH/bin/browse.sh"/> 
                        <parsable targetfile="$INSTALL_PATH/bin/setup.sh"/> 
                        <parsable targetfile="$INSTALL_PATH/bin/1run.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/detect_port_availability.sh"/>
-                       <parsable 
targetfile="$INSTALL_PATH/bin/install_ff_profile.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/install_frost.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/install_jSite.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/install_librarian.sh"/>
@@ -218,10 +219,10 @@

                        <executable targetfile="$INSTALL_PATH/run.sh" 
type="bin" stage="never" keep="true"/>
                        <executable targetfile="$INSTALL_PATH/bin/setup.sh" 
type="bin" stage="never"/>
+                       <parsable targetfile="$INSTALL_PATH/bin/browse.sh"/> 
                        <parsable targetfile="$INSTALL_PATH/bin/setup.sh"/> 
                        <parsable targetfile="$INSTALL_PATH/bin/1run.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/detect_port_availability.sh"/>
-                       <parsable 
targetfile="$INSTALL_PATH/bin/install_ff_profile.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/install_frost.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/install_jSite.sh"/>
                        <parsable 
targetfile="$INSTALL_PATH/bin/install_librarian.sh"/>
@@ -274,16 +275,6 @@
                        <singlefile src="res/license/LICENSE.Freenet" 
target="$INSTALL_PATH/xmllibrarian"/>
                </pack>

-               <pack name="FirefoxProfile" id="firefox-profile" required="no">
-                       <description>Configure a new profile in Mozilla Firefox 
with performance tweaks for freenet (RECOMMENDED).</description>
-                       <singlefile src="res/license/LICENSE.Freenet" 
target="$INSTALL_PATH/ff.install"/>
-                       <fileset dir="res/" targetdir="$INSTALL_PATH">
-                               <exclude name="*/**/.svn"/>
-                               <exclude name="*/**/.svn/**"/>
-                               <include name="firefox_profile/**/*"/>
-                       </fileset>
-               </pack>
-               
                <pack name="jSite" id="jsite" required="no">
                        <description>A tool to upload websites to 
freenet</description>
                        <singlefile src="res/license/LICENSE.Freenet" 
target="$INSTALL_PATH/jsite.install"/>

Modified: trunk/apps/new_installer/res/unix/bin/browse.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/browse.sh     2008-03-15 02:31:56 UTC 
(rev 18538)
+++ trunk/apps/new_installer/res/unix/bin/browse.sh     2008-03-15 02:57:29 UTC 
(rev 18539)
@@ -1,7 +1,7 @@
 #!/bin/sh

-INSTALL_PATH="${INSTALL_PATH:-$PWD}"
 cd "$INSTALL_PATH"
+POSSIBLE_NAMES="firefox mozilla mozilla-firefox iceweasel"

 if test $# -lt 1
 then
@@ -10,9 +10,28 @@
        URL="$1"
 fi

+browseURL()
+{
+       `cat firefox.location` -no-remote -p freenet "$1" &
+}
+
 if test -e firefox.location
 then
-       `cat firefox.location` -no-remote -p freenet "$URL" &
+       browseURL "$URL"
 else
+       echo Detecting the location of Firefox
+       for name in $POSSIBLE_NAMES
+       do
+               TRY="`which $name`"
+               if test -n "$TRY"
+               then
+                       echo $TRY > firefox.location
+                       echo Firefox found, creating a profile for freenet
+                       $TRY -no-remote -CreateProfile "freenet 
$PWD/firefox_profile" >/dev/null
+                       browseURL "$URL"
+                       exit
+               fi
+       done
+       echo The installer was unable to locate Mozilla Firefox on your computer
        java -Djava.net.preferIPv4Stack=true -cp bin/browser.jar 
BareBonesBrowserLaunch "$URL" &
 fi

Deleted: trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh 2008-03-15 
02:31:56 UTC (rev 18538)
+++ trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh 2008-03-15 
02:57:29 UTC (rev 18539)
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-cd "$INSTALL_PATH"
-. _install_toSource.sh
-POSSIBLE_NAMES="firefox mozilla mozilla-firefox iceweasel"
-
-if test -e ff.install
-then
-       rm -f ff.install
-       echo Detecting the location of Firefox
-       for name in $POSSIBLE_NAMES
-       do
-               TRY="`which $name`"
-               if test -n "$TRY"
-               then
-                       echo $TRY > firefox.location
-                       echo Firefox found, creating a profile for freenet
-                       $TRY -no-remote -CreateProfile "freenet 
$PWD/firefox_profile" >/dev/null
-                       exit
-               fi
-       done
-       echo The installer was unable to locate Mozilla Firefox on your computer
-fi

Deleted: trunk/apps/new_installer/res/windows/bin/install_ff_profile.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_ff_profile.cmd     
2008-03-15 02:31:56 UTC (rev 18538)
+++ trunk/apps/new_installer/res/windows/bin/install_ff_profile.cmd     
2008-03-15 02:57:29 UTC (rev 18539)
@@ -1,25 +0,0 @@
- at set PATH=%SYSTEMROOT%\System32\;%PATH%
- at set INSTALL_PATH=$INSTALL_PATH
- at set JAVA_HOME=$JAVA_HOME
- at cd /D %INSTALL_PATH%
-
- at if not exist ff.install goto noff
- at del /F ff.install > NUL
- at echo Detecting the location of Firefox
- at regedit /E firefox.reg 
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App 
Paths\firefox.exe"
-:: No I didn't find any better regexp I could do without cote-escaping.
-:: bin\cat.exe firefox.reg | find "@=" | bin\sed.exe "s/""/|/g" | bin\sed.exe 
"s/.*|\(.*\)|/\1/" | bin\sed.exe "s/\\\\/\\/g" > firefox.location
- at bin\cat.exe firefox.reg | find "@=" | bin\sed.exe s/@="\(.*\)"/\1/ | 
bin\sed.exe "s/\\\\/\\/g" > firefox.location
- at set /P FIREFOX=<firefox.location
- at if not defined FIREFOX goto noff
-
-:: creation of the profile
- at echo Creating a Firefox profile for freenet
-@%FIREFOX% -no-remote -CreateProfile "freenet %INSTALL_PATH%\firefox_profile" 
> NUL
-
- at goto end
-:noff
- at echo The installer was unable to locate Mozilla Firefox on your computer
- at del /f firefox.location
-:end
- at del /f firefox.reg

Modified: trunk/apps/new_installer/res/windows/browse.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/browse.cmd     2008-03-15 02:31:56 UTC 
(rev 18538)
+++ trunk/apps/new_installer/res/windows/browse.cmd     2008-03-15 02:57:29 UTC 
(rev 18539)
@@ -1,3 +1,8 @@
+ at set PATH=%SYSTEMROOT%\System32\;%PATH%
+ at set INSTALL_PATH=$INSTALL_PATH
+ at set JAVA_HOME=$JAVA_HOME
+ at cd /D %INSTALL_PATH%
+
 @set COUNT=0
 @for %%x in (%*) do ( @set /A COUNT=!COUNT!+1 )
 @if %COUNT% LSS 1 @set URL=http://127.0.0.1:8888/ else @set URL=%1
@@ -2,7 +7,29 @@

+:: Check the simple case first (FF exists and has been detected)
 @set /P FIREFOX=<firefox.location
+ at if not defined FIREFOX goto detectff
+@%FIREFOX% -no-remote -p freenet "%URL%"
+ at exit
+
+:detectff
+ at echo Detecting the location of Firefox
+ at regedit /E firefox.reg 
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App 
Paths\firefox.exe"
+:: No I didn't find any better regexp I could do without cote-escaping.
+:: bin\cat.exe firefox.reg | find "@=" | bin\sed.exe "s/""/|/g" | bin\sed.exe 
"s/.*|\(.*\)|/\1/" | bin\sed.exe "s/\\\\/\\/g" > firefox.location
+ at bin\cat.exe firefox.reg | find "@=" | bin\sed.exe s/@="\(.*\)"/\1/ | 
bin\sed.exe "s/\\\\/\\/g" > firefox.location
+ at set /P FIREFOX=<firefox.location
 @if not defined FIREFOX goto noff
+
+:: creation of the profile
+ at echo Creating a Firefox profile for freenet
+@%FIREFOX% -no-remote -CreateProfile "freenet %INSTALL_PATH%\firefox_profile" 
> NUL
 @%FIREFOX% -no-remote -p freenet "%URL%"
- at exit
+ at goto end
+
+:: Firefox hasn't been detected at all
 :noff
+ at echo The installer was unable to locate Mozilla Firefox on your computer
+ at del /f firefox.location
 @start "%URL%"
+:end
+ at del /f firefox.reg


Reply via email to