Author: nextgens
Date: 2008-03-14 03:14:33 +0000 (Fri, 14 Mar 2008)
New Revision: 18526
Added:
trunk/apps/new_installer/res/firefox_profile/
trunk/apps/new_installer/res/firefox_profile/user.js
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/TODO
trunk/apps/new_installer/install.xml
trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
Log:
new_installer: implement a new pack configuring a special firefox profile for
freenet
Creating the pack/profile is the first step... Now we need to convince the user
to actually use it.
Modified: trunk/apps/new_installer/ProcessPanel.Spec.xml
===================================================================
--- trunk/apps/new_installer/ProcessPanel.Spec.xml 2008-03-13 23:55:58 UTC
(rev 18525)
+++ trunk/apps/new_installer/ProcessPanel.Spec.xml 2008-03-14 03:14:33 UTC
(rev 18526)
@@ -13,6 +13,19 @@
<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/TODO
===================================================================
--- trunk/apps/new_installer/TODO 2008-03-13 23:55:58 UTC (rev 18525)
+++ trunk/apps/new_installer/TODO 2008-03-14 03:14:33 UTC (rev 18526)
@@ -1,4 +1,8 @@
TODO:
+ * Create shortcuts so that the user actually uses the firefox-freenet
profile
+ * Create a new user on *nix to run the node as it
+ * Double-check that the jvm is actually usable *before* starting the
installer (in the launcher)
+ * Fix the macosx startup script
* New packs:
-Freemail
-Plugins
Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml 2008-03-13 23:55:58 UTC (rev
18525)
+++ trunk/apps/new_installer/install.xml 2008-03-14 03:14:33 UTC (rev
18526)
@@ -147,6 +147,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\bin\install_freenet-ext.cmd"/>
<parsable
targetfile="$INSTALL_PATH\bin\install_freenet-stable-latest.cmd"/>
<parsable
targetfile="$INSTALL_PATH\bin\install_frost.cmd"/>
@@ -181,6 +182,7 @@
<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"/>
@@ -219,6 +221,7 @@
<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"/>
@@ -270,6 +273,16 @@
<description>A plugin allowing you to search the
freenet.</description>
<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>
Added: trunk/apps/new_installer/res/firefox_profile/user.js
===================================================================
--- trunk/apps/new_installer/res/firefox_profile/user.js
(rev 0)
+++ trunk/apps/new_installer/res/firefox_profile/user.js 2008-03-14
03:14:33 UTC (rev 18526)
@@ -0,0 +1,25 @@
+user_pref("browser.startup.homepage", "http://127.0.0.1:8888");
+user_pref("javascript.enabled", false);
+user_pref("security.enable_java", false);
+// See 1124: Possible hint on how to not get USK's googled when miss-pasted
+user_pref("keyword.enabled", false);
+user_pref("browser.search.suggest.enabled", false);
+// Obvious performance tweaks
+user_pref("network.http.max-connections", 200);
+user_pref("network.http.max-connections-per-server", 200);
+user_pref("network.http.max-persistent-connections-per-server", 100);
+user_pref("network.http.max-persistent-connections-per-proxy", 100);
+// Pipelining
+user_pref("network.http.pipelining", true);
+user_pref("network.http.proxy.pipelining", true);
+user_pref("network.http.pipelining.maxrequests", 50);
+// Cookies
+user_pref("network.cookie.blockFutureCookies", true);
+user_pref("network.cookie.cookieBehavior", 1);
+user_pref("network.cookie.lifetimePolicy", 2);
+user_pref("network.cookie.alwaysAcceptSessionCookies", false);
+user_pref("network.cookie.enableForCurrentSessionOnly", false);
+// Disable safebrowsing
+user_pref("browser.safebrowsing.enabled", false);
+// See 1941: Firefox GoBrowsing
+user_pref("browser.safebrowsing.remoteLookups", false);
Modified: trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
2008-03-13 23:55:58 UTC (rev 18525)
+++ trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
2008-03-14 03:14:33 UTC (rev 18526)
@@ -19,6 +19,11 @@
fi
cat welcome.html | sed "s/8888/$FPROXY_PORT/g" >welcome2.html
mv welcome2.html welcome.html
+ if test -e firefox_profile/user.js
+ then
+ cat firefox_profile/user.js | sed "s/8888/$FPROXY_PORT/g"
>user.js.tmp
+ mv user.js.tmp firefox_profile/user.js
+ fi
fi
echo "fproxy.enabled=true" >> freenet.ini
echo "fproxy.port=$FPROXY_PORT" >> freenet.ini
Added: trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh
(rev 0)
+++ trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh 2008-03-14
03:14:33 UTC (rev 18526)
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+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
Property changes on: trunk/apps/new_installer/res/unix/bin/install_ff_profile.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/apps/new_installer/res/windows/bin/install_ff_profile.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_ff_profile.cmd
(rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_ff_profile.cmd
2008-03-14 03:14:33 UTC (rev 18526)
@@ -0,0 +1,25 @@
+ 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