-
Notifications
You must be signed in to change notification settings - Fork 10
/
blackberry.xml
126 lines (102 loc) · 4.33 KB
/
blackberry.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
<project name="Hecl Blackberry" default="build">
<!-- To compile the Blackberry code: ant -propertyfile ./blackberry.properties blackberry -->
<!-- In order for this to work, you need to edit the blackberry.properties file to indicate the
location of the BlackBerry JDE and the simulator. -->
<target name="blackberry"
description="Create BlackBerry Hecl"
depends="">
<antcall target="blackberryCod">
<param name="scriptname" value="blackberry/script.hcl"/>
<param name="codename" value="Hecl"/>
<param name="j2me.app" value="Hecl"/>
</antcall>
<antcall target="blackberryCod">
<param name="scriptname" value="blackberry/heclfile.hcl"/>
<param name="codename" value="HeclFile"/>
<param name="j2me.app" value="HeclFile"/>
</antcall>
</target>
<target name="bbjdeversion" description="Tool to fetch JDE version">
<javac srcdir="build-tools" destdir="build-tools" includes="BBJDEVersion.java">
</javac>
<java classname="BBJDEVersion" classpath="build-tools" outputproperty="jde.version">
<arg value="${jde.home}/bin/rapc.jar"></arg>
</java>
<echo message="BlackBerry JDE Version ${jde.version}"></echo>
</target>
<target name="blackberryCompile"
description="Compile BlackBerry version of J2ME code"
depends="bbjdeversion,j2meLibs,midpgui,extras">
<mkdir dir="${j2me.guiclasspath}"/>
<mkdir dir="${j2me.pre}/midp${wtk.midp.version}"/>
<copy file="midp20/hecl_logo.png" todir="${j2me.build}" overwrite="true"/>
<wtkpreprocess
srcdir="blackberry"
symbols="${j2me.defines},jdeversion=${jde.version}"
destdir="${j2me.pre}/blackberry"/>
<wtkpreprocess
srcdir="blackberrygui"
symbols="${j2me.defines},jdeversion=${jde.version}"
destdir="${j2me.pre}/blackberry"/>
<wtkbuild srcdir="${j2me.pre}/blackberry" target="1.1" source="1.2"
cldc="false"
destdir="${j2me.guiclasspath}">
<classpath refid="j2me.coreclasspath"/>
<classpath path="${jde.home}/lib/net_rim_api.jar"></classpath>
</wtkbuild>
</target>
<target name="blackberryCod" depends="blackberryCompile">
<mkdir dir="${bb.rel}"/>
<wtkjad
name="${j2me.app}"
version="${j2me.appversion}"
vendor="${j2me.vendor}"
jadfile="${j2me.hecl.jad}"
jarfile="${j2me.hecl.jar}">
<midlet name="${j2me.app}" icon="${j2me.icon}" class="${j2me.entryclass}"/>
<attribute name="MicroEdition-Profile" value="MIDP-${wtk.midp.version}"/>
<attribute name="MicroEdition-Configuration" value="CLDC-${wtk.cldc.version}"/>
</wtkjad>
<condition property="midpdir" value="midp10" else="midp20">
<equals arg1="1.0" arg2="${wtk.midp.version}"/>
</condition>
<copy file="${scriptname}" tofile="${j2me.build}/script.hcl" overwrite="true"/>
<copy file="${midpdir}/Hecl.png" todir="${j2me.build}" overwrite="true"/>
<wtkpackage
basedir="${j2me.build}"
excludes="pre/**,**jad,**jar"
jadfile="${j2me.hecl.jad}"
jarfile="${j2me.hecl.jar}"
cldc="false"
classpath="${jde.home}/lib/net_rim_api.jar"
preverify="${preverify}"
obfuscate="false"
verbose="false">
<!-- obfuscate="${obfuscate}" -->
<preserve class="Hecl { <methods>; }" />
<manifest>
<attribute name="MIDlet-Name" value="Hecl"/>
<attribute name="MIDlet-Vendor" value="dedasys"/>
<attribute name="MIDlet-Version" value="2.0"/>
<attribute name="MIDlet-Permissions" value="javax.microedition.io.Connector.http"/>
<attribute name="MIDlet-1" value="Hecl, Hecl.png, Hecl"/>
<attribute name="MIDlet-Jar-URL" value="Hecl.jar"/>
<attribute name="MicroEdition-Profile" value="MIDP-${wtk.midp.version}"/>
<attribute name="MicroEdition-Configuration" value="CLDC-${wtk.cldc.version}"/>
</manifest>
</wtkpackage>
<java jar="${jde.home}/bin/rapc.jar" fork="true" dir="${bb.rel}">
<arg value="import=${jde.home}/lib/net_rim_api.jar"></arg>
<arg value="codename=${codename}"></arg>
<arg value="-midlet"></arg>
<arg value="../../${j2me.hecl.jad}"></arg>
<arg value="../../${j2me.hecl.jar}"></arg>
</java>
</target>
<target name="bb-sign">
<java jar="${jde.home}/bin/SignatureTool.jar" fork="true">
<arg value="-c"/>
<arg value="jars/blackberry/*.cod"/>
</java>
</target>
</project>