* Installer:

- Change the wrapper.config classpath to one line: lib/*.jar
        This means we lose control of classpath load order, so move the windows installer
        jars copy.jar, delete.jar, and exec.jar to a new installer/ directory so
        these jars won't be in the classpath or potentially conflict, since
        copy.jar and delete.jar include FileUtil.class, and we don't want to have
        to remember to add them to the updater if we ever change FileUtil.class.
        Delete the installer/ directory in postinstall.sh since it is windows-only.
This commit is contained in:
zzz
2009-06-11 23:38:15 +00:00
parent d9cb4e2620
commit 821dcddda0
4 changed files with 30 additions and 50 deletions

View File

@ -399,13 +399,14 @@
</target>
<target name="installer" depends="preppkg">
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
<jar destfile="./pkg-temp/lib/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
<mkdir dir="pkg-temp/installer" />
<jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
<manifest><attribute name="Main-Class" value="net.i2p.util.Copy" /></manifest>
</jar>
<jar destfile="./pkg-temp/lib/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
<jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
<manifest><attribute name="Main-Class" value="net.i2p.util.Delete" /></manifest>
</jar>
<jar destfile="./pkg-temp/lib/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
<jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
<manifest><attribute name="Main-Class" value="net.i2p.util.Exec" /></manifest>
</jar>
<izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />

View File

@ -103,27 +103,27 @@
<fileset dir="pkg-temp" includes="**/*" targetdir="$INSTALL_PATH"/>
<!-- postinstall stuff for windows -->
<executable targetfile="$INSTALL_PATH/lib/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\lib\wrapper\win32\I2Psvc.exe" /><arg value="$INSTALL_PATH" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.dll" /><arg value="$INSTALL_PATH\lib" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.jar" /><arg value="$INSTALL_PATH\lib" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\i2prouter" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\install_i2p_service_unix" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\install-headless.txt" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\osid" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\postinstall.sh" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\postinstall.bat" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\uninstall_i2p_service_unix" /></args></executable>
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH\lib\wrapper" /></args></executable>
<!-- workaround for vista permission problems - see comments above -->
@ -132,13 +132,13 @@
<args><arg value="$INSTALL_PATH" /></args>
</executable>
<!-- else delete it -->
<executable targetfile="$INSTALL_PATH/lib/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"
<executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"
condition="izpack.windowsinstall.xp|izpack.windowsinstall.2003" >
<args><arg value="$INSTALL_PATH\fixperms.bat" /></args>
</executable>
<!--
<executable targetfile="$INSTALL_PATH/lib/exec.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<executable targetfile="$INSTALL_PATH/installer/exec.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />
<args><arg value="$INSTALL_PATH" /><arg value="$INSTALL_PATH\I2Psvc.exe" /><arg value="-c" /><arg value="$INSTALL_PATH\wrapper.config" /></args></executable>
-->

View File

@ -73,6 +73,7 @@ rm -rf ./lib/wrapper
rm -f ./lib/*.dll
rm -f ./*.bat
rm -f ./*.exe
rm -rf ./installer
./i2prouter start
exit 0

View File

@ -23,40 +23,18 @@ wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
# i2p sdk, public domain/BSD/Cryptix
wrapper.java.classpath.1=lib/i2p.jar
# router, depends on i2p.jar, public domain
wrapper.java.classpath.2=lib/router.jar
# compiled jbigi libraries, contains static libGMP, lgpl
wrapper.java.classpath.3=lib/jbigi.jar
# sam bridge, public domain (depends on i2p.jar)
wrapper.java.classpath.4=lib/sam.jar
# ministreaming lib -interfaces for streaming, BSD (depends on i2p.jar)
wrapper.java.classpath.5=lib/mstreaming.jar
# full streaming lib, public domain (depends on mstreaming.jar, i2p.jar)
wrapper.java.classpath.6=lib/streaming.jar
# router console, public domain (depends on i2p.jar, router.jar)
wrapper.java.classpath.7=lib/routerconsole.jar
# i2ptunnel, GPL (depends on mstreaming.jar, i2p.jar)
wrapper.java.classpath.8=lib/i2ptunnel.jar
# jetty libraries (and dependencies), apache licensed
wrapper.java.classpath.9=lib/org.mortbay.jetty.jar
wrapper.java.classpath.10=lib/javax.servlet.jar
wrapper.java.classpath.11=lib/jasper-compiler.jar
wrapper.java.classpath.12=lib/jasper-runtime.jar
wrapper.java.classpath.13=lib/commons-logging.jar
wrapper.java.classpath.14=lib/commons-el.jar
# java service wrapper, BSD
wrapper.java.classpath.15=lib/wrapper.jar
# systray, LGPL
wrapper.java.classpath.16=lib/systray.jar
wrapper.java.classpath.17=lib/systray4j.jar
# BOB
wrapper.java.classpath.18=lib/BOB.jar
# desktopgui
wrapper.java.classpath.19=lib/appframework.jar
wrapper.java.classpath.20=lib/swing-worker.jar
wrapper.java.classpath.21=lib/desktopgui.jar
#
# Doing it this way means we can add new apps without asking people
# to update their wrapper.config.
# The downside is that we lose control over classpath order,
# This is fine for new installs (where the uninstall jars
# copy.jar, delete.jar, and exec.jar containing duplicate FileUtil
# classes, or all the classes of i2p.jar, are in a different directory).
# Be sure there are no other duplicate classes.
#
wrapper.java.classpath.1=lib/*.jar
# uncomment this to use the system classpath as well (e.g. to get tools.jar)
# wrapper.java.classpath.2=%CLASSPATH%
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=.