build.xml: refactor "noExe check" to remove duplication

This commit is contained in:
kytv
2013-05-04 19:00:39 +00:00
parent 5e734088e3
commit 7527a02c60

View File

@@ -250,25 +250,41 @@
</copy>
</target>
<!-- this makes an empty build/launchi2p.jar and the build/i2p.exe for the no-wrapper windows startup, if possible -->
<target name="buildexe">
<condition property="noExe">
<or>
<os arch="ppc" />
<os arch="armv5tejl" />
<os arch="armv6l" />
<os arch="armv7l" />
</or>
</condition>
<condition property="noExe">
<not>
<condition property="noExe">
<not>
<!-- We only have launch4j binaries for the following systems -->
<and>
<or>
<os arch="x86" />
<os arch="i386" />
<os arch="i586" />
<os arch="i686" />
<os arch="amd64" />
<os arch="x86_64" />
</or>
<or>
<os name="Linux" />
<os family="windows" />
</or>
</not>
</condition>
<ant target="doBuildEXE" />
</and>
</not>
</condition>
<!-- this makes an empty build/launchi2p.jar and the build/i2p.exe for the no-wrapper windows startup, if possible -->
<target name="buildexe" depends="buildProperties, launch4j" unless="noExe">
<echo message="See the file &quot;build.properties&quot; if this step fails." />
<jar destfile="./build/launchi2p.jar">
<manifest>
<attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
<attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-compiler.jar lib/jasper-runtime.jar lib/commons-logging.jar lib/commons-el.jar lib/wrapper.jar lib/systray.jar lib/systray4j.jar lib/desktopgui.jar lib/i2psnark.jar lib/jrobin.jar lib/jstl.jar lib/standard.jar lib/jetty-continuation.jar lib/jetty-deploy.jar lib/jetty-http.jar lib/jetty-i2p.jar lib/jetty-io.jar lib/jetty-java5-threadpool.jar lib/jetty-rewrite-handler.jar lib/jetty-security.jar lib/jetty-servlet.jar lib/jetty-servlets.jar lib/jetty-sslengine.jar lib/jetty-start.jar lib/jetty-util.jar lib/jetty-webapp.jar lib/jetty-xml.jar" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
</manifest>
</jar>
<!-- now the standalone launcher exe -->
<launch4j configFile="./installer/i2pstandalone.xml" />
<!-- thazzit -->
</target>
<target name="launch4j">
@@ -277,23 +293,6 @@
classpath="${basedir}/installer/lib/launch4j/launch4j.jar:${basedir}/installer/lib/launch4j/lib/xstream.jar" />
</target>
<!-- this makes an empty build/launchi2p.jar and the build/i2p.exe for the no-wrapper windows startup -->
<target name="doBuildEXE" depends="buildProperties, launch4j" unless="noExe">
<echo message="See the file &quot;build.properties&quot; if this step fails." />
<jar destfile="./build/launchi2p.jar">
<manifest>
<attribute name="Main-Class" value="net.i2p.router.RouterLaunch" />
<attribute name="Class-Path" value="lib/i2p.jar lib/router.jar lib/jbigi.jar lib/BOB.jar lib/sam.jar lib/mstreaming.jar lib/streaming.jar lib/routerconsole.jar lib/i2ptunnel.jar lib/org.mortbay.jetty.jar lib/javax.servlet.jar lib/jasper-compiler.jar lib/jasper-runtime.jar lib/commons-logging.jar lib/commons-el.jar lib/wrapper.jar lib/systray.jar lib/systray4j.jar lib/desktopgui.jar lib/i2psnark.jar lib/jrobin.jar lib/jstl.jar lib/standard.jar lib/jetty-continuation.jar lib/jetty-deploy.jar lib/jetty-http.jar lib/jetty-i2p.jar lib/jetty-io.jar lib/jetty-java5-threadpool.jar lib/jetty-rewrite-handler.jar lib/jetty-security.jar lib/jetty-servlet.jar lib/jetty-servlets.jar lib/jetty-sslengine.jar lib/jetty-start.jar lib/jetty-util.jar lib/jetty-webapp.jar lib/jetty-xml.jar" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
</manifest>
</jar>
<!-- now the standalone launcher exe -->
<launch4j configFile="./installer/i2pstandalone.xml" />
<!-- thazzit -->
</target>
<target name="jar" depends="jarSmall" >
<copy file="apps/BOB/dist/BOB.jar" todir="build/" />
<copy file="apps/sam/java/build/sam.jar" todir="build/" />
@@ -1211,28 +1210,8 @@
<ant target="installerexe" />
</target>
<target name="installerexe" depends="launch4j">
<condition property="noExe">
<or>
<os arch="ppc" />
<os arch="armv5tejl" />
<os arch="armv6l" />
<os arch="armv7l" />
</or>
</condition>
<condition property="noExe">
<not>
<or>
<os name="Linux" />
<os family="windows" />
</or>
</not>
</condition>
<ant target="doInstallerEXE" />
</target>
<!-- this makes i2pinstall.exe from install.jar -->
<target name="doInstallerEXE" depends="launch4j" unless="noExe">
<target name="installerexe" depends="launch4j" unless="noExe">
<echo message="See the file &quot;build.properties&quot; if this step fails." />
<!-- now the installer exe -->
<launch4j configFile="./installer/i2pinstaller.xml" />