-
Notifications
You must be signed in to change notification settings - Fork 10
/
build-release.xml
188 lines (181 loc) · 8.23 KB
/
build-release.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!--
This creates the LWUIT release in Series-40-binaries folder
folder structure:
bin
doc
examples
resourceEditor
bin:
contains binaries for different sdks, these binaries are
created by S40 project. It also contains IO folder with IO binaries.
doc:
contains javadocs and lwuit developer's guide pdf
these are copied from the docs folder
examples:
contains lwuit examples from Apps folder
resourceEditor:
contains the resourceEditor binary.
This is copied from the tools/Lwuit-ResourceEditor folder
Note! the resourceeditor target will only call maven to build the
resourceeditor. If you get any compile errors check the build-instructions
from the tools/Lwuit-ResourceEditor folder. After you can build
the ResourceEditor without problems you can use this script.
-->
<project name="LWUIT-Release" default="dist" basedir=".">
<property name="examples" location="Apps" />
<property name="docs" location="docs" />
<property name="javadocs" location="${docs}/javadocs" />
<property name="devguide" location="${docs}/LWUIT_Developer_Guide.pdf" />
<property name="releasepath" location="Series-40-binaries" />
<property name="releasenotes" location="releasenotes" />
<property name="s40port" location="Ports/Nokia/S40" />
<property name="RE" location="tools/Lwuit-ResourceEditor" />
<property name="IO" location="IO" />
<property name="IO-MIDP" location="Ports/MIDP/IO_MIDP" />
<property name="package-version" value="1.0" />
<target name="init">
<mkdir dir="${releasepath}" />
<mkdir dir="${releasepath}/bin" />
<mkdir dir="${releasepath}/doc" />
<mkdir dir="${releasepath}/examples" />
<mkdir dir="${releasepath}/resourceeditor" />
<mkdir dir="${releasepath}/releasenotes" />
</target>
<!--build s40 port -->
<target name="S40-build" depends="init">
<ant antfile="${s40port}/antenna-build.xml" useNativeBasedir="true" target="release" />
</target>
<!-- build IO lib -->
<target name="IO-build" depends="init">
<ant antfile="${IO}/build.xml" useNativeBasedir="true" target="build" />
<ant antfile="${IO-MIDP}/build.xml" useNativeBasedir="true" target="build" />
<copy file="${IO}/dist/IO.jar" todir="${releasepath}/bin/IO" />
<copy file="${IO-MIDP}/dist/IO.jar" tofile="${releasepath}/bin/IO/IO-MIDP.jar" />
</target>
<!-- copy examples -->
<target name="copy-examples" depends="init">
<copy todir="${releasepath}/examples">
<fileset dir="${examples}" >
<exclude name="**/TimeZone/**" />
<exclude name="**/LWUITDemo-original/**" />
<exclude name="**/LWUITSpeed/**" />
<exclude name="**/build/**" />
<exclude name="**/dist/**" />
<exclude name="**/bin/**" />
<exclude name="**/.mtj.tmp/**" />
</fileset>
</copy>
</target>
<!-- copy docs -->
<target name="copy-docs" depends="init">
<copy todir="${releasepath}/doc/javadoc" >
<fileset dir="${javadocs}" />
</copy>
<copy file="${devguide}" todir="${releasepath}/doc" />
</target>
<target name="copy-notes" depends="init">
<copy todir="${releasepath}/releasenotes" >
<fileset dir="${releasenotes}" />
</copy>
</target>
<!-- build & copy ResourceEditor -->
<target name="ResourceEditor" depends="init" >
<ant antfile="${RE}/build.xml" useNativeBasedir="true" target="package" />
<copy todir="${releasepath}/resourceeditor/lib">
<fileset dir="${RE}/target/lib" />
</copy>
<copy file="${RE}/target/Lwuit-ResourceEditor-1.0-SNAPSHOT.jar"
tofile="${releasepath}/resourceeditor/Lwuit-ResourceEditor-1.0.jar" />
<copy file="${RE}/ResourceEditor.bat"
todir="${releasepath}/resourceeditor" />
</target>
<target name="fix-paths" depends="S40-build, IO-build, copy-examples" >
<!-- ContactBookDemo -->
<replace file="${releasepath}/examples/ContactBookDemo/nbproject/project.properties"
value="../../bin/sdk2.0/S40-with-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-with-themes.jar"
/>
<replace file="${releasepath}/examples/ContactBookDemo/nbproject/project.properties"
value="../../bin/IO/IO-MIDP.jar"
token="../../Series-40-binaries/bin/IO/IO-MIDP.jar"
/>
<!-- LWUITBrowser -->
<replace file="${releasepath}/examples/LWUITBrowser/nbproject/project.properties"
value="../../bin/sdk2.0/S40-with-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-with-themes.jar"
/>
<!-- LWUITDemo -->
<replace file="${releasepath}/examples/LWUITDemo/nbproject/project.properties"
value="../../bin/sdk2.0/S40-with-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-with-themes.jar"
/>
<!-- Makeover -->
<replace file="${releasepath}/examples/Makeover/nbproject/project.properties"
value="../../bin/sdk2.0/S40-with-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-with-themes.jar"
/>
<replace file="${releasepath}/examples/Makeover/nbproject/project.properties"
value="../../bin/IO/IO-MIDP.jar"
token="../../Series-40-binaries/bin/IO/IO-MIDP.jar"
/>
<!-- Tipster -->
<replace file="${releasepath}/examples/Tipster/nbproject/project.properties"
value="../../bin/sdk2.0/S40-with-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-with-themes.jar"
/>
<replace file="${releasepath}/examples/Tipster/nbproject/project.properties"
value="../../bin/IO/IO-MIDP.jar"
token="../../Series-40-binaries/bin/IO/IO-MIDP.jar"
/>
<!-- birthdays -->
<antcall target="fix-properties">
<param name="app-path" value="${releasepath}/examples/LWUIT_Birthdays" />
</antcall>
<!-- categorybardemo -->
<antcall target="fix-properties">
<param name="app-path" value="${releasepath}/examples/LWUIT_CategoryBarDemo" />
</antcall>
<!-- gesturesDemo -->
<antcall target="fix-properties">
<param name="app-path" value="${releasepath}/examples/LWUIT_GesturesDemo" />
</antcall>
<!-- listdemo -->
<antcall target="fix-properties">
<param name="app-path" value="${releasepath}/examples/LWUIT_ListDemo" />
</antcall>
<!-- puzzle -->
<antcall target="fix-properties">
<param name="app-path" value="${releasepath}/examples/LWUIT_Puzzle" />
</antcall>
<!-- Tourist -->
<antcall target="fix-properties">
<param name="app-path" value="${releasepath}/examples/LWUIT_TouristAttractions" />
</antcall>
<!-- Rlinks, has special replace since not the default jar -->
<replace file="${releasepath}/examples/RLinks/nbproject/project.properties"
value="../../bin/sdk2.0/S40-no-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-no-themes.jar"
/>
<!-- Lwuitspeed -->
<!--<replace file="${releasepath}/examples/LWUITSpeed/nbproject/project.properties"
value="../../bin/sdk2.0/S40-no-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-no-themes.jar"
/>-->
</target>
<target name="fix-properties">
<replace file="${app-path}/nbproject/project.properties"
value="../../bin/sdk2.0/S40-with-themes.jar"
token="../../Series-40-binaries/bin/sdk2.0/S40-with-themes.jar"
/>
</target>
<target name="dist" depends="S40-build, IO-build, copy-examples, copy-docs, ResourceEditor, fix-paths, copy-notes" />
<!-- create a single zip package from Series-40-binaries folder -->
<target name="package" depends="dist">
<zip destfile="LWUIT-for-Series-40-binaries-${package-version}.zip">
<zipfileset dir="Series-40-binaries" prefix="LWUIT-for-Series-40-${package-version}" />
</zip>
</target>
<target name="clean">
<delete dir="${releasepath}" />
</target>
</project>