-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
73 lines (61 loc) · 2.49 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" encoding="UTF-8"?>
<project default="zip">
<property name="appname" value="stlviewer" />
<property name="version" value="0.10.0" />
<property name="tgtjarfile" value="${appname}.jar" />
<property name="tgtzipfile" value="${appname}-${version}.zip" />
<path id="classpath">
<pathelement path="libs/j3dcore.jar"/>
<pathelement path="libs/j3dutils.jar"/>
<pathelement path="libs/vecmath.jar"/>
<pathelement path="libs/jogamp-fat.jar"/>
<pathelement path="libs/commons-cli-1.5.0.jar"/>
<pathelement path="libs/log4j-api-2.17.2.jar"/>
<pathelement path="libs/log4j-core-2.17.2.jar"/>
<pathelement path="libs/"/>
</path>
<target name="clean">
<delete dir="bin"/>
<delete file="${tgtjarfile}"/>
<delete file="dist/${tgtzipfile}"/>
</target>
<target name="compile">
<mkdir dir="bin"/>
<javac srcdir="src" destdir="bin" source="11" target="11">
<classpath refid="classpath" />
</javac>
<copy todir="bin/images">
<fileset dir="src/images" excludes="**/*.java"/>
</copy>
<copy file="src/org/stlviewer/copyright.htm"
tofile="bin/org/stlviewer/copyright.htm"/>
</target>
<target name="jar" depends="compile">
<manifestclasspath property="jar.classpath" jarfile="${tgtjarfile}">
<classpath refid="classpath" />
</manifestclasspath>
<jar destfile="${tgtjarfile}" basedir="bin">
<manifest>
<attribute name="Main-Class" value="org.stlviewer.STLViewer"/>
<attribute name="Class-Path" value="${jar.classpath}" />
</manifest>
</jar>
</target>
<target name="dist" depends="jar">
<mkdir dir="dist"/>
<zip destfile="dist/${tgtzipfile}">
<zipfileset dir="libs" prefix="${appname}-${version}/libs"/>
<zipfileset dir="web" prefix="${appname}-${version}/web"/>
<zipfileset dir="." prefix="${appname}-${version}">
<include name="${tgtjarfile}"/>
<include name="README.md"/>
<include name="README.htm"/>
<include name="license.txt"/>
<include name="attributions.txt"/>
</zipfileset>
</zip>
</target>
<target name="run" depends="jar">
<java jar="${tgtjarfile}" fork="true"/>
</target>
</project>