Author: nextgens
Date: 2008-04-01 07:23:39 +0000 (Tue, 01 Apr 2008)
New Revision: 18887

Modified:
   trunk/apps/new_installer/install.xml
   trunk/apps/new_installer/res/unix/bin/1run.sh
   trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
   trunk/apps/new_installer/res/unix/bin/setup.sh
   trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd
Log:
new_installer: use the translations of the don't-close-me html page

Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml        2008-04-01 06:50:37 UTC (rev 
18886)
+++ trunk/apps/new_installer/install.xml        2008-04-01 07:23:39 UTC (rev 
18887)
@@ -121,6 +121,7 @@
                                <include name="welcome.html"/>
                                <include name="welcome.*.html"/>
                                <include name="dont-close-me.html"/>
+                               <include name="dont-close-me*.html"/>
                        </fileset>
                </pack>


Modified: trunk/apps/new_installer/res/unix/bin/1run.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/1run.sh       2008-04-01 06:50:37 UTC 
(rev 18886)
+++ trunk/apps/new_installer/res/unix/bin/1run.sh       2008-04-01 07:23:39 UTC 
(rev 18887)
@@ -10,11 +10,4 @@
 ./run.sh start

 echo "Starting up a browser"
-if test -e welcome.$ISO3_LANG.html
-then
-       HTMLFILE="file://$INSTALL_PATH/welcome.$ISO3_LANG.html"
-else
-       HTMLFILE="file://$INSTALL_PATH/welcome.html"
-fi
-
-./bin/browse.sh "$HTMLFILE"
+./bin/browse.sh "file://$INSTALL_PATH/welcome.html"

Modified: trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh   
2008-04-01 06:50:37 UTC (rev 18886)
+++ trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh   
2008-04-01 07:23:39 UTC (rev 18887)
@@ -18,8 +18,6 @@
                echo "Can not bind fproxy to 8889: force it to $FPROXY_PORT 
instead."
        fi

-       cat welcome.html | sed "s/8888/$FPROXY_PORT/g" >welcome2.html
-       mv welcome2.html welcome.html
        cat bin/browse.sh | sed "s/8888/$FPROXY_PORT/g" > browse.sh
        mv browse.sh bin/browse.sh

@@ -32,6 +30,27 @@
 echo "fproxy.enabled=true" >> freenet.ini
 echo "fproxy.port=$FPROXY_PORT" >> freenet.ini

+# Translate if needed
+FILE="welcome.html"
+if test -e welcome.$ISO3_LANG.html
+then
+       FILE="welcome.$ISO3_LANG.html"
+fi
+cat "$FILE" | sed "s/8888/$FPROXY_PORT/g" >_welcome.html
+rm -f welcome.*html
+mv _welcome.html welcome.html
+
+# Translate if needed
+FILE="dont-close-me.html"
+if test -e dont-close-me.$ISO3_LANG.html
+then
+       FILE="dont-close-me.$ISO3_LANG.html"
+fi
+cat "$FILE" | sed "s/8888/$FPROXY_PORT/g" >_dont-close-me.html
+rm -f dont-close-me.*html
+mv _dont-close-me.html dont-close-me.html
+
+
 # Try to auto-detect the first available port for fcp
 FCP_PORT=9481
 java $JOPTS -jar bin/bindtest.jar $FCP_PORT 2>&1 >/dev/null

Modified: trunk/apps/new_installer/res/unix/bin/setup.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/setup.sh      2008-04-01 06:50:37 UTC 
(rev 18886)
+++ trunk/apps/new_installer/res/unix/bin/setup.sh      2008-04-01 07:23:39 UTC 
(rev 18887)
@@ -4,6 +4,7 @@
 echo '#!/bin/sh' > "$HOME/_install_toSource.sh"
 echo INSTALL_PATH=\"$INSTALL_PATH\" >> "$HOME/_install_toSource.sh"
 echo JOPTS=\" -Djava.net.preferIPv4Stack=true \" >> 
"$HOME/_install_toSource.sh"
+echo ISO3_LANG=\"$ISO3_LANG\" >> "$HOME/_install_toSource.sh"
 chmod 755 "$HOME/_install_toSource.sh"
 alias .=


Modified: trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd        
2008-04-01 06:50:37 UTC (rev 18886)
+++ trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd        
2008-04-01 07:23:39 UTC (rev 18887)
@@ -9,10 +9,26 @@
 @java -jar bin\bindtest.jar %FPROXY_PORT% 
 @if %ERRORLEVEL% EQU 0 goto configure_fproxy
 @set FPROXY_PORT=8889
- at bin\cat.exe welcome.html | bin\sed.exe "s/8888/%FPROXY_PORT%/g" > 
welcome2.html
- at move /Y welcome2.html welcome.html > NUL
+
+ at set WELCOME_FILE=welcome.html
+ at if not exist welcome.%ISO3_LANG%.html goto noWl10n
+ at set WELCOME_FILE=welcome.%ISO3_LANG%.html
+:noWl10n
+ at bin\cat.exe %WELCOME_FILE% | bin\sed.exe "s/8888/%FPROXY_PORT%/g" > 
_welcome.html
+ at del /F /Q welcome.*html
+ at move /Y _welcome.html welcome.html > NUL
+
+ at set DONTCLOSE_FILE=dont-close-me.html
+ at if not exist dont-close-me.%ISO3_LANG%.html goto noDl10n
+ at set DONTCLOSE_FILE=dont-close-me.%ISO3_LANG%.html
+:noDl10n
+ at bin\cat.exe %DONTCLOSE_FILE% | bin\sed.exe "s/8888/%FPROXY_PORT%/g" > 
_dont-close-me.html
+ at del /F /Q dont-close-me.*html
+ at move /Y _dont-close-me.html dont-close-me.html > NUL
+
 @bin\cat.exe browse.cmd | bin\sed.exe "s/8888/%FPROXY_PORT%/g" > browse2.cmd
 @move /Y browse2.cmd browse.cmd > NUL
+
 :configure_fproxy
 @echo fproxy.enable=true >>freenet.ini
 @echo fproxy.port=%FPROXY_PORT% >>freenet.ini
@@ -100,9 +116,5 @@
 @net start freenet-darknet-%FPROXY_PORT%

 @echo Spawning up a browser
- at if not exist welcome.%ISO3_LANG%.html goto nol10n
- at browse welcome.%ISO3_LANG%.html
- at goto endl10n
-:nol10n
 @browse welcome.html
 :endl10n


Reply via email to