Author: nextgens
Date: 2007-04-08 02:22:18 +0000 (Sun, 08 Apr 2007)
New Revision: 12550

Added:
   trunk/apps/new_installer/res/windows/bin/cleanup.cmd
   trunk/apps/new_installer/res/windows/bin/install_freenet-ext.cmd
   trunk/apps/new_installer/res/windows/bin/install_freenet-stable-latest.cmd
   trunk/apps/new_installer/res/windows/bin/install_frost.cmd
   trunk/apps/new_installer/res/windows/bin/install_jsite.cmd
   trunk/apps/new_installer/res/windows/bin/install_plugins.cmd
   trunk/apps/new_installer/res/windows/bin/install_thaw.cmd
   trunk/apps/new_installer/res/windows/bin/install_updater.cmd
   trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd
   trunk/apps/new_installer/res/windows/bin/setup.cmd
Removed:
   trunk/apps/new_installer/res/windows/bin/1run.cmd
Modified:
   trunk/apps/new_installer/ProcessPanel.Spec.xml
   trunk/apps/new_installer/Win_shortcutSpec.xml
   trunk/apps/new_installer/install.xml
Log:
new_installer:
* fix the windows part
  - error 193
  - icons don't get created or doesn't work
  - be more verbose and split the process so that the progressbar works
* hopefully fix the mac part as well

Next step is to install the node within a different user context

Modified: trunk/apps/new_installer/ProcessPanel.Spec.xml
===================================================================
--- trunk/apps/new_installer/ProcessPanel.Spec.xml      2007-04-07 19:05:41 UTC 
(rev 12549)
+++ trunk/apps/new_installer/ProcessPanel.Spec.xml      2007-04-08 02:22:18 UTC 
(rev 12550)
@@ -1,99 +1,163 @@
 <processing>
        <!-- Must be first! -->
        <job name="Setting up the environment">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/setup.sh"/>
        </job>
+       <job name="Setting up the environment">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/setup.sh"/>
+       </job>
+       <job name="Setting up the environment">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH\bin\setup.cmd"/>
+       </job>

        <job name="Setting the Updater up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_updater.sh"/>
        </job>
+       <job name="Setting the Updater up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_updater.sh"/>
+       </job>
+       <job name="Setting the Updater up">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH\bin\install_updater.cmd"/>
+       </job>
+
        <job name="Setting MDNS up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_mdns.sh"/>
        </job>
+       <job name="Setting MDNS up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_mdns.sh"/>
+       </job>
        <job name="Setting JSTUN up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_stun.sh"/>
        </job>
+       <job name="Setting JSTUN up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_stun.sh"/>
+       </job>
        <job name="Setting Librarian up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_librarian.sh"/>
        </job>
+       <job name="Setting Librarian up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_librarian.sh"/>
+       </job>

        <!-- no plugin below that line! -->
-       <job name="Setting Plugins up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+       <job name="Setting plugins up">
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_plugins.sh"/>
        </job>
-       <job name="Detecting port availability">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
-               <executefile 
name="$INSTALL_PATH/bin/detect_port_availability.sh"/>
+       <job name="Setting plugins up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_plugins.sh"/>
        </job>
+       <job name="Setting plugins up">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH\bin\install_plugins.cmd"/>
+       </job>
        <job name="Downloading freenet-stable-latest">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile 
name="$INSTALL_PATH/bin/install_freenet-stable-latest.sh"/>
        </job>
+       <job name="Downloading freenet-stable-latest">
+               <os family="mac"/>
+               <executefile 
name="$INSTALL_PATH/bin/install_freenet-stable-latest.sh"/>
+       </job>
+       <job name="Downloading freenet-stable-latest">
+               <os family="windows"/>
+               <executefile 
name="$INSTALL_PATH\bin\install_freenet-stable-latest.cmd"/>
+       </job>
        <job name="Downloading freenet-ext">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_freenet-ext.sh"/>
        </job>
+       <job name="Downloading freenet-ext">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_freenet-ext.sh"/>
+       </job>
+       <job name="Downloading freenet-ext">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH\bin\install_freenet-ext.cmd"/>
+       </job>
+       <job name="Detecting port availability">
+               <os family="unix"/>
+               <executefile 
name="$INSTALL_PATH/bin/detect_port_availability.sh"/>
+       </job>
+       <job name="Detecting port availability">
+               <os family="mac"/>
+               <executefile 
name="$INSTALL_PATH/bin/detect_port_availability.sh"/>
+       </job>
+       <job name="Register the system service">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH\bin\install_wrapper.cmd"/>
+       </job>
        <job name="Starting the node up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/1run.sh"/>
        </job>
+       <job name="Starting the node up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/1run.sh"/>
+       </job>

        <!-- Applications now  -->
        <job name="Setting Thaw up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_thaw.sh"/>
        </job>
+       <job name="Setting Thaw up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_thaw.sh"/>
+       </job>
+       <job name="Setting Thaw up">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH/bin/install_thaw.cmd"/>
+       </job>
        <job name="Setting Frost up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_frost.sh"/>
        </job>
+       <job name="Setting Frost up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_frost.sh"/>
+       </job>
+       <job name="Setting Frost up">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH/bin/install_frost.cmd"/>
+       </job>
        <job name="Setting jSite up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/install_jSite.sh"/>
        </job>
+       <job name="Setting jSite up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/install_jSite.sh"/>
+       </job>
+       <job name="Setting jSite up">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH/bin/install_jsite.cmd"/>
+       </job>

        <!-- Do I have to mention that nothing ought to be below ?  -->
        <job name="Cleaning up">
-               <os family="unix" />
-               <os family="mac" />
-               <os family="macosx" />
+               <os family="unix"/>
                <executefile name="$INSTALL_PATH/bin/cleanup.sh"/>
        </job>
-
-       <job name="Downloading required files (windows)">
-               <os family="windows" />
-               <executefile name="$INSTALL_PATH\bin\1run.cmd"/>
+       <job name="Cleaning up">
+               <os family="mac"/>
+               <executefile name="$INSTALL_PATH/bin/cleanup.sh"/>
        </job>
+       <job name="Cleaning up">
+               <os family="windows"/>
+               <executefile name="$INSTALL_PATH/bin/cleanup.cmd"/>
+       </job>
 </processing>

Modified: trunk/apps/new_installer/Win_shortcutSpec.xml
===================================================================
--- trunk/apps/new_installer/Win_shortcutSpec.xml       2007-04-07 19:05:41 UTC 
(rev 12549)
+++ trunk/apps/new_installer/Win_shortcutSpec.xml       2007-04-08 02:22:18 UTC 
(rev 12550)
@@ -59,7 +59,7 @@
                applications="no"
                startMenu="no"
                startup="no"
-               target="javaw -jar jSite.jar"
+               target="$INSTALL_PATH\jsite.cmd"
                description="This starts jSite"
                workingDirectory="$INSTALL_PATH"
        >
@@ -73,7 +73,7 @@
                applications="no"
                startMenu="no"
                startup="no"
-               target="javaw -jar Thaw.jar"
+               target="$INSTALL_PATH\thaw.cmd"
                description="This starts Thaw"
                workingDirectory="$INSTALL_PATH"
        >

Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml        2007-04-07 19:05:41 UTC (rev 
12549)
+++ trunk/apps/new_installer/install.xml        2007-04-08 02:22:18 UTC (rev 
12550)
@@ -27,8 +27,9 @@
                </laf>
                <laf name="liquid">
                        <os family="unix"/>
+               </laf>
+               <laf name="liquid">
                        <os family="mac"/>
-                       <os family="macosx"/>
                </laf>
        </guiprefs>

@@ -93,11 +94,7 @@

        <!-- The listeners section for CustomActions -->
        <listeners>
-               <listener installer="SummaryLoggerInstallerListener"/>
-
-               <listener installer="RegistryInstallerListener" 
uninstaller="RegistryUninstallerListener">
-                       <os family="windows"/>
-               </listener>
+               <listener installer="RegistryInstallerListener" 
uninstaller="RegistryUninstallerListener" os="windows"/>
        </listeners>

        <panels>
@@ -130,31 +127,36 @@
                        <file src="res/license/README" 
targetdir="$INSTALL_PATH"/>
                </pack>

-               <pack name="Windows" id="windows" required="yes" os="windows">
+               <pack name="Windows" id="windows" required="yes">
                        <os family="windows"/>
                        <description>A windows specific catch-all 
pack</description>

                        <fileset dir="res/windows/" targetdir="$INSTALL_PATH">
                                <exclude name="*/**/.svn"/>
                                <exclude name="*/**/.svn/**"/>
-                               <include name="freenet.ico"/>
-                               <include name="lib/**/*"/>
-                               <include name="bin/**/*"/>
+                               <include name="*/**"/>
                        </fileset>
-                       <parsable targetfile="$INSTALL_PATH\bin\1run.cmd"/> 
                        <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_freenet-ext.cmd"/>
+                       <parsable 
targetfile="$INSTALL_PATH\bin\install_freenet-stable-latest.cmd"/>
+                       <parsable 
targetfile="$INSTALL_PATH\bin\install_frost.cmd"/>
+                       <parsable 
targetfile="$INSTALL_PATH\bin\install_jsite.cmd"/>
+                       <parsable 
targetfile="$INSTALL_PATH\bin\install_plugins.cmd"/>
+                       <parsable 
targetfile="$INSTALL_PATH\bin\install_thaw.cmd"/>
+                       <parsable 
targetfile="$INSTALL_PATH\bin\install_updater.cmd"/>
+                       <parsable 
targetfile="$INSTALL_PATH\bin\install_wrapper.cmd"/>
+                       <parsable targetfile="$INSTALL_PATH\bin\setup.cmd"/>
                </pack>

-               <pack name="Unix" id="unix" required="yes" os="unix">
+               <pack name="Unix" id="unix" required="yes">
                        <os family="unix"/>
-                       <os family="mac"/>
-                       <os family="macosx"/>
                        <description>An UNIX specific catch-all 
pack</description>

                        <fileset dir="res/unix/" targetdir="$INSTALL_PATH">
                                <exclude name="*/**/.svn"/>
                                <exclude name="*/**/.svn/**"/>
-                               <include name="**/*"/>
+                               <include name="*/**"/>
                        </fileset>

                        <executable targetfile="$INSTALL_PATH/run.sh" 
type="bin" stage="never" keep="true"/>
@@ -174,9 +176,37 @@
                        <parsable 
targetfile="$INSTALL_PATH/bin/install_plugins.sh"/>
                        <parsable targetfile="$INSTALL_PATH/bin/cleanup.sh"/>
                </pack>
+
+               <!-- Yes it's a rip of the unix one, but I haven't found any 
smarter way to do it! -->
+               <pack name="MacOSX" id="unix" required="yes">
+                       <os family="mac"/>
+                       <description>An MacOSx specific catch-all 
pack</description>
+
+                       <fileset dir="res/unix/" targetdir="$INSTALL_PATH">
+                               <exclude name="*/**/.svn"/>
+                               <exclude name="*/**/.svn/**"/>
+                               <include name="*/**"/>
+                       </fileset>
+
+                       <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/setup.sh"/> 
+                       <parsable targetfile="$INSTALL_PATH/bin/1run.sh"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/detect_port_availability.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"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/install_mdns.sh"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/install_stun.sh"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/install_thaw.sh"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/install_updater.sh"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/install_freenet-ext.sh"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/install_freenet-stable-latest.sh"/>
+                       <parsable 
targetfile="$INSTALL_PATH/bin/install_plugins.sh"/>
+                       <parsable targetfile="$INSTALL_PATH/bin/cleanup.sh"/>
+               </pack>

-               <pack name="UninstallStuff" id="uninstall" required="no">
-                       <os family="windows"/>
+               <pack name="UninstallStuff" id="uninstall" required="no" 
os="windows">
                        <description>Create uninstallation hooks in the 
registry</description>
                        <executable 
targetfile="$INSTALL_PATH\bin\uninstall_service.bat" os="windows" keep="true" 
stage="uninstall"/>
                </pack>
@@ -218,11 +248,6 @@
        </packs>

        <!-- The native libraries to add  
http://svn.berlios.de/svnroot/repos/izpack/izpack-src/trunk/src/native/ -->
-       <native type="3rdparty" name="COIOSHelper.dll" stage="both">
-               <os family="windows"/>
-       </native>
-
-       <native type="izpack" name="ShellLink.dll" stage="install">
-               <os family="windows"/>
-       </native>
+       <native type="3rdparty" name="COIOSHelper.dll" stage="both" 
os="windows"/>
+       <native type="izpack" name="ShellLink.dll" stage="install" 
os="windows"/>
 </installation>

Deleted: trunk/apps/new_installer/res/windows/bin/1run.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/1run.cmd   2007-04-07 19:05:41 UTC 
(rev 12549)
+++ trunk/apps/new_installer/res/windows/bin/1run.cmd   2007-04-08 02:22:18 UTC 
(rev 12550)
@@ -1,152 +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 freenet.ini goto nocleanup
- at echo I found a freenet.ini file in the directory !!! it shouldn't exist! I 
will rename it to freenet.old.ini and go on but don't complain if it breaks : 
the installer is meant to be used in an empty directory!
- at rename freenet.ini freenet.old.ini > NUL
- at del /F freenet.ini > NUL
-:nocleanup
-
- at echo "Registering .fref file extention"
- at echo Windows Registry Editor Version 5.00 >> fref.reg
- at echo [HKEY_CLASSES_ROOT\.fref] >> fref.reg
- at echo @="fref_auto_file" >> fref.reg
- at echo [HKEY_CLASSES_ROOT\fref_auto_file] >> fref.reg
- at echo @="Freenet node reference" >> fref.reg
- at echo "EditFlags"=dword:00000000 >> fref.reg
- at echo "BrowserFlags"=dword:00000008 >> fref.reg
- at echo [HKEY_CLASSES_ROOT\fref_auto_file\DefaultIcon] >> fref.reg
- at echo @="shell32.dll,56" >> fref.reg
- at echo [HKEY_CLASSES_ROOT\fref_auto_file\shell] >> fref.reg
- at echo @="Open" >> fref.reg
-:: We need to double escape it ... it doesn't work so let's try something else 
:p ... FTYPE
-:: @echo [HKEY_CLASSES_ROOT\fref_auto_file\shell\Connect] >> fref.reg
-:: @echo [HKEY_CLASSES_ROOT\fref_auto_file\shell\Connect\command] >> fref.reg
-:: @echo @="\"%JAVA%\\bin\\java.exe\"  \"-cp\"  \"%INST%\\freenet.jar\" 
\"freenet.support.AddRef\" \"%%1\"" >> fref.reg
- at regedit /s fref.reg > NUL
- at FTYPE fref_auto_file="$JAVA_HOME\bin\javaw.exe" -cp 
"$INSTALL_PATH\freenet.jar" freenet.tools.AddRef "%%1" > NUL
- at del /F fref.reg
-
- at echo "Setting up plugins"
-:: Tweak freenet.ini
- at if not exist stun goto nostun 
- at echo       -JSTUN
- at set PLUGINS=plugins.JSTUN.JSTUN at 
file:///%INSTALL_PATH%\plugins\JSTUN.jar;%PLUGINS%
- at mkdir plugins 2> NUL
- at java -jar bin\sha1test.jar plugins/JSTUN.jar.url plugins > NUL
- at copy plugins\JSTUN.jar.url plugins\JSTUN.jar > NUL
- at del /F stun > NUL
-:nostun
-
- at if not exist mdns goto nomdns 
- at echo       -MDNSDiscovery
- at set PLUGINS=plugins.MDNSDiscovery.MDNSDiscovery at 
file:///%INSTALL_PATH%\plugins\MDNSDiscovery.jar;%PLUGINS%
- at mkdir plugins 2> NUL
- at java -jar bin\sha1test.jar plugins/MDNSDiscovery.jar.url plugins > NUL
- at copy plugins\MDNSDiscovery.jar.url plugins\MDNSDiscovery.jar > NUL
- at del /F mdns > NUL
-:nomdns
-
- at if not exist librarian goto nolibrarian 
- at echo       -Librarian
- at mkdir plugins 2> NUL
- at set PLUGINS=plugins.Librarian.Librarian at 
file:///%INSTALL_PATH%\plugins\Librarian.jar;%PLUGINS%
- at java -jar bin\sha1test.jar plugins/Librarian.jar.url plugins > NUL
- at copy plugins\Librarian.jar.url plugins\Librarian.jar > NUL
- at del /F librarian > NUL
-:nolibrarian
-
- at del /F *.jar.url > NUL
- at echo pluginmanager.loadplugin=%PLUGINS% >> freenet.ini
-
- at echo node.updater.enabled=true >> freenet.ini
- at if exist update echo node.updater.autoupdate=true >> freenet.ini
- at del /F update > NUL
-
- at echo "Detecting tcp port availability"
-:: Try to detect a free, available port for fproxy
- at set FPROXY_PORT=8888
- at java -jar bin\bindtest.jar %FPROXY_PORT% 
- at IF NOT ERRORLEVEL 1 GOTO configure_fproxy
- at 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
-:configure_fproxy
- at echo fproxy.enable=true >>freenet.ini
- at echo fproxy.port=%FPROXY_PORT% >>freenet.ini
-
-:: Try to detect a free, available port for fcp
- at set FCP_PORT=9481
- at java -jar bin\bindtest.jar %FCP_PORT% 
- at if not errorlevel 0 set FCP_PORT=9482
- at echo fcp.enable=true >>freenet.ini
- at echo fcp.port=%FCP_PORT% >>freenet.ini
-
-:: Try to detect a free, available port for console
- at set CONSOLE_PORT=2323
- at java -jar bin\bindtest.jar %CONSOLE_PORT% 
- at if not errorlevel 0 set CONSOLE_PORT=2324
- at echo console.enable=true >>freenet.ini
- at echo console.port=%CONSOLE_PORT% >>freenet.ini
-
- at echo "Downloading update.cmd"
- at java -jar bin\sha1test.jar update/update.cmd . > NUL
- at echo "Downloading freenet-ext.jar"
- at java -jar bin\sha1test.jar freenet-ext.jar . > NUL
- at echo "Downloading freenet-stable-latest.jar"
- at java -jar bin\sha1test.jar freenet-stable-latest.jar . > NUL
- at copy freenet-stable-latest.jar freenet.jar > NUl
- at echo "Installing the wrapper"
- at echo "Registering Freenet as a system service"
-::
-:: It's likely that a node has already been set up; handle it
- at bin\cat.exe wrapper.conf | bin\sed.exe "s/darknet/darknet-%FPROXY_PORT%/g" 
> wrapper2.conf 
- at move /Y wrapper2.conf wrapper.conf > NUL
-
- at bin\cat bin\install_service.bat | bin\sed.exe 
"s/darknet/darknet-%FPROXY_PORT%/g" > install_service.bat
- at move /Y install_service.bat bin\install_service.bat
-
- at bin\cat bin\remove_service.bat | bin\sed.exe 
"s/darknet/darknet-%FPROXY_PORT%/g" > remove_service.bat
- at move /Y remove_service.bat bin\remove_service.bat
-
- at bin\cat bin\start.cmd | bin\sed.exe "s/darknet/darknet-%FPROXY_PORT%/g" > 
start.cmd
- at move /Y start.cmd bin\start.cmd
-
- at bin\cat bin\stop.cmd | bin\sed.exe "s/darknet/darknet-%FPROXY_PORT%/g" > 
stop.cmd
- at move /Y stop.cmd bin\stop.cmd
-
- at bin\wrapper-windows-x86-32.exe -r ../wrapper.conf > NUL
- at bin\wrapper-windows-x86-32.exe -i ../wrapper.conf
-
-:: Start the node up
- at net start freenet-darknet-%FPROXY_PORT%
-
-:: Installing additionnal softwares
- at if not exist jsite goto nojsite 
- at del /F jsite > NUL
- at echo "Downloading jSite"
- at java -jar bin\sha1test.jar jSite/jSite.jar . > NUL
-:nojsite
-
- at if not exist thaw goto nothaw 
- at del /F thaw > NUL
- at echo "Downloading Thaw"
- at java -jar bin\sha1test.jar Thaw/Thaw.jar . > NUL
-:nothaw
-
- at if not exist frost goto nofrost 
- at del /F frost > NUL
- at echo "Downloading Frost"
- at java -jar bin\sha1test.jar frost/frost.zip . > NUL
- at echo "Setting Frost up"
- at mkdir frost
- at java -jar bin\uncompress.jar frost.zip frost > NUL
-:nofrost
-
- at echo "Spawing up a browser"
- at start http://127.0.0.1:%FPROXY_PORT%/
- at start welcome.html
-
- at echo "Finished"

Added: trunk/apps/new_installer/res/windows/bin/cleanup.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/cleanup.cmd                        
        (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/cleanup.cmd        2007-04-08 
02:22:18 UTC (rev 12550)
@@ -0,0 +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%
+
+:: Keep application installers in case users want to perform updates
+ at cd bin
+ at del /F 1run.cmd setup.cmd detect_port_availability.cmd 
install_freenet-ext.cmd install_freenet-stable-latest.cmd install_plugins.cmd 
install_updater.cmd install_wrapper.cmd setup.cmd > NUL

Added: trunk/apps/new_installer/res/windows/bin/install_freenet-ext.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_freenet-ext.cmd            
                (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_freenet-ext.cmd    
2007-04-08 02:22:18 UTC (rev 12550)
@@ -0,0 +1,7 @@
+ at set PATH=%SYSTEMROOT%\System32\;%PATH%
+ at set INSTALL_PATH=$INSTALL_PATH
+ at set JAVA_HOME=$JAVA_HOME
+ at cd /D %INSTALL_PATH%
+
+ at echo "Downloading freenet-ext.jar"
+ at java -jar bin\sha1test.jar freenet-ext.jar . > NUL

Added: 
trunk/apps/new_installer/res/windows/bin/install_freenet-stable-latest.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_freenet-stable-latest.cmd  
                        (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_freenet-stable-latest.cmd  
2007-04-08 02:22:18 UTC (rev 12550)
@@ -0,0 +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%
+
+ at echo "Downloading freenet-stable-latest.jar"
+ at java -jar bin\sha1test.jar freenet-stable-latest.jar . > NUL
+ at copy freenet-stable-latest.jar freenet.jar > NUl

Added: trunk/apps/new_installer/res/windows/bin/install_frost.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_frost.cmd                  
        (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_frost.cmd  2007-04-08 
02:22:18 UTC (rev 12550)
@@ -0,0 +1,13 @@
+ 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 frost goto nofrost 
+ at del /F frost > NUL
+ at echo "Downloading Frost"
+ at java -jar bin\sha1test.jar frost/frost.zip . > NUL
+ at echo "Setting Frost up"
+ at mkdir frost
+ at java -jar bin\uncompress.jar frost.zip frost > NUL
+:nofrost

Added: trunk/apps/new_installer/res/windows/bin/install_jsite.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_jsite.cmd                  
        (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_jsite.cmd  2007-04-08 
02:22:18 UTC (rev 12550)
@@ -0,0 +1,11 @@
+ 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 jsite goto nojsite 
+ at del /F jsite > NUL
+ at echo "Downloading jSite"
+ at echo start javaw -jar jSite.jar > jsite.cmd
+ at java -jar bin\sha1test.jar jSite/jSite.jar . > NUL
+:nojsite

Added: trunk/apps/new_installer/res/windows/bin/install_plugins.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_plugins.cmd                
                (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_plugins.cmd        
2007-04-08 02:22:18 UTC (rev 12550)
@@ -0,0 +1,35 @@
+ at set PATH=%SYSTEMROOT%\System32\;%PATH%
+ at set INSTALL_PATH=$INSTALL_PATH
+ at set JAVA_HOME=$JAVA_HOME
+ at cd /D %INSTALL_PATH%
+
+ at echo "Setting up plugins"
+
+ at if not exist stun goto nostun 
+ at echo       -JSTUN
+ at set PLUGINS=plugins.JSTUN.JSTUN at 
file:///%INSTALL_PATH%\plugins\JSTUN.jar;%PLUGINS%
+ at mkdir plugins 2> NUL
+ at java -jar bin\sha1test.jar plugins/JSTUN.jar.url plugins > NUL
+ at copy plugins\JSTUN.jar.url plugins\JSTUN.jar > NUL
+ at del /F stun > NUL
+:nostun
+
+ at if not exist mdns goto nomdns 
+ at echo       -MDNSDiscovery
+ at set PLUGINS=plugins.MDNSDiscovery.MDNSDiscovery at 
file:///%INSTALL_PATH%\plugins\MDNSDiscovery.jar;%PLUGINS%
+ at mkdir plugins 2> NUL
+ at java -jar bin\sha1test.jar plugins/MDNSDiscovery.jar.url plugins > NUL
+ at copy plugins\MDNSDiscovery.jar.url plugins\MDNSDiscovery.jar > NUL
+ at del /F mdns > NUL
+:nomdns
+
+ at if not exist librarian goto nolibrarian 
+ at echo       -Librarian
+ at mkdir plugins 2> NUL
+ at set PLUGINS=plugins.Librarian.Librarian at 
file:///%INSTALL_PATH%\plugins\Librarian.jar;%PLUGINS%
+ at java -jar bin\sha1test.jar plugins/Librarian.jar.url plugins > NUL
+ at copy plugins\Librarian.jar.url plugins\Librarian.jar > NUL
+ at del /F librarian > NUL
+:nolibrarian
+
+ at echo pluginmanager.loadplugin=%PLUGINS% >> freenet.ini

Added: trunk/apps/new_installer/res/windows/bin/install_thaw.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_thaw.cmd                   
        (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_thaw.cmd   2007-04-08 
02:22:18 UTC (rev 12550)
@@ -0,0 +1,11 @@
+ 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 thaw goto nothaw 
+ at del /F thaw > NUL
+ at echo "Downloading Thaw"
+ at echo start javaw -jar Thaw.jar > thaw.cmd
+ at java -jar bin\sha1test.jar Thaw/Thaw.jar . > NUL
+:nothaw

Added: trunk/apps/new_installer/res/windows/bin/install_updater.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_updater.cmd                
                (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_updater.cmd        
2007-04-08 02:22:18 UTC (rev 12550)
@@ -0,0 +1,10 @@
+ at set PATH=%SYSTEMROOT%\System32\;%PATH%
+ at set INSTALL_PATH=$INSTALL_PATH
+ at set JAVA_HOME=$JAVA_HOME
+ at cd /D %INSTALL_PATH%
+
+ at echo "Downloading update.cmd"
+ at java -jar bin\sha1test.jar update/update.cmd . > NUL
+ at echo node.updater.enabled=true >> freenet.ini
+ at if exist update echo node.updater.autoupdate=true >> freenet.ini
+ at del /F update > NUL

Added: trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd                
                (rev 0)
+++ trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd        
2007-04-08 02:22:18 UTC (rev 12550)
@@ -0,0 +1,62 @@
+ at set PATH=%SYSTEMROOT%\System32\;%PATH%
+ at set INSTALL_PATH=$INSTALL_PATH
+ at set JAVA_HOME=$JAVA_HOME
+ at cd /D %INSTALL_PATH%
+
+ at echo "Detecting tcp port availability"
+:: Try to detect a free, available port for fproxy
+ at set FPROXY_PORT=8888
+ at java -jar bin\bindtest.jar %FPROXY_PORT% 
+ at IF NOT ERRORLEVEL 1 GOTO configure_fproxy
+ at 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
+:configure_fproxy
+ at echo fproxy.enable=true >>freenet.ini
+ at echo fproxy.port=%FPROXY_PORT% >>freenet.ini
+
+:: Try to detect a free, available port for fcp
+ at set FCP_PORT=9481
+ at java -jar bin\bindtest.jar %FCP_PORT% 
+ at if not errorlevel 0 set FCP_PORT=9482
+ at echo fcp.enable=true >>freenet.ini
+ at echo fcp.port=%FCP_PORT% >>freenet.ini
+
+:: Try to detect a free, available port for console
+ at set CONSOLE_PORT=2323
+ at java -jar bin\bindtest.jar %CONSOLE_PORT% 
+ at if not errorlevel 0 set CONSOLE_PORT=2324
+ at echo console.enable=true >>freenet.ini
+ at echo console.port=%CONSOLE_PORT% >>freenet.ini
+
+
+ at bin\cat.exe wrapper.conf | bin\sed.exe "s/darknet/darknet-%FPROXY_PORT%/g" 
> wrapper2.conf 
+ at move /Y wrapper2.conf wrapper.conf > NUL
+
+ at bin\cat bin\install_service.bat | bin\sed.exe 
"s/darknet/darknet-%FPROXY_PORT%/g" > install_service.bat
+ at move /Y install_service.bat bin\install_service.bat
+
+ at bin\cat bin\remove_service.bat | bin\sed.exe 
"s/darknet/darknet-%FPROXY_PORT%/g" > remove_service.bat
+ at move /Y remove_service.bat bin\remove_service.bat
+
+ at bin\cat bin\start.cmd | bin\sed.exe "s/darknet/darknet-%FPROXY_PORT%/g" > 
start.cmd
+ at move /Y start.cmd bin\start.cmd
+
+ at bin\cat bin\stop.cmd | bin\sed.exe "s/darknet/darknet-%FPROXY_PORT%/g" > 
stop.cmd
+ at move /Y stop.cmd bin\stop.cmd
+
+ at echo "Installing the wrapper"
+ at echo "Registering Freenet as a system service"
+
+:: It's likely that a node has already been set up; handle it
+ at bin\wrapper-windows-x86-32.exe -r ../wrapper.conf > NUL
+ at bin\wrapper-windows-x86-32.exe -i ../wrapper.conf
+
+:: Start the node up
+ at net start freenet-darknet-%FPROXY_PORT%
+
+ at echo "Spawning up a browser"
+ at start http://127.0.0.1:%FPROXY_PORT%/
+ at start welcome.html
+
+ at echo "Finished"

Added: trunk/apps/new_installer/res/windows/bin/setup.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/setup.cmd                          
(rev 0)
+++ trunk/apps/new_installer/res/windows/bin/setup.cmd  2007-04-08 02:22:18 UTC 
(rev 12550)
@@ -0,0 +1,30 @@
+ 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 freenet.ini goto nocleanup
+ at echo I found a freenet.ini file in the directory !!! it shouldn't exist! I 
will rename it to freenet.old.ini and go on but don't complain if it breaks : 
the installer is meant to be used in an empty directory!
+ at rename freenet.ini freenet.old.ini > NUL
+ at del /F freenet.ini > NUL
+:nocleanup
+
+ at echo "Registering .fref file extension"
+ at echo Windows Registry Editor Version 5.00 >> fref.reg
+ at echo [HKEY_CLASSES_ROOT\.fref] >> fref.reg
+ at echo @="fref_auto_file" >> fref.reg
+ at echo [HKEY_CLASSES_ROOT\fref_auto_file] >> fref.reg
+ at echo @="Freenet node reference" >> fref.reg
+ at echo "EditFlags"=dword:00000000 >> fref.reg
+ at echo "BrowserFlags"=dword:00000008 >> fref.reg
+ at echo [HKEY_CLASSES_ROOT\fref_auto_file\DefaultIcon] >> fref.reg
+ at echo @="shell32.dll,56" >> fref.reg
+ at echo [HKEY_CLASSES_ROOT\fref_auto_file\shell] >> fref.reg
+ at echo @="Open" >> fref.reg
+:: We need to double escape it ... it doesn't work so let's try something else 
:p ... FTYPE
+:: @echo [HKEY_CLASSES_ROOT\fref_auto_file\shell\Connect] >> fref.reg
+:: @echo [HKEY_CLASSES_ROOT\fref_auto_file\shell\Connect\command] >> fref.reg
+:: @echo @="\"%JAVA%\\bin\\java.exe\"  \"-cp\"  \"%INST%\\freenet.jar\" 
\"freenet.support.AddRef\" \"%%1\"" >> fref.reg
+ at regedit /s fref.reg > NUL
+ at FTYPE fref_auto_file="$JAVA_HOME\bin\javaw.exe" -cp 
"$INSTALL_PATH\freenet.jar" freenet.tools.AddRef "%%1" > NUL
+ at del /F fref.reg


Reply via email to