Author: nextgens
Date: 2006-03-30 14:32:04 +0000 (Thu, 30 Mar 2006)
New Revision: 8366
Removed:
trunk/apps/installer/installclasspath/config/freenet-default.ini
Modified:
trunk/apps/installer/antinstall-config.xml
trunk/apps/installer/build.xml
trunk/apps/installer/installclasspath/config/freenet.ini
trunk/apps/installer/installclasspath/linux/CreateDesktopShortcut.sh
trunk/apps/installer/installclasspath/run.cmd
trunk/apps/installer/installclasspath/windows/CreateDesktopShortcut.vbs
Log:
installer: a hopefully working version allowing to set up two nodes
Modified: trunk/apps/installer/antinstall-config.xml
===================================================================
--- trunk/apps/installer/antinstall-config.xml 2006-03-30 14:22:20 UTC (rev
8365)
+++ trunk/apps/installer/antinstall-config.xml 2006-03-30 14:32:04 UTC (rev
8366)
@@ -150,7 +150,7 @@
<comment
displayText="How much bandwidth may be used by FRED?"/>
<large-select
- property="bandwidth"
+ property="bw"
displayText="Bandwidth value"
defaultValue="15"
>
@@ -201,6 +201,16 @@
displayText="Enable FCP daemon?"
defaultValue="true"
force="false"/>
+ <checkbox
+ property="enableFproxy"
+ displayText="Enable Fproxy daemon?"
+ defaultValue="true"
+ force="false"/>
+ <checkbox
+ property="enableConsole"
+ displayText="Enable Fproxy daemon?"
+ defaultValue="true"
+ force="false"/>
</page>
<page
type="input"
Modified: trunk/apps/installer/build.xml
===================================================================
--- trunk/apps/installer/build.xml 2006-03-30 14:22:20 UTC (rev 8365)
+++ trunk/apps/installer/build.xml 2006-03-30 14:32:04 UTC (rev 8366)
@@ -7,9 +7,6 @@
<target name="pre">
<mkdir dir="${installDir}"/>
- <condition property="target" value="config_default"
else="config_l33t">
- <equals arg1="${l33t}" arg2="0"/>
- </condition>
<condition property="skip_frost" value="true">
<isfalse value="${frost}" />
</condition>
@@ -22,35 +19,92 @@
<condition property="freenetWorkingMode" value="darknet"
else="testnet">
<isfalse value="${enableTestnet}" />
</condition>
+ <condition property="is_darknet" value="true">
+ <isfalse value="${enableTestnet}" />
+ </condition>
+ <condition property="is_testnet" value="true">
+ <istrue value="${enableTestnet}" />
+ </condition>
</target>
+
+ <target name="darknet" if="is_darknet">
+ <echo message="Configuring the node for darknet operations"/>
+ <property name="fcpport" value="9481"/>
+ <property name="fproxyport" value="8888"/>
+ <property name="consoleport" value="2323"/>
+ </target>
+
+ <target name="testnet" if="is_testnet">
+ <echo message="Configuring the node for testnet operations"/>
+ <property name="fcpport" value="9482"/>
+ <property name="fproxyport" value="8889"/>
+ <property name="consoleport" value="2324"/>
+ </target>
<target name="config_default">
<echo message="Using default configuration"/>
- <copy file="${basedir}/config/freenet-default.ini"
tofile="${installDir}/freenet.ini" overwrite="true"/>
- <replace file="${installDir}/freenet.ini">
- <replacefilter token="@portnumber@"
value="${portNumber}"/>
- <replacefilter token="@nodename@" value="${nodeName}"/>
- <replacefilter token="@enabletestnet@"
value="${enableTestnet}"/>
- </replace>
+ <condition property="NAME" value="${hostName}" else="NotSet">
+ <isset property="${hostName}" />
+ </condition>
+ <condition property="bandwidth" value="${bandwidth}" else="15">
+ <isset property="${bw}" />
+ </condition>
+ <condition property="DataStoreSize" value="${dsSize}" else="1">
+ <isset property="${dsSize}" />
+ </condition>
+ <condition property="Port" value="${portNumber}" else="-1">
+ <isset property="${portNumber}" />
+ </condition>
+ <condition property="myHostName" value="${hostName}" else="">
+ <isset property="${hostName}" />
+ </condition>
+ <condition property="Testnet" value="${enableTestnet}"
else="true">
+ <isset property="${enableTestnet}" />
+ </condition>
+ <condition property="SNMP" value="${enableSNMP}" else="false">
+ <isset property="${enableSNMP}" />
+ </condition>
+ <condition property="FCP" value="${enableFCP}" else="true">
+ <isset property="${enableFCP}" />
+ </condition>
+ <condition property="Fproxy" value="${enableFproxy}"
else="true">
+ <isset property="${enableFproxy}" />
+ </condition>
+ <condition property="Console" value="${enableConsole}"
else="true">
+ <isset property="${enableConsole}" />
+ </condition>
</target>
- <target name="config_l33t">
+ <target name="final_config">
+ <echo message="Setting up the node"/>
<copy file="${basedir}/config/freenet.ini"
tofile="${installDir}/freenet.ini" overwrite="true"/>
<replace file="${installDir}/freenet.ini">
- <replacefilter token="@hostname@" value="${hostName}"/>
+ <replacefilter token="@hostname@"
value="${myHostName}"/>
<replacefilter token="@bandwidth@"
value="${bandwidth}"/>
- <replacefilter token="@dsSize@" value="${dsSize}"/>
- <replacefilter token="@portnumber@"
value="${portNumber}"/>
- <replacefilter token="@nodename@" value="${nodeName}"/>
- <replacefilter token="@enabletestnet@"
value="${enableTestnet}"/>
- <replacefilter token="@enablesnmp@"
value="${enableSNMP}"/>
- <replacefilter token="@enablefcp@"
value="${enableFCP}"/>
+ <replacefilter token="@dsSize@"
value="${DataStoreSize}"/>
+ <replacefilter token="@portnumber@" value="${Port}"/>
+ <replacefilter token="@nodename@" value="${Name}"/>
+ <replacefilter token="@enabletestnet@"
value="${Testnet}"/>
+ <replacefilter token="@enablesnmp@" value="${SNMP}"/>
+ <replacefilter token="@enablefcp@" value="${FCP}"/>
+ <replacefilter token="@enablefproxy@"
value="${Fproxy}"/>
+ <replacefilter token="@enableconsole@"
value="${Console}"/>
+ <replacefilter token="@fcpport@" value="${fcpport}"/>
+ <replacefilter token="@fproxyport@"
value="${fproxyport}"/>
+ <replacefilter token="@consoleport@"
value="${consoleport}"/>
</replace>
</target>
- <target name="default" depends="pre,tgmain,tgext,windows,unix,frost">
+ <target name="default"
depends="pre,config_default,darknet,testnet,windows,unix">
+ <echo message="Port Settings :"/>
+ <echo message=" FCP : ${fcpport}"/>
+ <echo message=" Fproxy : ${fproxyport}"/>
+ <echo message=" Console : ${consoleport}"/>
+ <echo message="Misc :"/>
+ <echo message="Bandwidth : ${bandwidth}K"/>
+
<mkdir dir="${installDir}/lib"/>
<mkdir dir="${installDir}/bin"/>
<copy todir="${installDir}/bin/">
@@ -69,15 +123,13 @@
<copy file="${basedir}/freenet-cvs-snapshot.jar"
tofile="${installDir}/freenet-cvs-snapshot.jar"/>
<copy file="${basedir}/freenet-ext.jar"
tofile="${installDir}/freenet-ext.jar"/>
- <echo message="Setting up the node"/>
- <antcall target="${target}"/>
-
</target>
<target name="windows" if="is_windows">
<copy file="${basedir}/run.cmd"
tofile="${installDir}/run.cmd"/>
<replace file="${installDir}/run.cmd">
- <replacefilter token="@serviceName@"
value="freenet-${freenetWorkingMode}"/>
+ <replacefilter token="@serviceName@"
value="freenedarknett-${freenetWorkingMode}"/>
+ <replacefilter token="@fproxyport@"
value="${fproxyport}"/>
</replace>
<copy file="${basedir}/windows/start.cmd"
tofile="${installDir}/start.cmd"/>
<replace file="${installDir}/start.cmd">
@@ -91,6 +143,7 @@
<exec executable="cscript" dir="${basedir}/windows" >
<arg value="CreateDesktopShortcut.vbs"/>
<arg value=""${installDir}""/>
+ <arg value="${fproxyport}"/>
</exec>
<echo message="Registering as a system service if possible"/>
@@ -103,12 +156,16 @@
<target name="unix" if="is_unix">
<copy file="${basedir}/run.sh" tofile="${installDir}/run.sh"/>
<chmod file="${installDir}/run.sh" perm="775"/>
+ <replace file="${installDir}/run.sh">
+ <replacefilter token="@fproxyport@"
value="${fproxyport}"/>
+ </replace>
<echo message="Creating shortcuts"/>
<chmod file="${basedir}/linux/CreateDesktopShortcut.sh"
perm="775"/>
<exec executable="sh" dir="${basedir}/linux/">
<arg value="CreateDesktopShortcut.sh"/>
<arg value=""${installDir}""/>
+ <arg value="${fproxyport}"/>
</exec>
<echo message="Registering as a system service if possible"/>
@@ -151,7 +208,7 @@
<echo message="Installing Source files"/>
</target>
- <target name="cleanuptarget" depends="default">
+ <target name="cleanuptarget" depends="default,final_config">
<delete dir="${basedir}/temp"/>
</target>
</project>
Deleted: trunk/apps/installer/installclasspath/config/freenet-default.ini
===================================================================
--- trunk/apps/installer/installclasspath/config/freenet-default.ini
2006-03-30 14:22:20 UTC (rev 8365)
+++ trunk/apps/installer/installclasspath/config/freenet-default.ini
2006-03-30 14:32:04 UTC (rev 8366)
@@ -1,14 +0,0 @@
-node.ipAddressOverride=
-node.outputBandwidthLimit=15K
-node.storeSize=1G
-node.listenPort=@portnumber@
-node.name=@nodename@
-node.downloadsDir=downloads
-node.testnet.enabled=@enabletestnet@
-fcp.enabled=true
-fcp.port=9481
-logger.maxZippedLogsSize=1G
-fproxy.enabled=true
-fproxy.port=8888
-snmp.enabled=true
-End
Modified: trunk/apps/installer/installclasspath/config/freenet.ini
===================================================================
--- trunk/apps/installer/installclasspath/config/freenet.ini 2006-03-30
14:22:20 UTC (rev 8365)
+++ trunk/apps/installer/installclasspath/config/freenet.ini 2006-03-30
14:32:04 UTC (rev 8366)
@@ -4,8 +4,14 @@
node.listenPort=@portnumber@
node.name=@nodename@
node.testnet.enabled=@enabletestnet@
+node.testnet.port=@portnumber@
fcp.enabled=@enablefcp@
+fcp.port=@fcpport@
logger.maxZippedLogsSize=1G
fproxy.enabled=@enablefproxy@
+fproxy.port=@fproxyport@
snmp.enabled=@enablesnmp@
+console.directEnabled=false
+console.enabled=@enableconsole@
+console.port=@consoleport@
End
Modified: trunk/apps/installer/installclasspath/linux/CreateDesktopShortcut.sh
===================================================================
--- trunk/apps/installer/installclasspath/linux/CreateDesktopShortcut.sh
2006-03-30 14:22:20 UTC (rev 8365)
+++ trunk/apps/installer/installclasspath/linux/CreateDesktopShortcut.sh
2006-03-30 14:32:04 UTC (rev 8366)
@@ -1,5 +1,5 @@
#!/bin/sh
mkdir -p $HOME/Desktop
-echo -e "#!/bin/sh\nmozilla http://localhost:8888/" > $HOME/Desktop/Freenet
+echo -e "#!/bin/sh\nmozilla http://localhost:$2/" > $HOME/Desktop/Freenet
chmod +x $HOME/Desktop/Freenet
Modified: trunk/apps/installer/installclasspath/run.cmd
===================================================================
--- trunk/apps/installer/installclasspath/run.cmd 2006-03-30 14:22:20 UTC
(rev 8365)
+++ trunk/apps/installer/installclasspath/run.cmd 2006-03-30 14:32:04 UTC
(rev 8366)
@@ -5,4 +5,4 @@
bin\wrapper -i ../wrapper.conf
net start @serviceName@
@ping 127.0.0.1 -n 10 > NUL
-start http://localhost:8888
+start http://localhost:@fproxyport@
Modified:
trunk/apps/installer/installclasspath/windows/CreateDesktopShortcut.vbs
===================================================================
--- trunk/apps/installer/installclasspath/windows/CreateDesktopShortcut.vbs
2006-03-30 14:22:20 UTC (rev 8365)
+++ trunk/apps/installer/installclasspath/windows/CreateDesktopShortcut.vbs
2006-03-30 14:32:04 UTC (rev 8366)
@@ -1,6 +1,7 @@
set args = WScript.Arguments
INSTALL_PATH = args.Item(0)
+PORT = args.Item(1)
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
@@ -9,7 +10,7 @@
link.Description = "The Free Network Project"
link.HotKey = "CTRL+ALT+SHIFT+F"
link.IconLocation = INSTALL_PATH & "\freenet.ico"
-link.TargetPath = "http://127.0.0.1:8888"
+link.TargetPath = "http://127.0.0.1:" & PORT
link.WindowStyle = 1
link.WorkingDirectory = INSTALL_PATH
link.Save