[507] | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
---|
| 2 | <project basedir="." default="build" name="Expeditee">
|
---|
[216] | 3 |
|
---|
[507] | 4 | <tstamp>
|
---|
| 5 | <format property="TODAY_EXP" pattern="yy.MM.dd"/>
|
---|
| 6 | </tstamp>
|
---|
[216] | 7 |
|
---|
[507] | 8 | <property environment="env"/>
|
---|
[216] | 9 |
|
---|
[507] | 10 | <property name="dist.dir.exp" location="releases" />
|
---|
[510] | 11 | <!--
|
---|
| 12 | <property name="dist.filename.exp" value="Exp.${TODAY_EXP}.jar" />
|
---|
| 13 | -->
|
---|
[647] | 14 | <property name="dist.filename.exp" value="Expeditee.jar" />
|
---|
| 15 | <property name="build.dir.exp" location="bin" />
|
---|
[527] | 16 | <property name="manifest.path.exp" value="makeFiles/Manifest.txt" />
|
---|
[647] | 17 | <property name="lib.dir.exp" location="releases/jars" />
|
---|
[528] | 18 | <property name="inst.dir.exp" location="inst" />
|
---|
[216] | 19 |
|
---|
[651] | 20 | <!--
|
---|
| 21 | If changing this value, make sure you run `ant clean`
|
---|
| 22 | -->
|
---|
[995] | 23 | <property name="javac.source" value="1.8" />
|
---|
[647] | 24 | <property name="javac.target" value="${javac.source}" />
|
---|
[872] | 25 |
|
---|
[647] | 26 | <property name="expeditee.server.port" value="3000"/>
|
---|
| 27 |
|
---|
[527] | 28 | <union id="portable.includes.exp">
|
---|
[507] | 29 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/junit.jar"/>
|
---|
| 30 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/activation.jar"/>
|
---|
| 31 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/cobra.jar"/>
|
---|
| 32 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/iText-2.1.3.jar"/>
|
---|
| 33 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/jcommon-1.0.13.jar"/>
|
---|
| 34 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/JEP.jar"/>
|
---|
| 35 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/JFreeCharts.jar"/>
|
---|
| 36 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/js.jar"/>
|
---|
[1078] | 37 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/jython-standalone-2.7.0.jar"/>
|
---|
[507] | 38 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/lobo.jar"/>
|
---|
| 39 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/lobo-pub.jar"/>
|
---|
| 40 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/mail.jar"/>
|
---|
| 41 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/xercesImpl.jar"/>
|
---|
| 42 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/jazzy-core.jar"/>
|
---|
| 43 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/PDFRenderer-0.9.1.jar"/>
|
---|
[858] | 44 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/json-simple-1.1.1.jar"/>
|
---|
[995] | 45 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/commons-cli-1.2.jar"/>
|
---|
[872] | 46 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/jgraphx.jar"/>
|
---|
[995] | 47 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/svgSalamander.jar"/>
|
---|
[1014] | 48 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/jl1.0.1.jar"/>
|
---|
| 49 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/tritonus_share.jar"/>
|
---|
| 50 | <zipfileset excludes="META-INF/*.SF" src="releases/jars/mp3spi1.9.5.jar"/>
|
---|
[507] | 51 | </union>
|
---|
[216] | 52 |
|
---|
[527] | 53 | <path id="classpath.exp">
|
---|
| 54 | <fileset dir="${lib.dir.exp}">
|
---|
| 55 | <include name="*.jar" />
|
---|
[531] | 56 | <include name="ext/*.jar" />
|
---|
[527] | 57 | </fileset>
|
---|
[216] | 58 | </path>
|
---|
[748] | 59 |
|
---|
| 60 | <path id="classpath.jfx">
|
---|
| 61 | <!-- Check this points to an existing file, if you can't find the jar just compile with build-nojfx -->
|
---|
| 62 | <pathelement location="${java.home}/lib/jfxrt.jar"/>
|
---|
| 63 | </path>
|
---|
[216] | 64 |
|
---|
[507] | 65 | <target name="clean">
|
---|
| 66 | <!-- delete only the class files built by expeditee -->
|
---|
| 67 | <delete dir="${build.dir.exp}/org"/>
|
---|
[528] | 68 | <delete dir="${inst.dir.exp}" />
|
---|
[216] | 69 | </target>
|
---|
[507] | 70 | <target depends="clean" name="cleanall"/>
|
---|
| 71 |
|
---|
| 72 | <target name="init">
|
---|
| 73 | <echo message="${ant.project.name}: ${ant.file}"/>
|
---|
| 74 | <mkdir dir="${build.dir.exp}"/>
|
---|
| 75 | <copy includeemptydirs="false" todir="${build.dir.exp}">
|
---|
| 76 | <fileset dir="src">
|
---|
| 77 | <exclude name="**/*.java"/>
|
---|
| 78 | </fileset>
|
---|
| 79 | </copy>
|
---|
| 80 | <copy includeemptydirs="false" todir="${build.dir.exp}">
|
---|
| 81 | <fileset dir="tests">
|
---|
| 82 | <exclude name="**/*.java"/>
|
---|
| 83 | </fileset>
|
---|
| 84 | </copy>
|
---|
[216] | 85 | </target>
|
---|
[748] | 86 |
|
---|
[507] | 87 | <target depends="init" name="build">
|
---|
[995] | 88 | <javac source="${javac.source}" target="${javac.target}" debug="true"
|
---|
[647] | 89 | destdir="${build.dir.exp}" includeantruntime="false">
|
---|
[748] | 90 |
|
---|
[507] | 91 | <src path="src"/>
|
---|
| 92 | <src path="tests"/>
|
---|
[748] | 93 |
|
---|
[507] | 94 | <exclude name="org/expeditee/items/widgets/WebBrowser.java"/>
|
---|
[1115] | 95 |
|
---|
| 96 | <!-- After refactoring for JavaFX, the following files no longer compile -->
|
---|
| 97 | <!-- Check with Corey, and if no longer needed, they should be removed -->
|
---|
| 98 | <exclude name="org/expeditee/gui/FrameKeyboardActions.java" />
|
---|
| 99 | <exclude name="org/expeditee/gui/FrameMouseActions.java" />
|
---|
| 100 | <exclude name="org/apollo/AudioFrameKeyboardActions.java" />
|
---|
| 101 | <exclude name="org/apollo/AudioFrameMouseActions.java" />
|
---|
| 102 | <exclude name="org/expeditee/importer/FrameDNDTransferHandler.java" />
|
---|
| 103 | <exclude name="org/apollo/util/PopupReaper.java" />
|
---|
| 104 |
|
---|
| 105 | <!-- After refactoring for JavaFX, the following test files no longer compile -->
|
---|
| 106 | <exclude name="org/expeditee/gui/FrameKeyboardsActionsTest.java" />
|
---|
| 107 | <exclude name="org/expeditee/gui/FrameMouseActionsTest.java" />
|
---|
| 108 | <exclude name="org/expeditee/gui/FrameTest.java" />
|
---|
| 109 | <exclude name="org/expeditee/gui/DisplayIOTest.java" />
|
---|
| 110 | <exclude name="org/expeditee/gui/FreeItemsTest.java" />
|
---|
| 111 | <exclude name="org/expeditee/io/ConversionTest.java" />
|
---|
| 112 | <exclude name="org/expeditee/items/LineTest.java" />
|
---|
| 113 | <exclude name="org/expeditee/items/widgets/InteractiveWidgetTest.java" />
|
---|
| 114 |
|
---|
[748] | 115 | <classpath>
|
---|
| 116 | <path refid="classpath.exp"/>
|
---|
| 117 |
|
---|
| 118 | <!-- jfxrt.jar path -->
|
---|
| 119 | <path refid="classpath.jfx"/>
|
---|
| 120 | </classpath>
|
---|
| 121 | </javac>
|
---|
| 122 | </target>
|
---|
| 123 |
|
---|
| 124 | <target depends="init" name="build-nojfx">
|
---|
| 125 | <javac source="${javac.source}" target="${javac.target}" debug="false"
|
---|
| 126 | destdir="${build.dir.exp}" includeantruntime="false">
|
---|
| 127 |
|
---|
| 128 | <src path="tests"/>
|
---|
| 129 | <src path="src"/>
|
---|
| 130 | <exclude name="org/expeditee/items/widgets/WebBrowser.java"/>
|
---|
| 131 |
|
---|
| 132 | <!-- Files that rely on JavaFX. Use build to build with them included -->
|
---|
| 133 | <exclude name="org/expeditee/items/widgets/JfxBrowser.java"/>
|
---|
| 134 | <exclude name="org/expeditee/io/WebParser.java"/>
|
---|
[925] | 135 | <exclude name="org/expeditee/items/widgets/JfxMedia.java"/>
|
---|
[748] | 136 | <exclude name="org/expeditee/actions/JfxBrowserActions.java"/>
|
---|
| 137 |
|
---|
[527] | 138 | <classpath refid="classpath.exp"/>
|
---|
[216] | 139 | </javac>
|
---|
| 140 | </target>
|
---|
[748] | 141 |
|
---|
| 142 |
|
---|
| 143 |
|
---|
[1004] | 144 | <target depends="build" name="jar-cwd"> <!-- version to run if current working directory (cwd) same as jar -->
|
---|
[527] | 145 | <jar destfile="${dist.dir.exp}/${dist.filename.exp}" manifest="${manifest.path.exp}">
|
---|
| 146 | <manifest>
|
---|
[1067] | 147 | <attribute name="Main-Class" value="org.apollo.ApolloSystem"/>
|
---|
[527] | 148 | <attribute name="Class-Path" value="."/>
|
---|
| 149 | </manifest>
|
---|
| 150 | <fileset dir="${build.dir.exp}">
|
---|
| 151 | <exclude name="src/**"/>
|
---|
| 152 | </fileset>
|
---|
| 153 | </jar>
|
---|
| 154 | </target>
|
---|
[1004] | 155 | <target depends="build" name="jar"> <!-- self-contained, portable jar -->
|
---|
[507] | 156 | <jar destfile="${dist.dir.exp}/${dist.filename.exp}" filesetmanifest="mergewithoutmain">
|
---|
| 157 | <manifest>
|
---|
[1067] | 158 | <attribute name="Main-Class" value="org.apollo.ApolloSystem"/>
|
---|
[507] | 159 | <attribute name="Class-Path" value="."/>
|
---|
| 160 | </manifest>
|
---|
| 161 | <fileset dir="${build.dir.exp}">
|
---|
| 162 | <exclude name="src/**"/>
|
---|
| 163 | </fileset>
|
---|
[527] | 164 | <resources refid="portable.includes.exp" />
|
---|
[507] | 165 | </jar>
|
---|
[216] | 166 | </target>
|
---|
[528] | 167 | <target depends="jar" name="inst">
|
---|
| 168 | <mkdir dir="${inst.dir.exp}" />
|
---|
| 169 | <mkdir dir="${inst.dir.exp}/jars" />
|
---|
| 170 | <copy file="${dist.dir.exp}/${dist.filename.exp}" tofile="${inst.dir.exp}/${dist.filename.exp}" />
|
---|
| 171 | <copy todir="${inst.dir.exp}/jars">
|
---|
[531] | 172 | <path refid="classpath.exp" />
|
---|
[528] | 173 | </copy>
|
---|
| 174 | </target>
|
---|
| 175 |
|
---|
[507] | 176 | <target name="run">
|
---|
[1067] | 177 | <java classname="org.apollo.ApolloSystem" failonerror="true" fork="yes">
|
---|
[510] | 178 | <classpath>
|
---|
[748] | 179 | <path refid="classpath.exp"/>
|
---|
| 180 |
|
---|
| 181 | <!-- jfxrt.jar path -->
|
---|
| 182 | <path refid="classpath.jfx"/>
|
---|
| 183 |
|
---|
[507] | 184 | <pathelement location="${build.dir.exp}"/>
|
---|
| 185 | </classpath>
|
---|
| 186 | </java>
|
---|
[216] | 187 | </target>
|
---|
[498] | 188 |
|
---|
[995] | 189 | <target name="run-fresh">
|
---|
[1067] | 190 | <java classname="org.apollo.ApolloSystem" failonerror="true" fork="yes">
|
---|
[995] | 191 | <classpath refid="classpath.exp"/>
|
---|
| 192 | <classpath>
|
---|
| 193 | <pathelement location="${build.dir.exp}"/>
|
---|
| 194 | </classpath>
|
---|
| 195 | <jvmarg value="-Dexpeditee.home=${user.dir}/expeditee-fresh"/>
|
---|
| 196 | </java>
|
---|
| 197 | </target>
|
---|
[647] | 198 |
|
---|
[1265] | 199 | <target name="run-fresh-login">
|
---|
| 200 | <java classname="org.apollo.ApolloSystem" failonerror="true" fork="yes">
|
---|
| 201 | <classpath refid="classpath.exp"/>
|
---|
| 202 | <classpath>
|
---|
| 203 | <pathelement location="${build.dir.exp}"/>
|
---|
| 204 | </classpath>
|
---|
| 205 | <jvmarg value="-Dexpeditee.home=${user.dir}/expeditee-fresh"/>
|
---|
| 206 | <jvmarg value="-Dauth=true"/>
|
---|
| 207 | </java>
|
---|
| 208 | </target>
|
---|
[995] | 209 |
|
---|
| 210 |
|
---|
| 211 |
|
---|
[1265] | 212 |
|
---|
[647] | 213 | <target name="run-server">
|
---|
| 214 | <echo>Launching Command-line Expeditee Server on port ${expeditee.server.port}</echo>
|
---|
| 215 | <java classname="org.expeditee.network.FrameShare" failonerror="true" fork="yes">
|
---|
| 216 | <classpath refid="classpath.exp"/>
|
---|
| 217 | <classpath>
|
---|
| 218 | <pathelement location="${build.dir.exp}"/>
|
---|
| 219 | </classpath>
|
---|
| 220 | <jvmarg value="-Dexpeditee.home=${user.dir}/expeditee-home"/>
|
---|
| 221 | <arg value="${expeditee.server.port}"/>
|
---|
| 222 | </java>
|
---|
| 223 | </target>
|
---|
[498] | 224 | </project>
|
---|