2009-04-13 17:27:02 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="syndie" default="run" basedir=".">
|
2009-05-28 21:28:37 +00:00
|
|
|
<description>Builds, tests and runs the project syndie.</description>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
|
|
|
<!-- Set some global properties up -->
|
2009-05-28 21:28:37 +00:00
|
|
|
<property name="src.dir" value="src" />
|
|
|
|
<property name="build.dir" value="build" />
|
|
|
|
<property name="dist.dir" value="dist" />
|
|
|
|
<property name="lib.dir" value="lib" />
|
|
|
|
<property name="dist.lib.jar" value="${dist.dir}/syndie.jar" />
|
2009-04-13 17:27:02 +00:00
|
|
|
|
|
|
|
<!-- Set some classpaths up -->
|
2009-05-28 21:28:37 +00:00
|
|
|
<path id="classpath.build">
|
|
|
|
<fileset dir="${lib.dir}">
|
|
|
|
<include name="hsqldb.jar" />
|
|
|
|
<include name="i2p.jar" />
|
|
|
|
<include name="swt.jar" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
<path id="classpath.run">
|
|
|
|
<pathelement location="${dist.lib.jar}" />
|
|
|
|
<path refid="classpath.build" />
|
|
|
|
</path>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
|
|
|
<!-- Set up a fileset for the resources -->
|
2009-05-28 21:28:37 +00:00
|
|
|
<path id="resources.path">
|
|
|
|
<fileset dir="${src.dir}">
|
|
|
|
<exclude name="**/*.java" />
|
2011-05-30 16:16:29 +00:00
|
|
|
<exclude name="com/*.txt" />
|
2009-05-28 21:28:37 +00:00
|
|
|
<exclude name="MANIFEST.MF" />
|
|
|
|
</fileset>
|
|
|
|
</path>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
|
|
|
|
2009-05-28 21:28:37 +00:00
|
|
|
<target name="init">
|
|
|
|
<tstamp />
|
|
|
|
<mkdir dir="${dist.dir}" />
|
|
|
|
<mkdir dir="${build.dir}" />
|
|
|
|
</target>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
2009-05-28 21:28:37 +00:00
|
|
|
<target name="compile" depends="init" description="compile the source">
|
2011-06-01 15:36:04 +00:00
|
|
|
<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" source="1.5" target="1.5"
|
|
|
|
deprecation="on" includeAntRuntime="false" >
|
2009-05-28 21:28:37 +00:00
|
|
|
<classpath>
|
|
|
|
<path refid="classpath.build" />
|
|
|
|
</classpath>
|
|
|
|
</javac>
|
|
|
|
<copy todir="${build.dir}">
|
|
|
|
<path refid="resources.path" />
|
|
|
|
</copy>
|
|
|
|
</target>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
2009-05-28 21:28:37 +00:00
|
|
|
<target name="jar" depends="compile" description="generate the jar file">
|
|
|
|
<jar jarfile="${dist.lib.jar}" basedir="${build.dir}" />
|
|
|
|
</target>
|
2009-05-23 18:41:24 +00:00
|
|
|
|
2009-05-28 21:28:37 +00:00
|
|
|
<target name="dist" depends="jar" description="Combine all jars">
|
|
|
|
<jar jarfile="syndie.jar" index="true">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="syndie.gui.SWTUI"/>
|
|
|
|
</manifest>
|
|
|
|
<zipfileset src="${dist.lib.jar}" includes="**" />
|
|
|
|
<zipgroupfileset dir="lib" includes="*.jar"/>
|
|
|
|
</jar>
|
|
|
|
</target>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
2009-05-28 21:28:37 +00:00
|
|
|
<target name="run" depends="jar" description="run syndie">
|
|
|
|
<condition property="run.args" value="">
|
|
|
|
<not>
|
|
|
|
<isset property="run.args" />
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
<java classname="syndie.gui.SWTUI" fork="true" failonerror="false">
|
|
|
|
<arg line="${run.args}" />
|
|
|
|
<classpath>
|
|
|
|
<path refid="classpath.run" />
|
|
|
|
</classpath>
|
|
|
|
</java>
|
|
|
|
</target>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
2010-03-02 00:09:09 +00:00
|
|
|
<target name="plugin" depends="jar">
|
|
|
|
<mkdir dir="plugin/lib" />
|
|
|
|
|
|
|
|
<exec executable="grep" outputproperty="versionLine" failonerror="true" >
|
|
|
|
<arg value="public static final String VERSION" />
|
|
|
|
<arg value="src/syndie/Version.java" />
|
|
|
|
</exec>
|
|
|
|
<exec executable="cut" inputstring="${versionLine}" outputproperty="release.number" failonerror="true" >
|
|
|
|
<arg value="-f2" />
|
|
|
|
<arg value="-d"" />
|
|
|
|
</exec>
|
|
|
|
<buildnumber file="scripts/build.number" />
|
|
|
|
|
2011-05-28 13:51:44 +00:00
|
|
|
<!-- make the update linux xpi2p, this is for both 32 and 64 bit -->
|
2010-03-03 00:20:57 +00:00
|
|
|
<delete file="plugin/lib/hsqldb.jar.pack" />
|
|
|
|
<delete file="plugin/lib/swt.jar.pack" />
|
2010-03-02 00:09:09 +00:00
|
|
|
<copy file="LICENSE" todir="plugin" />
|
2011-05-30 16:16:29 +00:00
|
|
|
<copy file="src/com/LICENSE.txt" tofile="plugin/LICENSE-jazzy.txt" />
|
|
|
|
<copy file="LICENSE-EPL-v1.0.html" tofile="plugin/LICENSE-icons.html" />
|
2010-03-02 00:09:09 +00:00
|
|
|
<copy file="logger.config" todir="plugin" />
|
2010-03-03 00:20:57 +00:00
|
|
|
<copy file="scripts/plugin-linux.config" tofile="plugin/plugin.config" overwrite="true" />
|
|
|
|
<copy file="scripts/clients-linux.config" tofile="plugin/clients.config" overwrite="true" />
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="update-only=true" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="pack200" failonerror="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="-g" />
|
|
|
|
<arg value="plugin/lib/syndie.jar.pack" />
|
|
|
|
<arg value="${dist.dir}/syndie.jar" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="scripts/makeplugin.sh" failonerror="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="plugin" />
|
|
|
|
</exec>
|
2010-03-03 00:20:57 +00:00
|
|
|
<move file="syndie.xpi2p" tofile="syndie-linux-i386-update.xpi2p" />
|
|
|
|
|
|
|
|
<!-- make the windows update xpi2p -->
|
|
|
|
<copy file="scripts/plugin-windows.config" tofile="plugin/plugin.config" overwrite="true" />
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
2010-03-03 00:20:57 +00:00
|
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
2010-03-03 00:20:57 +00:00
|
|
|
<arg value="update-only=true" />
|
|
|
|
</exec>
|
|
|
|
<copy file="scripts/clients-windows.config" tofile="plugin/clients.config" overwrite="true" />
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="scripts/makeplugin.sh" failonerror="true">
|
2010-03-03 00:20:57 +00:00
|
|
|
<arg value="plugin" />
|
|
|
|
</exec>
|
|
|
|
<move file="syndie.xpi2p" tofile="syndie-win32-update.xpi2p" />
|
2010-03-02 00:09:09 +00:00
|
|
|
|
|
|
|
<!-- make the install xpi2p -->
|
|
|
|
<copy file="lib/hsqldb_lic.txt" todir="plugin" />
|
2010-03-05 18:39:14 +00:00
|
|
|
<copy file="scripts/LICENSE-swt.txt" todir="plugin" />
|
2010-03-03 00:20:57 +00:00
|
|
|
<copy file="scripts/plugin-linux.config" tofile="plugin/plugin.config" overwrite="true" />
|
|
|
|
<copy file="scripts/clients-linux.config" tofile="plugin/clients.config" overwrite="true" />
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="pack200" failonerror="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="-g" />
|
|
|
|
<arg value="plugin/lib/hsqldb.jar.pack" />
|
|
|
|
<arg value="${lib.dir}/hsqldb.jar" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="pack200" failonerror="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="-g" />
|
|
|
|
<arg value="plugin/lib/swt.jar.pack" />
|
|
|
|
<arg value="${lib.dir}/swt.jar" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="scripts/makeplugin.sh" failonerror="true">
|
2010-03-02 00:09:09 +00:00
|
|
|
<arg value="plugin" />
|
|
|
|
</exec>
|
2010-03-03 00:20:57 +00:00
|
|
|
<move file="syndie.xpi2p" tofile="syndie-linux-i386.xpi2p" />
|
|
|
|
|
2010-03-08 01:31:12 +00:00
|
|
|
<!-- make the 64 bit linux install xpi2p -->
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="pack200" failonerror="true">
|
2010-03-08 01:31:12 +00:00
|
|
|
<arg value="-g" />
|
|
|
|
<arg value="plugin/lib/swt.jar.pack" />
|
|
|
|
<arg value="${lib.dir}/swt-linux-x86-64.jar" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="scripts/makeplugin.sh" failonerror="true">
|
2010-03-08 01:31:12 +00:00
|
|
|
<arg value="plugin" />
|
|
|
|
</exec>
|
|
|
|
<move file="syndie.xpi2p" tofile="syndie-linux-x86-64.xpi2p" />
|
|
|
|
|
2010-03-03 00:20:57 +00:00
|
|
|
<!-- make the windows install xpi2p -->
|
|
|
|
<copy file="scripts/plugin-windows.config" tofile="plugin/plugin.config" overwrite="true" />
|
|
|
|
<copy file="scripts/clients-windows.config" tofile="plugin/clients.config" overwrite="true" />
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
2010-03-03 00:20:57 +00:00
|
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="pack200" failonerror="true">
|
2010-03-03 00:20:57 +00:00
|
|
|
<arg value="-g" />
|
|
|
|
<arg value="plugin/lib/swt.jar.pack" />
|
|
|
|
<arg value="${lib.dir}/swt-win32.jar" />
|
|
|
|
</exec>
|
2010-03-21 15:47:11 +00:00
|
|
|
<exec executable="scripts/makeplugin.sh" failonerror="true">
|
2010-03-03 00:20:57 +00:00
|
|
|
<arg value="plugin" />
|
|
|
|
</exec>
|
|
|
|
<move file="syndie.xpi2p" tofile="syndie-win32.xpi2p" />
|
|
|
|
|
2010-03-02 00:09:09 +00:00
|
|
|
</target>
|
2009-04-13 17:27:02 +00:00
|
|
|
|
|
|
|
|
2009-05-28 21:28:37 +00:00
|
|
|
<target name="clean" description="clean up">
|
|
|
|
<delete dir="${build.dir}" />
|
|
|
|
<delete dir="${dist.dir}" />
|
2010-03-05 18:39:14 +00:00
|
|
|
<delete dir="plugin" />
|
2010-03-02 00:09:09 +00:00
|
|
|
<delete file="syndie.xpi2p" />
|
|
|
|
<delete file="syndie-update.xpi2p" />
|
2010-03-21 15:47:11 +00:00
|
|
|
<delete file="syndie-win32.xpi2p" />
|
|
|
|
<delete file="syndie-win32-update.xpi2p" />
|
2011-05-28 13:51:44 +00:00
|
|
|
<delete file="syndie-linux-i386.xpi2p" />
|
|
|
|
<delete file="syndie-linux-i386-update.xpi2p" />
|
2010-03-21 15:47:11 +00:00
|
|
|
<delete file="syndie-linux-x86-64.xpi2p" />
|
2009-05-28 21:28:37 +00:00
|
|
|
</target>
|
2009-04-13 17:27:02 +00:00
|
|
|
</project>
|