Rev 267 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
206 | ligi | 1 | <project name="DUBwise" basedir="."> |
517 | ligi | 2 | <property name="wtk.home" value="/home/ligi/bin/wtk_2.5.2"/> |
206 | ligi | 3 | |
4 | <property name="project_name" value="DUBwise"/> <!-- jar filename --> |
||
5 | |||
517 | ligi | 6 | |
206 | ligi | 7 | <property file="build.props"/> |
8 | |||
517 | ligi | 9 | <property name="project_version" value="${version_major}.${version_minor}"/> |
10 | |||
206 | ligi | 11 | <property name="res_dir" location="tmp/res"/> |
12 | <property name="build_dir" location="${basedir}/build/"/> |
||
13 | <property name="lib_dir" location="${basedir}/lib/"/> |
||
14 | <property name="src_dir" location="${basedir}/src/"/> |
||
15 | <property name="shrared_src_dir" location="${basedir}/../shared/src/"/> |
||
16 | |||
17 | <property name="preprocessed_src_dir" location="${basedir}/tmp/pp_src/"/> |
||
18 | |||
517 | ligi | 19 | <taskdef classpath="${lib_dir}/antlr.jar;${lib_dir}/preprocessor-bin.jar;${lib_dir}/antenna.jar" resource="antenna.properties"/> |
20 | |||
21 | <taskdef classpath="" resource="antenna.properties"/> |
||
206 | ligi | 22 | |
23 | |||
24 | <property name="wtk.midp.version" value="2.0"/> |
||
25 | <property name="wtk.cldc.version" value="1.0"/> |
||
26 | |||
517 | ligi | 27 | <property name="wtk.midpapi" value="${classes}"/> |
28 | |||
29 | <target name="preprocess_lib"> |
||
30 | <wtkpreprocess version="3" device="Generic/Java" srcdir="${shrared_src_dir}" destdir="${preprocessed_src_dir}" symbols="cldc11=${cldc11},j2me=true" verbose="false" debuglevel="error" /> |
||
31 | </target> |
||
206 | ligi | 32 | |
33 | <target name="build"> |
||
34 | |||
517 | ligi | 35 | <wtkpreprocess version="3" device="Generic/Java" srcdir="${src_dir}" destdir="${preprocessed_src_dir}" symbols="VERSION=${project_version},VERSION_MAJOR=${version_major},VERSION_MINOR=${version_minor},VERSION_PATCH=${version_patch},voice_mode=${voice_mode},bluetooth=${bluetooth},fileapi=${fileapi},devicecontrol=${devicecontrol},cldc11=${cldc11},j2me=true,jsr179=${jsr179},j2memap=${j2memap},openlapi=${openlapi},location=${location}" verbose="false" /> |
206 | ligi | 36 | |
37 | |||
517 | ligi | 38 | <wtkbuild destdir="${build_dir}/classes" srcdir="${preprocessed_src_dir}" target="1.1" preverify="true" classpath="${libs}" > |
206 | ligi | 39 | |
517 | ligi | 40 | </wtkbuild> |
206 | ligi | 41 | <wtkjad |
42 | jadfile="${build_dir}/bin/${basename}.jad" |
||
43 | jarfile="${build_dir}/bin/${basename}.jar" |
||
44 | update="false" |
||
45 | manifest="${build_dir}/bin/MANIFEST.MF" |
||
46 | name="${project_name}" |
||
47 | vendor="LiGi" |
||
48 | version="${project_version}"> |
||
49 | <attribute name="MIDletX-No-Command" value="true"/> |
||
50 | <attribute name="MIDlet-Icon" value="i.png"/> |
||
51 | <midlet name="${project_name}" class="${project_name}" icon="i.png" /> |
||
52 | |||
53 | <!-- !!TODO!! Remove Icon JAD entry if no icon is there --> |
||
54 | </wtkjad> |
||
55 | |||
56 | <wtkpackage |
||
57 | jarfile="${build_dir}/bin/${basename}.jar" |
||
58 | jadfile="${build_dir}/bin/${basename}.jad" |
||
59 | basedir="${build_dir}/classes" |
||
60 | manifest="${build_dir}/bin/MANIFEST.MF" |
||
517 | ligi | 61 | libclasspath="${libs}" |
62 | obfuscate="${obfuscate}" |
||
206 | ligi | 63 | preverify="true"> |
64 | <fileset dir="${res_dir}/"> |
||
65 | <include name="*"/> |
||
66 | </fileset> |
||
67 | </wtkpackage> |
||
68 | |||
517 | ligi | 69 | |
206 | ligi | 70 | </target> |
71 | |||
517 | ligi | 72 | |
73 | <target name="only_jar"> |
||
74 | <!-- !!TODO!! Remove Icon JAD entry if no icon is there --> |
||
75 | <wtkjad |
||
76 | jadfile="${build_dir}/bin/${basename}.jad" |
||
77 | jarfile="${build_dir}/bin/${basename}.jar" |
||
78 | update="false" |
||
79 | manifest="${build_dir}/bin/MANIFEST.MF" |
||
80 | name="${project_name}" |
||
81 | vendor="LiGi" |
||
82 | version="${project_version}"> |
||
83 | <attribute name="MIDletX-No-Command" value="true"/> |
||
84 | <attribute name="MIDlet-Icon" value="i.png"/> |
||
85 | <midlet name="${project_name}" class="${project_name}" icon="i.png" /> |
||
206 | ligi | 86 | |
517 | ligi | 87 | <!-- !!TODO!! Remove Icon JAD entry if no icon is there --> |
88 | </wtkjad> |
||
89 | |||
90 | |||
91 | <wtkpackage |
||
92 | jarfile="${build_dir}/bin/${basename}.jar" |
||
93 | jadfile="${build_dir}/bin/${basename}.jad" |
||
94 | basedir="${build_dir}/classes" |
||
95 | manifest="${build_dir}/bin/MANIFEST.MF" |
||
96 | libclasspath="${libs}" |
||
97 | obfuscate="true" |
||
98 | preverify="true"> |
||
99 | <fileset dir="${res_dir}/"> |
||
100 | <include name="*"/> |
||
101 | </fileset> |
||
102 | </wtkpackage> |
||
103 | |||
104 | |||
105 | </target> |
||
106 | |||
107 | |||
206 | ligi | 108 | <target name="clean"> |
109 | |||
110 | <delete dir="${build_dir}"/> |
||
111 | <delete dir="${preprocessed_src_dir}"/> |
||
112 | <tstamp/> |
||
113 | |||
114 | <mkdir dir="${preprocessed_src_dir}"/> |
||
115 | <mkdir dir="${build_dir}"/> |
||
116 | <mkdir dir="${build_dir}/classes"/> |
||
117 | <mkdir dir="${build_dir}/bin"/> |
||
118 | </target> |
||
119 | |||
120 | |||
121 | </project> |