forked from jmc2obj/j-mc-2-obj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
59 lines (45 loc) · 2.67 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project jMc2Obj">
<target name="compile">
<javac srcdir="src" destdir="bin" target="1.7" source="1.7" includeantruntime="false"/>
<copy todir="bin">
<fileset dir="resources" />
</copy>
<copy todir="bin/org/jmc/gui">
<file file="src/org/jmc/gui/logo.png" />
</copy>
<copy todir="bin/conf">
<fileset dir="conf" includes="**" />
</copy>
</target>
<target name="create_run_jar" depends="compile">
<tstamp />
<loadproperties>
<file file="version.prop" />
</loadproperties>
<echo>version = ${version}</echo>
<propertyfile file="version.prop">
<entry key="version" default="0" type="int" operation="+" value="1" />
</propertyfile>
<echo message="<?xml version="1.0" encoding="UTF-8" standalone="no"?> " append="false" file="${basedir}/data/version.xml" />
<echo message="<version> " append="true" file="${basedir}/data/version.xml" />
<echo message=" <revision>${version}</revision> " append="true" file="${basedir}/data/version.xml" />
<echo message=" <date>${DSTAMP} ${TSTAMP}</date> " append="true" file="${basedir}/data/version.xml" />
<echo message="</version> " append="true" file="${basedir}/data/version.xml" />
<copy file="${basedir}/data/version.xml" tofile="${basedir}/bin/data/version.xml" overwrite="true" />
<jar destfile="${basedir}/JAR/jMc2Obj-dev_g${version}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="org.jmc.Main" />
<attribute name="Class-Path" value="." />
<attribute name="Implementation-Version" value="g${version}" />
<attribute name="Built-Date" value="${DSTAMP} ${TSTAMP}" />
</manifest>
<fileset dir="${basedir}/bin" />
</jar>
<echo message="<?xml version="1.0" encoding="UTF-8" standalone="no"?> " append="false" file="${basedir}/JAR/update.xml" />
<echo message="<update> " append="true" file="${basedir}/JAR/update.xml" />
<echo message=" <date>${DSTAMP} ${TSTAMP}</date> " append="true" file="${basedir}/JAR/update.xml" />
<echo message=" <url>http://jmc2obj.net/downloads/jMc2Obj-dev_g${version}.jar</url> " append="true" file="${basedir}/JAR/update.xml" />
<echo message="</update> " append="true" file="${basedir}/JAR/update.xml" />
</target>
</project>