-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
102 lines (88 loc) · 2.79 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="UTF-8"?>
<project name="Wine" default="build">
<property file="build.properties"/>
<property name="rim-api-jar" value="${RIM-home}/lib/net_rim_api.jar"/>
<property name="rim-rapc-jar" value="${RIM-home}/bin/rapc.jar"/>
<property name="wtk-preverify" value="${WTK-home}/bin/preverify1.1"/>
<target name="init">
<tstamp/>
<fail message="Please set 'RIM-home' in build.properties">
<condition>
<not>
<available file="${RIM-home}" type="dir"/>
</not>
</condition>
</fail>
<fail message="Please set 'WTK-home' in build.properties">
<condition>
<not>
<available file="${WTK-home}" type="dir"/>
</not>
</condition>
</fail>
<fail message="Please set 'JSON-ME' in build.properties">
<condition>
<not>
<available file="${JSON-ME}" type="file"/>
</not>
</condition>
</fail>
</target>
<target name="build" depends="init">
<mkdir dir="build"/>
<javac srcdir="src"
destdir="build"
source="1.2"
target="1.2"
bootclasspath="${rim-api-jar}"
optimize="true"
debug="true"
deprecation="true"
fork="true">
<classpath>
<pathelement location="${JSON-ME}"/>
</classpath>
</javac>
<unzip src="${JSON-ME}" dest="build"/>
<mkdir dir="build-j2me"/>
<exec executable="${wtk-preverify}" failonerror="true">
<arg line="-classpath '${rim-api-jar}' -d build-j2me build"/>
</exec>
<copy todir="build-j2me">
<fileset dir=".">
<include name="res/**"/>
</fileset>
</copy>
<copy file="HelloReddit.jad.template" tofile="HelloReddit.jad" overwrite="true">
<filterset>
<filter token="VERSION" value="${version}"/>
</filterset>
</copy>
<copy file="HelloReddit.alx.template" tofile="HelloReddit.alx" overwrite="true">
<filterset>
<filter token="VERSION" value="${version}"/>
</filterset>
</copy>
<jar jarfile="temp.jar" basedir="build-j2me"/>
<java jar="${rim-rapc-jar}" fork="true">
<arg value="import=${rim-api-jar}"/>
<arg value="jad=HelloReddit.jad"/>
<arg value="codename=HelloReddit"/>
<arg value="temp.jar"/>
</java>
<echo>Remember to sign the .cod file!</echo>
</target>
<target name="clean">
<delete dir="bin"/>
<delete dir="build"/>
<delete dir="build-j2me"/>
<delete file="temp.jar"/>
<delete file="HelloReddit.cod"/>
<delete file="HelloReddit.csl"/>
<delete file="HelloReddit.cso"/>
<delete file="HelloReddit.debug"/>
<delete file="HelloReddit.jad"/>
<delete file="HelloReddit.jar"/>
<delete file="LogFile.txt"/>
</target>
</project>