This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
j2me.xml
149 lines (107 loc) · 3.81 KB
/
j2me.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0" encoding="iso-8859-1" ?>
<project name="JavaGear" default="build" basedir=".">
<!-- Load properties file -->
<property file="build.properties" />
<!-- Setup Antenna properties -->
<property name="wtk.home" value="${WTK}"/>
<property name="wtk.midp.version" value="2.0"/>
<property name="wtk.mmapi.enabled" value="false"/>
<!-- Read Antenna Properties (http://antenna.sourceforge.net) -->
<taskdef resource="antenna.properties"/>
<!-- set global properties for this build -->
<property name="romtool" location="${basedir}/romtool"/>
<property name="jdk" value="${sun.boot.library.path}\..\lib\rt.jar" />
<property name="classpath" value="${java.class.path};${jdk}" />
<!-- Accuracy Label -->
<condition property="buildType" value="accurate" else="fast">
<equals arg1="${ACCURATE}" arg2="true" />
</condition>
<condition property="doObfuscate">
<equals arg1="${OBFUSCATE}" arg2="true" />
</condition>
<!-- Default filename -->
<condition property="baseName" value="JavaGearME_midp_${buildType}_${VERSION}">
<not>
<isset property="baseName" />
</not>
</condition>
<property name="jadPath" value="${basedir}/dist/${baseName}.jad" />
<property name="jarPath" value="${basedir}/dist/${baseName}.jar" />
<!-- Source files to compile -->
<patternset id="sourcePattern">
<include name="common/*.java" />
<include name="platforms/midp2/*.java" />
</patternset>
<target name="build">
<!-- Create a JAD file. -->
<wtkjad jadfile="${jadPath}"
jarfile="${jarPath}"
name="JavaGear"
vendor="Chris White"
version="${VERSION}">
<midlet name="JavaGear" class="JavaGear" icon="i.png" />
</wtkjad>
<delete dir="classes"/>
<mkdir dir="classes"/>
<!-- Compile everything, but don't preverify (yet). -->
<echo file="src/common/BuildSettings.java">
/* This file is autogenerated. Please do not edit manually */
public class BuildSettings
{
public final static String VERSION = "${VERSION}";
public final static boolean ACCURATE = ${ACCURATE};
}</echo>
<wtkbuild srcdir="src"
destdir="classes"
preverify="false"
target="1.1" source="1.3">
<patternset refid="sourcePattern" />
</wtkbuild>
<!-- Package everything. Most of the necessary information is
contained in the JAD file. Also preverify the result this
time. To obfuscate everything, set the corresponding
parameter to "true" (requires RetroGuard or ProGuard). The
version parameter increments the MIDlet-Version by one. -->
<wtkpackage jarfile="${jarPath}"
jadfile="${jadPath}"
obfuscate="false"
preverify="false">
<!-- Package our newly compiled classes. -->
<fileset dir="${basedir}/classes"/>
<!-- Package resources -->
<fileset dir="${basedir}/res"/>
</wtkpackage>
<wtkobfuscate
if="doObfuscate"
jarfile="${jarPath}"
jadfile="${jadPath}">
<argument value="-microedition"/>
</wtkobfuscate>
<!-- Preverify. -->
<wtkpreverify jarfile="${jarPath}"
jadfile="${jadPath}"/>
</target>
<target name="run">
<!-- Compile RomTool -->
<javac srcdir="${romtool}" destdir="${romtool}" source="1.3" target="1.1">
<bootclasspath path="${classpath}" />
</javac>
<!-- Add ROM to package -->
<java classname="RomTool"
failonerror="true"
fork="true"
classpath="${romtool}"
dir="${romtool}">
<!-- Catridge to compile -->
<arg value="${basedir}/rom/${ROM}" />
<!-- JAD of package -->
<arg value="${jadPath}" />
</java>
<!-- Start the MIDlet suite -->
<wtkrun
jadfile="${jadPath}"
device="DefaultColorPhone"
wait="true"
heapsize="4M"/>
</target>
</project>