Author: nextgens
Date: 2006-03-30 09:32:32 +0000 (Thu, 30 Mar 2006)
New Revision: 8363
Modified:
trunk/apps/installer/build.xml
trunk/apps/installer/installclasspath/conf/wrapper.conf
trunk/apps/installer/installclasspath/run.cmd
trunk/apps/installer/installclasspath/windows/start.cmd
trunk/apps/installer/installclasspath/windows/stop.cmd
Log:
installer: This should fix the windows system service problem when installing 2
nodes of different types. WARNING : mind about removing previously created
services before ;)
Modified: trunk/apps/installer/build.xml
===================================================================
--- trunk/apps/installer/build.xml 2006-03-30 08:35:40 UTC (rev 8362)
+++ trunk/apps/installer/build.xml 2006-03-30 09:32:32 UTC (rev 8363)
@@ -19,6 +19,9 @@
<condition property="is_unix" value="true">
<os family="unix" />
</condition>
+ <condition property="freenetWorkingMode" value="darknet"
else="testnet">
+ <isfalse value="${enableTestnet}" />
+ </condition>
</target>
<target name="config_default">
@@ -59,6 +62,10 @@
</copy>
<copy file="${basedir}/conf/wrapper.conf"
tofile="${installDir}/wrapper.conf"/>
+ <replace file="${installDir}/wrapper.conf">
+ <replacefilter token="@serviceName@"
value="freenet-${freenetWorkingMode}"/>
+ <replacefilter token="@testnet@"
value="${freenetWorkingMode}"/>
+ </replace>
<copy file="${basedir}/freenet-cvs-snapshot.jar"
tofile="${installDir}/freenet-cvs-snapshot.jar"/>
<copy file="${basedir}/freenet-ext.jar"
tofile="${installDir}/freenet-ext.jar"/>
@@ -69,8 +76,17 @@
<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}"/>
+ </replace>
<copy file="${basedir}/windows/start.cmd"
tofile="${installDir}/start.cmd"/>
+ <replace file="${installDir}/start.cmd">
+ <replacefilter token="@serviceName@"
value="freenet-${freenetWorkingMode}"/>
+ </replace>
<copy file="${basedir}/windows/stop.cmd"
tofile="${installDir}/stop.cmd"/>
+ <replace file="${installDir}/start.cmd">
+ <replacefilter token="@serviceName@"
value="freenet-${freenetWorkingMode}"/>
+ </replace>
<echo message="Creating shortcuts"/>
<exec executable="cscript" dir="${basedir}/windows" >
<arg value="CreateDesktopShortcut.vbs"/>
Modified: trunk/apps/installer/installclasspath/conf/wrapper.conf
===================================================================
--- trunk/apps/installer/installclasspath/conf/wrapper.conf 2006-03-30
08:35:40 UTC (rev 8362)
+++ trunk/apps/installer/installclasspath/conf/wrapper.conf 2006-03-30
09:32:32 UTC (rev 8363)
@@ -19,10 +19,10 @@
wrapper.console.title=Freenet 0.7
# Name of the service
-wrapper.ntservice.name=Freenet
+wrapper.ntservice.name=@serviceName@
# Display name of the service
-wrapper.ntservice.displayname=Freenet 0.7
+wrapper.ntservice.displayname=Freenet 0.7 @testnet@
# Description of the service
wrapper.ntservice.description=The Free Network Project daemon
Modified: trunk/apps/installer/installclasspath/run.cmd
===================================================================
--- trunk/apps/installer/installclasspath/run.cmd 2006-03-30 08:35:40 UTC
(rev 8362)
+++ trunk/apps/installer/installclasspath/run.cmd 2006-03-30 09:32:32 UTC
(rev 8363)
@@ -1,8 +1,8 @@
echo "Cleaning up"
bin\wrapper -r ../wrapper.conf
-net stop freenet
+net stop @serviceName@
echo "Registering Freenet as a system service"
bin\wrapper -i ../wrapper.conf
-net start freenet
+net start @serviceName@
@ping 127.0.0.1 -n 10 > NUL
start http://localhost:8888
Modified: trunk/apps/installer/installclasspath/windows/start.cmd
===================================================================
--- trunk/apps/installer/installclasspath/windows/start.cmd 2006-03-30
08:35:40 UTC (rev 8362)
+++ trunk/apps/installer/installclasspath/windows/start.cmd 2006-03-30
09:32:32 UTC (rev 8363)
@@ -1,2 +1,2 @@
echo "Starting freenet"
- at net start freenet
+ at net start @serviceName@
Modified: trunk/apps/installer/installclasspath/windows/stop.cmd
===================================================================
--- trunk/apps/installer/installclasspath/windows/stop.cmd 2006-03-30
08:35:40 UTC (rev 8362)
+++ trunk/apps/installer/installclasspath/windows/stop.cmd 2006-03-30
09:32:32 UTC (rev 8363)
@@ -1,2 +1,2 @@
echo "Stoping freenet"
- at net stop freenet
+ at net stop @serviceName@