|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <project name="com.nokia.s60tools.imaker" default="build.jars" basedir="."> |
|
3 <property file="../common.properties"/> |
|
4 <property name="basews" value="${ws}"/> |
|
5 <property name="baseos" value="${os}"/> |
|
6 <property name="basearch" value="${arch}"/> |
|
7 <property name="basenl" value="${nl}"/> |
|
8 <property name="bundleId" value="com.nokia.s60tools.imaker"/> |
|
9 |
|
10 <!-- Compiler settings. --> |
|
11 <property name="javacFailOnError" value="true"/> |
|
12 <property name="logExtension" value=".log"/> |
|
13 <property name="compilerArg" value=""/> |
|
14 |
|
15 <target name="init" depends="properties"> |
|
16 <property name="pluginTemp" value="${basedir}"/> |
|
17 <property name="build.result.folder" value="${basedir}/build.result"/> |
|
18 <property name="temp.folder" value="${basedir}/temp.folder"/> |
|
19 <property name="plugin.destination" value="${basedir}"/> |
|
20 </target> |
|
21 |
|
22 <target name="properties" if="eclipse.running"> |
|
23 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> |
|
24 |
|
25 </target> |
|
26 |
|
27 <target name="build.update.jar" depends="init" description="Build the plug-in: com.nokia.s60tools.imaker for an update site."> |
|
28 <delete dir="${temp.folder}"/> |
|
29 <mkdir dir="${temp.folder}"/> |
|
30 <antcall target="build.jars"/> |
|
31 <antcall target="gather.bin.parts"> |
|
32 <param name="destination.temp.folder" value="${temp.folder}/"/> |
|
33 </antcall> |
|
34 <jar destfile="${plugin.destination}/com.nokia.s60tools.imaker_${plugin.version}.jar" basedir="${temp.folder}/com.nokia.s60tools.imaker_${plugin.version}" filesetmanifest="merge"/> |
|
35 <copy todir="../${plugin.lib}" file="${plugin.destination}/com.nokia.s60tools.imaker_${plugin.version}.jar" failonerror="true" overwrite="true" /> |
|
36 <delete dir="${temp.folder}"/> |
|
37 <delete dir="${build.result.folder}"/> |
|
38 </target> |
|
39 |
|
40 <target name="@dot" depends="init" unless="@dot" description="Create jar: com.nokia.s60tools.imaker @dot."> |
|
41 <delete dir="${temp.folder}/@dot.bin"/> |
|
42 <mkdir dir="${temp.folder}/@dot.bin"/> |
|
43 <path id="@dot.classpath"> |
|
44 <fileset dir="${eclipse.home}/plugins"> |
|
45 <include name="**/*.jar"/> |
|
46 <exclude name="com.nokia.s60tools.imaker*"/> |
|
47 </fileset> |
|
48 </path> |
|
49 <!-- compile the source code --> |
|
50 <javac destdir="${temp.folder}/@dot.bin" failonerror="${javacFailOnError}" source="${common.javac-source}" target="${common.javac-target}"> |
|
51 <classpath refid="@dot.classpath"/> |
|
52 <src path="src/"/> |
|
53 </javac> |
|
54 |
|
55 <!-- Copy necessary resources --> |
|
56 <copy todir="${temp.folder}/@dot.bin" failonerror="true" overwrite="false"> |
|
57 <fileset dir="src/"> |
|
58 <exclude name="**/*.java"/> |
|
59 <exclude name="**/package.htm*"/> |
|
60 </fileset> |
|
61 </copy> |
|
62 <mkdir dir="${build.result.folder}"/> |
|
63 <copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false"> |
|
64 <fileset dir="${temp.folder}/@dot.bin"> |
|
65 </fileset> |
|
66 </copy> |
|
67 <delete dir="${temp.folder}/@dot.bin"/> |
|
68 </target> |
|
69 |
|
70 <target name="src.zip" depends="init" unless="src.zip"> |
|
71 <mkdir dir="${build.result.folder}"/> |
|
72 <antcall target="zip.src.zip"/> |
|
73 </target> |
|
74 <target name="zip.src.zip"> |
|
75 <zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false"> |
|
76 <fileset dir="src/"> |
|
77 <include name="**/*.java"/> |
|
78 </fileset> |
|
79 </zip> |
|
80 </target> |
|
81 <target name="copy.src.zip"> |
|
82 <copy todir="${source.destination.folder}/" failonerror="true" overwrite="true"> |
|
83 <fileset dir="src/"> |
|
84 <include name="**/*.java"/> |
|
85 </fileset> |
|
86 </copy> |
|
87 </target> |
|
88 |
|
89 <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: com.nokia.s60tools.imaker."> |
|
90 <available property="@dot" file="${build.result.folder}/@dot"/> |
|
91 <antcall target="@dot"/> |
|
92 </target> |
|
93 |
|
94 <target name="build.sources" depends="init"> |
|
95 <available property="src.zip" file="${build.result.folder}/src.zip"/> |
|
96 <antcall target="src.zip"/> |
|
97 </target> |
|
98 |
|
99 <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> |
|
100 <mkdir dir="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}"/> |
|
101 <copy todir="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}" failonerror="true" overwrite="false"> |
|
102 <fileset dir="${build.result.folder}/@dot"> |
|
103 <include name="**"/> |
|
104 </fileset> |
|
105 </copy> |
|
106 <copy todir="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}" failonerror="true" overwrite="false"> |
|
107 <fileset dir="${basedir}"> |
|
108 <include name="META-INF/"/> |
|
109 <include name="plugin.xml"/> |
|
110 <include name="plugin.properties"/> |
|
111 <include name="icons/"/> |
|
112 <include name="about.html"/> |
|
113 <!-- <include name="bin/"/> --> |
|
114 <!-- <include name="build.properties"/> --> |
|
115 <!-- <include name="model/"/> --> |
|
116 <!-- <include name=".classpath"/> --> |
|
117 <include name="about.ini"/> |
|
118 <include name="about.mappings"/> |
|
119 <include name="about.properties"/> |
|
120 <include name="license.txt"/> |
|
121 <!-- <include name=".settings/"/> --> |
|
122 <include name="doc/"/> |
|
123 </fileset> |
|
124 </copy> |
|
125 </target> |
|
126 |
|
127 <target name="build.zips" depends="init"> |
|
128 </target> |
|
129 |
|
130 <target name="gather.sources" depends="init" if="destination.temp.folder"> |
|
131 <mkdir dir="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}"/> |
|
132 <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}" failonerror="false" overwrite="false"/> |
|
133 <antcall target="copy.src.includes"> |
|
134 <param name="source.destination.folder" value="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}"/> |
|
135 </antcall> |
|
136 </target> |
|
137 |
|
138 <target name="gather.individual.sources" depends="init"> |
|
139 <antcall target="copy.src.zip"> |
|
140 <param name="source.destination.folder" value="${destination.temp.folder}"/> |
|
141 </antcall> |
|
142 <antcall target="copy.src.includes"> |
|
143 <param name="source.destination.folder" value="${destination.temp.folder}"/> |
|
144 </antcall> |
|
145 </target> |
|
146 |
|
147 <target name="copy.src.includes" depends="init"> |
|
148 <copy todir="${source.destination.folder}" failonerror="false" overwrite="false"> |
|
149 <fileset dir="${basedir}"> |
|
150 <include name="src/"/> |
|
151 <include name="plugin.xml"/> |
|
152 <include name="plugin.properties"/> |
|
153 <include name="model/"/> |
|
154 <include name="icons/"/> |
|
155 <include name="build.properties"/> |
|
156 <include name="about.html"/> |
|
157 <include name="META-INF/"/> |
|
158 <include name=".classpath"/> |
|
159 <include name="about.ini"/> |
|
160 <include name="about.mappings"/> |
|
161 <include name="about.properties"/> |
|
162 <include name="license.txt"/> |
|
163 <include name=".settings/"/> |
|
164 <include name=".project"/> |
|
165 <include name="doc/"/> |
|
166 </fileset> |
|
167 </copy> |
|
168 </target> |
|
169 |
|
170 <target name="gather.logs" depends="init" if="destination.temp.folder"> |
|
171 <mkdir dir="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}"/> |
|
172 <copy todir="${destination.temp.folder}/com.nokia.s60tools.imaker_${plugin.version}" failonerror="false" overwrite="false"> |
|
173 <fileset dir="${temp.folder}"> |
|
174 <include name="@dot.bin${logExtension}"/> |
|
175 </fileset> |
|
176 </copy> |
|
177 </target> |
|
178 |
|
179 <target name="clean" depends="init" description="Clean the plug-in: com.nokia.s60tools.imaker of all the zips, jars and logs created."> |
|
180 <delete dir="${build.result.folder}/@dot"/> |
|
181 <delete file="${build.result.folder}/src.zip"/> |
|
182 <delete file="${plugin.destination}/com.nokia.s60tools.imaker_${plugin.version}.jar"/> |
|
183 <delete file="${plugin.destination}/com.nokia.s60tools.imaker_${plugin.version}.zip"/> |
|
184 <delete dir="${temp.folder}"/> |
|
185 </target> |
|
186 |
|
187 <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder."> |
|
188 <eclipse.convertPath fileSystemPath="E:/workspaces/imaker/imaker_plugin/com.nokia.s60tools.imaker" property="resourcePath"/> |
|
189 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/> |
|
190 </target> |
|
191 |
|
192 <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: com.nokia.s60tools.imaker."> |
|
193 <delete dir="${temp.folder}"/> |
|
194 <mkdir dir="${temp.folder}"/> |
|
195 <antcall target="build.jars"/> |
|
196 <antcall target="build.sources"/> |
|
197 <antcall target="gather.bin.parts"> |
|
198 <param name="destination.temp.folder" value="${temp.folder}/"/> |
|
199 </antcall> |
|
200 <antcall target="gather.sources"> |
|
201 <param name="destination.temp.folder" value="${temp.folder}/"/> |
|
202 </antcall> |
|
203 <delete> |
|
204 <fileset dir="${temp.folder}"> |
|
205 <include name="**/*.bin${logExtension}"/> |
|
206 </fileset> |
|
207 </delete> |
|
208 <zip destfile="${plugin.destination}/com.nokia.s60tools.imaker_${plugin.version}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> |
|
209 <delete dir="${temp.folder}"/> |
|
210 </target> |
|
211 |
|
212 <target name="collect.jar"> |
|
213 <copy todir="${destination.temp.folder}" file="com.nokia.s60tools.imaker_${plugin.version}.jar" failonerror="true" overwrite="true" /> |
|
214 </target> |
|
215 </project> |