build-impl.xml 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- *** GENERATED FROM project.xml - DO NOT EDIT *** -->
  3. <project name="FrameAnimDemo-impl" default="jar" basedir="..">
  4. <!--load-properties-->
  5. <target name="pre-load-properties">
  6. <property file="nbproject/private/private.properties"/>
  7. <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
  8. <available property="user.properties.file.exists" file="${user.properties.file}"/>
  9. </target>
  10. <target name="exists.config.active" unless="config.active">
  11. <echo level="warning" message="Active configuration (config.active property) is not set - using default."/>
  12. <property value="" name="config.active"/>
  13. </target>
  14. <target name="exists.netbeans.user" unless="netbeans.user">
  15. <echo level="warning" message="NetBeans IDE user directory (netbeans.user property) is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: ant-ext library home, ...). You could also open this project in the NetBeans IDE - in this case this property would be set automatically."/>
  16. </target>
  17. <target name="exists.user.properties.file" unless="user.properties.file.exists">
  18. <echo level="warning" message="User properties file (user.properties.file) property is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: libraries, platforms, ...)."/>
  19. </target>
  20. <target name="load-properties" depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file">
  21. <loadproperties srcfile="nbproject/project.properties">
  22. <filterchain>
  23. <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
  24. <concatfilter prepend="nbproject/project.properties"/>
  25. <containsregex pattern="^platform.active=|^deployment.method=|^deployment.instance="/>
  26. </filterchain>
  27. </loadproperties>
  28. <property name="deployment.instance" value="default"/>
  29. <loadproperties srcfile="${user.properties.file}">
  30. <filterchain>
  31. <replaceregex pattern="^platforms\.${platform.active}\." replace="platform."/>
  32. <replaceregex pattern="^deployment\.${deployment.method}\.scriptfile=" replace="deployment.scriptfile="/>
  33. <replaceregex pattern="^deployments\.${deployment.method}\.${deployment.instance}\.([^=]+)=" replace="\1="/>
  34. </filterchain>
  35. </loadproperties>
  36. <loadproperties srcfile="nbproject/project.properties">
  37. <filterchain>
  38. <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
  39. <concatfilter prepend="nbproject/project.properties"/>
  40. </filterchain>
  41. </loadproperties>
  42. </target>
  43. <!--basic-init-->
  44. <target name="exists.platform.active" unless="platform.active">
  45. <echo level="warning" message="Active platform (platform.active property) in not set. If you set this and user.properties.file property, many properties required by the project will be automatically evaluated (e.g.: platform home, platform classpath, ...)."/>
  46. </target>
  47. <target name="exists.platform.configuration" unless="platform.configuration">
  48. <echo level="warning" message="Platform configuration (platform.configuration) is not set. Using default (CLDC-1.0) configuration."/>
  49. <property name="platform.configuration" value="CLDC-1.0"/>
  50. </target>
  51. <target name="exists.platform.profile" unless="platform.profile">
  52. <echo level="warning" message="Platform profile (platform.profile) is not set. Using default (MIDP-1.0) profile."/>
  53. <property name="platform.profile" value="MIDP-1.0"/>
  54. </target>
  55. <target name="basic-init" depends="exists.platform.active,exists.platform.configuration,exists.platform.profile">
  56. <fail unless="libs.j2me_ant_ext.classpath">Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-mobility-antext.jar file in the IDE installation directory.</fail>
  57. <fail unless="platform.home">Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location.</fail>
  58. <fail unless="platform.bootclasspath">Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator.</fail>
  59. <fail unless="src.dir">Must set src.dir</fail>
  60. <fail unless="build.dir">Must set build.dir</fail>
  61. <fail unless="dist.dir">Must set dist.dir</fail>
  62. <fail unless="dist.jar">Must set dist.jar</fail>
  63. <property name="javac.source" value="1.3"/>
  64. <property name="javac.target" value="1.1"/>
  65. <property name="javac.encoding" value="${file.encoding}"/>
  66. <property name="deployment.number" value="0.0.1"/>
  67. <property name="deployment.counter" value="000002"/>
  68. <condition property="no.deps">
  69. <istrue value="${no.dependencies}"/>
  70. </condition>
  71. <condition property="no.preprocess">
  72. <isfalse value="${use.preprocessor}"/>
  73. </condition>
  74. <condition property="no.javadoc.preview">
  75. <isfalse value="${javadoc.preview}"/>
  76. </condition>
  77. <condition property="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes},**/*Test.java,**/test,**/test/**">
  78. <istrue value="${filter.exclude.tests}"/>
  79. </condition>
  80. <property name="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes}"/>
  81. <condition property="deployment.do.override.jarurl" value="">
  82. <istrue value="${deployment.override.jarurl}"/>
  83. </condition>
  84. <condition property="config.active.name" value="DefaultConfiguration">
  85. <length string="${config.active}" trim="true" length="0"/>
  86. </condition>
  87. <property name="config.active.name" value="${config.active}"/>
  88. <taskdef resource="org/netbeans/mobility/antext/defs.properties">
  89. <classpath>
  90. <pathelement path="${libs.j2me_ant_ext.classpath}"/>
  91. </classpath>
  92. </taskdef>
  93. <condition property="skip.deployment">
  94. <equals arg1="${deployment.method}" arg2="NONE" casesensitive="false" trim="true"/>
  95. </condition>
  96. <condition property="app-version.autoincrement.trigger">
  97. <istrue value="${app-version.autoincrement}"/>
  98. </condition>
  99. <condition property="debug.timeout" value="30000">
  100. <or>
  101. <equals arg1="${debugger.timeout}" arg2="" trim="true"/>
  102. <not>
  103. <isset property="debugger.timeout"/>
  104. </not>
  105. </or>
  106. </condition>
  107. <property name="debug.timeout" value="${debugger.timeout}"/>
  108. <nb-overrideproperty name="buildsystem.baton" value="${src.dir}"/>
  109. </target>
  110. <!--cldc-init-->
  111. <target name="cldc-pre-init">
  112. <condition property="cldc-platform.trigger">
  113. <equals arg1="CLDC" arg2="${platform.trigger}" casesensitive="false"/>
  114. </condition>
  115. </target>
  116. <target name="cldc-init" depends="cldc-pre-init" if="cldc-platform.trigger">
  117. <property name="preverify.sources.dir" location="${build.dir}/preverifysrc"/>
  118. <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
  119. <property name="platform.device" value=""/>
  120. <property name="dist.jad.url" value="file://"/>
  121. <property name="run.cmd.options" value=""/>
  122. <condition property="evaluated.run.security.domain" value="">
  123. <isfalse value="${run.use.security.domain}"/>
  124. </condition>
  125. <property name="evaluated.run.security.domain" value="${run.security.domain}"/>
  126. <condition property="override.jarurl.trigger">
  127. <and>
  128. <istrue value="${cldc-platform.trigger}"/>
  129. <istrue value="${deployment.override.jarurl}"/>
  130. </and>
  131. </condition>
  132. <property name="deployment.jad" location="${dist.dir}/${dist.jad}"/>
  133. <property name="deployment.jar" location="${dist.dir}/${dist.jar}"/>
  134. <property name="deployment.dir" location="${dist.dir}"/>
  135. <patternset id="deployment.patternset">
  136. <include name="${dist.jad}"/>
  137. <include name="${dist.jar}"/>
  138. </patternset>
  139. </target>
  140. <!--cdc-init-->
  141. <target name="cdc-init">
  142. <condition property="cdc-platform.trigger">
  143. <equals arg1="CDC" arg2="${platform.trigger}" casesensitive="false"/>
  144. </condition>
  145. <available file="${manifest.file}" property="manifest.available"/>
  146. <condition property="main.class.applet">
  147. <equals arg1="${main.class.class}" arg2="applet" casesensitive="false"/>
  148. </condition>
  149. <condition property="main.class.xlet">
  150. <equals arg1="${main.class.class}" arg2="xlet" casesensitive="false"/>
  151. </condition>
  152. <condition property="manifest.available+main.class+fat.jar">
  153. <and>
  154. <isset property="manifest.available"/>
  155. <isset property="main.class"/>
  156. <istrue value="${platform.fat.jar}"/>
  157. <not>
  158. <equals arg1="${main.class}" arg2="" trim="true"/>
  159. </not>
  160. </and>
  161. </condition>
  162. <condition property="manifest.available+main.class">
  163. <and>
  164. <isset property="manifest.available"/>
  165. <isset property="main.class"/>
  166. <isfalse value="${platform.fat.jar}"/>
  167. <not>
  168. <equals arg1="${main.class}" arg2="" trim="true"/>
  169. </not>
  170. </and>
  171. </condition>
  172. <condition property="application.version.invalid" value="true">
  173. <equals arg1="${deployment.number}" arg2="" trim="true"/>
  174. </condition>
  175. <fail if="application.version.invalid" message="Property deployment.number must not be empty and must contain version in format %d.%d.%d!"/>
  176. </target>
  177. <!--ricoh-init-->
  178. <target name="ricoh-pre-init" if="cdc-platform.trigger">
  179. <condition property="ricoh-platform.trigger">
  180. <equals arg1="ricoh" arg2="${platform.type}" casesensitive="false"/>
  181. </condition>
  182. </target>
  183. <target name="ricoh-init" depends="ricoh-pre-init" if="ricoh-platform.trigger">
  184. <available property="jcifs" classname="jcifs.smb.SmbFile" classpath="${libs.RicohAntTools.classpath}"/>
  185. <condition property="no.vendor.name" value="true">
  186. <equals arg1="${application.vendor}" arg2="" trim="true"/>
  187. </condition>
  188. <condition property="ricoh.dalp.install.mode" value="auto" else="manual">
  189. <istrue value="${ricoh.dalp.install.mode.auto}"/>
  190. </condition>
  191. <condition property="ricoh.dalp.display-mode.type" value="COLOR" else="MONO">
  192. <istrue value="${ricoh.dalp.display-mode.color}"/>
  193. </condition>
  194. <property name="xml.dir" value="${build.dir}/dalp"/>
  195. <property name="xlet.dalp" value="${application.name}.dalp"/>
  196. <property name="xlet.dalp.name-only" value="${application.name}.dalp"/>
  197. <property name="deploy.dir" value="${dist.dir}/deploy"/>
  198. <property name="rideploy.zip" value="${dist.dir}/${application.name}.zip"/>
  199. <property name="ricoh.dalp.is-managed" value="true"/>
  200. <property name="ricoh.dalp.information.is-icon-used" value="true"/>
  201. <property name="ricoh.platform.target.version" value="2.0"/>
  202. <property name="ricoh.dalp.version" value="${deployment.number}"/>
  203. <property name="ricoh.dalp.application-desc.visible" value="true"/>
  204. <property name="ricoh.dalp.install.destination" value="hdd"/>
  205. <property name="ricoh.dalp.install.work-dir" value="hdd"/>
  206. <property name="ricoh.dalp.information.abbreviation" value="RICOH"/>
  207. <taskdef name="taskIf" classname="ricoh.ant.ConditionalTask" classpath="${libs.ricoh-ant-utils.classpath}"/>
  208. <taskdef name="dalp" classname="org.netbeans.modules.j2me.cdc.project.ricoh.DalpBuilder" classpath="${libs.ricoh-ant-utils.classpath}"/>
  209. <property name="dalp.dist" value="${build.dir}/dalp/${application.name}.dalp"/>
  210. <property name="deployment.dir" location="${dist.dir}"/>
  211. <patternset id="deployment.patternset">
  212. <include name="${dist.jar}"/>
  213. <include name="${application.name}.dalp"/>
  214. <include name="lib/*"/>
  215. </patternset>
  216. </target>
  217. <!--semc-init-->
  218. <target name="semc-pre-init" if="cdc-platform.trigger">
  219. <condition property="semc-platform.trigger">
  220. <equals arg1="semc" arg2="${platform.type}" casesensitive="false"/>
  221. </condition>
  222. </target>
  223. <target name="semc-init" depends="semc-pre-init" if="semc-platform.trigger">
  224. <condition property="semc.icon.invalid" value="true">
  225. <or>
  226. <contains string="${semc.application.icon}" substring="$${"/>
  227. <equals arg1="${semc.application.icon}" arg2="" trim="true"/>
  228. </or>
  229. </condition>
  230. <condition property="no.certificateorkey" value="true">
  231. <or>
  232. <isset property="no.application.uid"/>
  233. <equals arg1="${semc.certificate.path}" arg2="" trim="true"/>
  234. <contains string="${semc.certificate.path}" substring="$${semc.certificate.path"/>
  235. <equals arg1="${semc.private.key.path}" arg2="" trim="true"/>
  236. <contains string="${semc.private.key.path}" substring="$${semc.private.key.path"/>
  237. </or>
  238. </condition>
  239. <property name="j9.dist" location="${build.dir}/j9/${semc.application.uid}.j9"/>
  240. <taskdef resource="org/netbeans/modules/j2me/cdc/project/defs.properties">
  241. <classpath>
  242. <pathelement path="${libs.cdc-ant-utils.classpath}"/>
  243. </classpath>
  244. </taskdef>
  245. <taskdef resource="org/netbeans/modules/j2me/cdc/project/semc/defs.properties">
  246. <classpath>
  247. <pathelement path="${libs.semc-ant-utils.classpath}"/>
  248. </classpath>
  249. </taskdef>
  250. <property name="deployment.dir" location="${dist.dir}"/>
  251. <patternset id="deployment.patternset">
  252. <include name="*.sis"/>
  253. <include name="*.SIS"/>
  254. </patternset>
  255. </target>
  256. <!--savaje-init-->
  257. <target name="savaje-pre-init" if="cdc-platform.trigger">
  258. <condition property="savaje-platform.trigger">
  259. <equals arg1="savaje" arg2="${platform.type}" casesensitive="false"/>
  260. </condition>
  261. </target>
  262. <target name="savaje-init" depends="savaje-pre-init" if="savaje-platform.trigger">
  263. <property name="savaje.application.uid" value="TBD"/>
  264. <condition property="savaje.bundle.base.invalid" value="true">
  265. <or>
  266. <equals arg1="${savaje.bundle.base}" arg2="" trim="true"/>
  267. <contains string="${savaje.bundle.base}" substring="$${savaje.bundle.base"/>
  268. </or>
  269. </condition>
  270. <condition property="savaje.unsupported.main" value="true">
  271. <or>
  272. <equals arg1="${main.class.applet}" arg2="true"/>
  273. </or>
  274. </condition>
  275. <condition property="savaje.icon.invalid" value="true">
  276. <or>
  277. <isset property="no.application.uid"/>
  278. <contains string="${savaje.application.icon}" substring="$${"/>
  279. <equals arg1="${savaje.application.icon}" arg2="" trim="true"/>
  280. </or>
  281. </condition>
  282. <property name="jnlp.dist" value="${build.dir}/jnlp/bundle.jnlp"/>
  283. <property name="deployment.dir" location="${dist.dir}"/>
  284. <patternset id="deployment.patternset">
  285. <include name="bundle.jnlp"/>
  286. <include name="bundle.policy"/>
  287. <include name="lib/*"/>
  288. </patternset>
  289. </target>
  290. <!--sjmc-init-->
  291. <target name="sjmc-pre-init" if="cdc-platform.trigger">
  292. <condition property="sjmc-platform.trigger">
  293. <equals arg1="sjmc" arg2="${platform.type}" casesensitive="false"/>
  294. </condition>
  295. </target>
  296. <target name="sjmc-init" depends="sjmc-pre-init" if="sjmc-platform.trigger"/>
  297. <!--cdc-hi-init-->
  298. <target name="cdc-hi-pre-init" if="cdc-platform.trigger">
  299. <condition property="cdc-hi-platform.trigger">
  300. <equals arg1="cdc-hi" arg2="${platform.type}" casesensitive="false"/>
  301. </condition>
  302. </target>
  303. <target name="cdc-hi-init" depends="cdc-hi-pre-init" if="cdc-hi-platform.trigger"/>
  304. <!--nokiaS80-init-->
  305. <target name="nokiaS80-pre-init" if="cdc-platform.trigger">
  306. <condition property="nokiaS80-platform.trigger">
  307. <equals arg1="nokiaS80" arg2="${platform.type}" casesensitive="false"/>
  308. </condition>
  309. </target>
  310. <target name="nokiaS80-init" depends="nokiaS80-pre-init" if="nokiaS80-platform.trigger">
  311. <property name="j9.dist" location="${build.dir}/j9/NOKIA.j9"/>
  312. <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
  313. <condition property="nokia.icon.invalid">
  314. <or>
  315. <contains string="${nokiaS80.application.icon}" substring="$${"/>
  316. <equals arg1="${nokiaS80.application.icon}" arg2="" trim="true"/>
  317. </or>
  318. </condition>
  319. <property name="deployment.dir" location="${dist.dir}"/>
  320. <patternset id="deployment.patternset">
  321. <include name="${dist.jar}"/>
  322. </patternset>
  323. </target>
  324. <!--nsicom-init-->
  325. <target name="nsicom-pre-init" if="cdc-platform.trigger">
  326. <condition property="nsicom-platform.trigger">
  327. <equals arg1="nsicom" arg2="${platform.type}" casesensitive="false"/>
  328. </condition>
  329. </target>
  330. <target name="nsicom-init" depends="nsicom-pre-init" if="nsicom-platform.trigger">
  331. <property name="deployment.dir" location="${dist.dir}"/>
  332. <patternset id="deployment.patternset">
  333. <include name="${dist.jar}"/>
  334. </patternset>
  335. </target>
  336. <!--init-->
  337. <target name="pre-init"/>
  338. <target name="post-init"/>
  339. <target name="init" depends="pre-init,load-properties,basic-init,cldc-init,cdc-init,ricoh-init,semc-init,savaje-init,sjmc-init,cdc-hi-init,nokiaS80-init,nsicom-init,post-init"/>
  340. <!--conditional clean-->
  341. <target name="conditional-clean-init">
  342. <uptodate property="no.clean.before.build" targetfile="${build.dir}/.timestamp">
  343. <srcfiles dir="nbproject">
  344. <include name="project.properties"/>
  345. <include name="build-impl.xml"/>
  346. </srcfiles>
  347. </uptodate>
  348. </target>
  349. <target name="conditional-clean" depends="init,conditional-clean-init" unless="no.clean.before.build" description="Clean project in case its meta information has changed.">
  350. <antcall target="do-clean" inheritall="true" inheritrefs="true"/>
  351. </target>
  352. <!--deps-jar-->
  353. <target name="deps-jar" depends="conditional-clean" unless="no.deps"/>
  354. <!--preprocess-->
  355. <target name="pre-preprocess"/>
  356. <target name="do-preprocess" unless="no.preprocess">
  357. <fail unless="preprocessed.dir">Must set preprocessed.dir</fail>
  358. <property name="abilities" value=""/>
  359. <property name="debug.level" value="debug"/>
  360. <mkdir dir="${preprocessed.dir}"/>
  361. <echo message="ignore me" file="${build.dir}/.timestamp"/>
  362. <nb-prep destdir="${preprocessed.dir}" preprocessfor="${config.active.name},${abilities},DebugLevel=${debug.level}" encoding="${javac.encoding}">
  363. <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated}"/>
  364. </nb-prep>
  365. <copy todir="${preprocessed.dir}">
  366. <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
  367. </copy>
  368. <nb-overrideproperty name="buildsystem.baton" value="${preprocessed.dir}"/>
  369. </target>
  370. <target name="post-preprocess"/>
  371. <target name="preprocess" depends="deps-jar,pre-preprocess,do-preprocess,post-preprocess" description="Preprocess project sources."/>
  372. <!--compile-->
  373. <target name="pre-compile"/>
  374. <target name="do-compile">
  375. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  376. <mkdir dir="${build.classes.dir}"/>
  377. <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" destdir="${build.classes.dir}" srcdir="${buildsystem.baton}" bootclasspath="${platform.bootclasspath}" encoding="${javac.encoding}">
  378. <classpath>
  379. <path path="${libs.classpath}"/>
  380. </classpath>
  381. </javac>
  382. <copy todir="${build.classes.dir}">
  383. <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
  384. </copy>
  385. <nb-overrideproperty name="buildsystem.baton" value="${build.classes.dir}"/>
  386. </target>
  387. <target name="extract-libs" description="Extracts all bundled libraries.">
  388. <mkdir dir="${build.classes.dir}"/>
  389. <nb-extract dir="${build.classes.dir}" excludeManifest="true" classpath="${libs.classpath}" excludeclasspath="${extra.classpath}"/>
  390. </target>
  391. <target name="post-compile"/>
  392. <target name="compile" depends="preprocess,pre-compile,extract-libs,do-compile,post-compile" description="Compile project classes."/>
  393. <!--compile-single-->
  394. <target name="pre-compile-single"/>
  395. <target name="do-compile-single">
  396. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  397. <mkdir dir="${build.classes.dir}"/>
  398. <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" srcdir="${buildsystem.baton}" destdir="${build.classes.dir}" bootclasspath="${platform.bootclasspath}" includes="${javac.includes}" encoding="${javac.encoding}">
  399. <classpath>
  400. <path path="${libs.classpath}"/>
  401. </classpath>
  402. </javac>
  403. </target>
  404. <target name="post-compile-single"/>
  405. <target name="compile-single" depends="preprocess,pre-compile-single,do-compile-single,post-compile-single" description="Compile selected project classes."/>
  406. <!--proguard-->
  407. <target name="proguard-init" description="Up-to-date check before obfuscation.">
  408. <property name="obfuscation.level" value="0"/>
  409. <condition property="no.obfusc">
  410. <or>
  411. <equals arg1="${obfuscation.level}" arg2="0"/>
  412. <uptodate targetfile="${obfuscator.destjar}">
  413. <srcfiles dir="${buildsystem.baton}"/>
  414. </uptodate>
  415. </or>
  416. </condition>
  417. <uptodate property="obfuscation.up-to-date" targetfile="${obfuscator.destjar}">
  418. <srcfiles dir="${buildsystem.baton}"/>
  419. </uptodate>
  420. </target>
  421. <target name="skip-obfuscation" depends="proguard-init" if="obfuscation.up-to-date">
  422. <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
  423. <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
  424. </target>
  425. <target name="proguard" depends="skip-obfuscation" description="Obfuscate project classes." unless="no.obfusc">
  426. <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
  427. <fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail>
  428. <fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail>
  429. <property name="obfuscator.classpath" value=""/>
  430. <dirname file="${obfuscator.srcjar}" property="obfuscator.srcjar.dir"/>
  431. <dirname file="${obfuscator.destjar}" property="obfuscator.destjar.dir"/>
  432. <mkdir dir="${obfuscator.srcjar.dir}"/>
  433. <mkdir dir="${obfuscator.destjar.dir}"/>
  434. <jar jarfile="${obfuscator.srcjar}" basedir="${buildsystem.baton}"/>
  435. <property name="obfuscation.custom" value=""/>
  436. <nb-obfuscate srcjar="${obfuscator.srcjar}" destjar="${obfuscator.destjar}" obfuscatorclasspath="${obfuscator.classpath}" classpath="${platform.bootclasspath}:${extra.classpath}" obfuscationLevel="${obfuscation.level}" extraScript="${obfuscation.custom}"/>
  437. <mkdir dir="${obfuscated.classes.dir}"/>
  438. <unjar src="${obfuscator.destjar}" dest="${obfuscated.classes.dir}"/>
  439. <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
  440. </target>
  441. <!--obfuscate-->
  442. <target name="pre-obfuscate"/>
  443. <target name="post-obfuscate"/>
  444. <target name="obfuscate" depends="compile,pre-obfuscate,proguard,post-obfuscate" description="Obfuscate project classes."/>
  445. <!--lwuit-build-->
  446. <import file="lwuit.xml" optional="true"/>
  447. <target name="-lwuit-check">
  448. <condition property="lwuit.allowed">
  449. <and>
  450. <available file="nbproject/lwuit.xml"/>
  451. <isset property="is.mesdk_lwuit"/>
  452. </and>
  453. </condition>
  454. </target>
  455. <target name="-pre-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/>
  456. <target name="-lwuit-build" depends="-lwuit-check" if="lwuit.allowed">
  457. <antcall target="lwuit_build"/>
  458. </target>
  459. <target name="-post-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/>
  460. <target name="lwuit-build" depends="-lwuit-check,-pre-lwuit-build, -lwuit-build, -post-lwuit-build" if="lwuit.allowed"/>
  461. <!--preverify-->
  462. <target name="pre-preverify"/>
  463. <target name="do-preverify" if="cldc-platform.trigger">
  464. <fail unless="preverify.classes.dir">Must set preverify.classes.dir</fail>
  465. <mkdir dir="${preverify.sources.dir}"/>
  466. <copy todir="${preverify.sources.dir}">
  467. <fileset dir="${buildsystem.baton}" includes="**/*.class"/>
  468. </copy>
  469. <mkdir dir="${preverify.classes.dir}"/>
  470. <nb-preverify srcdir="${preverify.sources.dir}" destdir="${preverify.classes.dir}" classpath="${platform.bootclasspath}:${extra.classpath}" configuration="${platform.configuration}" platformhome="${platform.home}" platformtype="${platform.type}" commandline="${platform.preverifycommandline}"/>
  471. <copy todir="${preverify.classes.dir}">
  472. <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
  473. </copy>
  474. <nb-overrideproperty name="buildsystem.baton" value="${preverify.classes.dir}"/>
  475. </target>
  476. <target name="post-preverify"/>
  477. <target name="preverify" depends="obfuscate,lwuit-build,pre-preverify,do-preverify,post-preverify" description="Preverify project classes."/>
  478. <!--set-password-->
  479. <target name="set-password-init">
  480. <property name="sign.enabled" value="false"/>
  481. <condition property="skip-sign-keystore-password-input">
  482. <or>
  483. <isfalse value="${sign.enabled}"/>
  484. <and>
  485. <isset property="sign.keystore"/>
  486. <isset property="sign.keystore.password"/>
  487. <not>
  488. <equals arg1="${sign.keystore}" arg2="" trim="true"/>
  489. </not>
  490. <not>
  491. <equals arg1="${sign.keystore.password}" arg2="" trim="true"/>
  492. </not>
  493. </and>
  494. </or>
  495. </condition>
  496. <condition property="skip-sign-alias-password-input">
  497. <or>
  498. <isfalse value="${sign.enabled}"/>
  499. <and>
  500. <isset property="sign.keystore"/>
  501. <isset property="sign.alias"/>
  502. <isset property="sign.alias.password"/>
  503. <not>
  504. <equals arg1="${sign.keystore}" arg2="" trim="true"/>
  505. </not>
  506. <not>
  507. <equals arg1="${sign.alias}" arg2="" trim="true"/>
  508. </not>
  509. <not>
  510. <equals arg1="${sign.alias.password}" arg2="" trim="true"/>
  511. </not>
  512. </and>
  513. </or>
  514. </condition>
  515. </target>
  516. <target name="set-keystore-password" if="netbeans.home" unless="skip-sign-keystore-password-input">
  517. <nb-enter-password keystore="${sign.keystore}" passwordproperty="sign.keystore.password"/>
  518. </target>
  519. <target name="set-alias-password" if="netbeans.home" unless="skip-sign-alias-password-input">
  520. <nb-enter-password keystore="${sign.keystore}" keyalias="${sign.alias}" passwordproperty="sign.alias.password"/>
  521. </target>
  522. <target name="set-password" depends="set-password-init,set-keystore-password,set-alias-password"/>
  523. <!--create JAD-->
  524. <target name="add-configuration" unless="contains.manifest.configuration">
  525. <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
  526. </nb-output>
  527. <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
  528. </nb-output>
  529. </target>
  530. <target name="add-profile" unless="contains.manifest.profile">
  531. <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
  532. </nb-output>
  533. <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
  534. </nb-output>
  535. </target>
  536. <target name="create-jad" if="cldc-platform.trigger">
  537. <fail unless="dist.jad">Must set dist.jad</fail>
  538. <mkdir dir="${build.dir}"/>
  539. <dirname file="${dist.dir}/${dist.jad}" property="dist.jad.dir"/>
  540. <mkdir dir="${dist.jad.dir}"/>
  541. <condition property="evaluated.manifest.apipermissions" value="${manifest.apipermissions}">
  542. <not>
  543. <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
  544. </not>
  545. </condition>
  546. <condition property="evaluated.manifest.pushregistry" value="${manifest.pushregistry}">
  547. <not>
  548. <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
  549. </not>
  550. </condition>
  551. <condition property="contains.manifest.configuration">
  552. <contains substring="MicroEdition-Configuration: " string="${manifest.others}"/>
  553. </condition>
  554. <condition property="contains.manifest.profile">
  555. <contains substring="MicroEdition-Profile: " string="${manifest.others}"/>
  556. </condition>
  557. <property value="" name="evaluated.manifest.apipermissions"/>
  558. <property value="" name="evaluated.manifest.pushregistry"/>
  559. <property name="manifest.jad" value=""/>
  560. <property name="manifest.manifest" value=""/>
  561. <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad}</nb-output>
  562. <nb-output file="${manifest.build.file}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest}</nb-output>
  563. <antcall target="add-configuration" inheritall="true" inheritrefs="true"/>
  564. <antcall target="add-profile" inheritall="true" inheritrefs="true"/>
  565. <property name="manifest.available" value="true"/>
  566. </target>
  567. <!--do-extra-libs-->
  568. <target name="do-extra-libs" if="extra.classpath">
  569. <property name="dist.lib.dir" value="${dist.dir}/lib"/>
  570. <mkdir dir="${dist.lib.dir}"/>
  571. <copypath destdir="${dist.lib.dir}" path="${extra.classpath}">
  572. <flattenmapper/>
  573. </copypath>
  574. </target>
  575. <!--nokiaS80-manifest-->
  576. <target name="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger">
  577. <fail message="Main class is not set!">
  578. <condition>
  579. <equals arg1="${main.class}" arg2="" trim="true"/>
  580. </condition>
  581. </fail>
  582. <mkdir dir="${build.dir}/j9"/>
  583. <taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/>
  584. <j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
  585. <copy file="${manifest.file}" tofile="${manifest.build.file}" failonerror="false"/>
  586. <property name="manifest.available" value="true"/>
  587. <loadfile property="nokia.manifest.j9" srcFile="${j9.dist}"/>
  588. </target>
  589. <target name="nokiaS80-prepare-manifest" depends="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger" unless="nokia.icon.invalid">
  590. <pathconvert property="logo.icon.name" pathsep=" ">
  591. <path path="${nokiaS80.application.icon}"/>
  592. <chainedmapper>
  593. <flattenmapper/>
  594. <globmapper from="*" to="*"/>
  595. </chainedmapper>
  596. </pathconvert>
  597. <copy file="${nokiaS80.application.icon}" todir="${buildsystem.baton}"/>
  598. <manifest file="${manifest.build.file}" mode="update">
  599. <attribute name="Main-Class" value="${main.class}"/>
  600. <attribute name="PproApp-Name" value="${application.name}"/>
  601. <attribute name="PproApp-Vendor" value="${application.vendor}"/>
  602. <attribute name="PproApp-Version" value="${deployment.number}"/>
  603. <attribute name="PproApp-Icon" value="${logo.icon.name}"/>
  604. <attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/>
  605. </manifest>
  606. </target>
  607. <target name="nokiaS80-prepare-manifest-no-icon" depends="nokiaS80-prepare-j9" if="nokia.icon.invalid">
  608. <manifest file="${manifest.build.file}" mode="update">
  609. <attribute name="Main-Class" value="${main.class}"/>
  610. <attribute name="PproApp-Name" value="${application.name}"/>
  611. <attribute name="PproApp-Vendor" value="${application.vendor}"/>
  612. <attribute name="PproApp-Version" value="${deployment.number}"/>
  613. <attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/>
  614. </manifest>
  615. </target>
  616. <target name="nokiaS80-create-manifest" depends="nokiaS80-prepare-j9,nokiaS80-prepare-manifest,nokiaS80-prepare-manifest-no-icon" if="nokiaS80-platform.trigger"/>
  617. <!--jad-jsr211-properties-->
  618. <target name="jad-jsr211-properties.check">
  619. <condition property="jad-jsr211-properties.allowed">
  620. <and>
  621. <isset property="cldc-platform.trigger"/>
  622. <isset property="netbeans.home"/>
  623. <isset property="is.mesdk_jsr211"/>
  624. </and>
  625. </condition>
  626. </target>
  627. <target name="jad-jsr211-properties" description="Updates JAD and manifest with JSR211 properties." depends="jad-jsr211-properties.check" if="jad-jsr211-properties.allowed">
  628. <jadjsr211properties jadfile="${dist.dir}/${dist.jad}" manifestfile="${build.dir}/${manifest.file}"/>
  629. </target>
  630. <!--semc-build-j9-->
  631. <target name="semc-build-j9" if="semc-platform.trigger">
  632. <epocpathsetter home="${platform.home}"/>
  633. <property name="semc.application.caps" value=""/>
  634. <mkdir dir="${platform.home}/epoc32/winscw/c/private/${semc.application.uid}"/>
  635. <mkdir dir="${build.dir}/j9"/>
  636. <fail message="Main class is not set!">
  637. <condition>
  638. <equals arg1="${main.class}" arg2="" trim="true"/>
  639. </condition>
  640. </fail>
  641. <j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
  642. </target>
  643. <!--do-jar-->
  644. <target name="do-jar" if="manifest.available">
  645. <dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/>
  646. <mkdir dir="${dist.jar.dir}"/>
  647. <property name="manifest.build.file" location="${manifest.file}"/>
  648. <jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}" manifest="${manifest.build.file}" manifestencoding="UTF-8">
  649. <fileset dir="${buildsystem.baton}"/>
  650. </jar>
  651. </target>
  652. <!--nsicom-create-manifest-->
  653. <target name="nsicom-create-manifest" if="nsicom-platform.trigger">
  654. <jar jarfile="${dist.dir}/${dist.jar}" compress="${jar.compress}" update="true">
  655. <manifest>
  656. <attribute name="Main-Class" value="${main.class}"/>
  657. </manifest>
  658. </jar>
  659. </target>
  660. <!--do-jar-no-manifest-->
  661. <target name="do-jar-no-manifest" unless="manifest.available">
  662. <dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/>
  663. <mkdir dir="${dist.jar.dir}"/>
  664. <jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}">
  665. <fileset dir="${buildsystem.baton}"/>
  666. </jar>
  667. </target>
  668. <!--update-jad-->
  669. <target name="update-jad" if="cldc-platform.trigger">
  670. <nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${dist.jar}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/>
  671. </target>
  672. <!--ricoh-init-dalp-->
  673. <target name="ricoh-init-dalp" if="ricoh-platform.trigger">
  674. <property name="ricoh.application.telephone" value=""/>
  675. <property name="ricoh.application.fax" value=""/>
  676. <property name="ricoh.application.email" value=""/>
  677. <condition property="no.unmanaged.dalp">
  678. <and>
  679. <isfalse value="${ricoh.dalp.is-managed}"/>
  680. <not>
  681. <available file="./${application.name}.dalp"/>
  682. </not>
  683. </and>
  684. </condition>
  685. <fail if="no.unmanaged.dalp" message="Dalp file ${application.name}.dalp is required in project directory when DALP management is set to off."/>
  686. <condition property="no.vendor.name" value="true">
  687. <equals arg1="${application.vendor}" arg2="" trim="true"/>
  688. </condition>
  689. <condition property="ricoh.icon.invalid" value="true">
  690. <or>
  691. <contains string="${ricoh.application.icon}" substring="$${"/>
  692. <equals arg1="${ricoh.application.icon}" arg2="" trim="true"/>
  693. </or>
  694. </condition>
  695. <mkdir dir="${dist.dir}/lib"/>
  696. </target>
  697. <!--ricoh-add-app-icon-->
  698. <target name="ricoh-add-app-icon" depends="ricoh-init-dalp" if="ricoh-platform.trigger" unless="ricoh.icon.invalid">
  699. <pathconvert property="icon.name" pathsep=" ">
  700. <path path="${ricoh.application.icon}"/>
  701. <chainedmapper>
  702. <flattenmapper/>
  703. <globmapper from="*" to="*"/>
  704. </chainedmapper>
  705. </pathconvert>
  706. <jar jarfile="${dist.jar}" compress="${jar.compress}" update="true">
  707. <fileset file="${ricoh.application.icon}"/>
  708. </jar>
  709. </target>
  710. <!--ricoh-build-dalp-with-icon-->
  711. <target name="ricoh-build-dalp-with-icon" depends="ricoh-add-app-icon" if="ricoh-platform.trigger" unless="ricoh.icon.invalid">
  712. <mkdir dir="${build.dir}/dalp/"/>
  713. <taskIf if="ricoh.dalp.is-managed" value="true">
  714. <dalp file="${dalp.dist}" iconname="${icon.name}">
  715. <fileset dir="${dist.dir}/lib"/>
  716. </dalp>
  717. <echo message="Managed dalp file ${dalp.dist} created w/ icon"/>
  718. </taskIf>
  719. <taskIf if="ricoh.dalp.is-managed" value="false">
  720. <copy tofile="${dalp.dist}">
  721. <fileset file="./${application.name}.dalp"/>
  722. </copy>
  723. <echo message="Non-managed dalp file ${dalp.dist} w/ icon imported"/>
  724. </taskIf>
  725. </target>
  726. <!--ricoh-build-dalp-without-icon-->
  727. <target name="ricoh-build-dalp-without-icon" if="ricoh.icon.invalid">
  728. <mkdir dir="${build.dir}/dalp/"/>
  729. <taskIf if="ricoh.dalp.is-managed" value="true">
  730. <dalp file="${dalp.dist}">
  731. <fileset dir="${dist.dir}/lib"/>
  732. </dalp>
  733. <echo message="Managed dalp file ${dalp.dist} created w/o icon"/>
  734. </taskIf>
  735. <taskIf if="ricoh.dalp.is-managed" value="false">
  736. <copy tofile="${dalp.dist}">
  737. <fileset file="./${application.name}.dalp"/>
  738. </copy>
  739. <echo message="Non-managed dalp file ${dalp.dist} w/o icon imported"/>
  740. </taskIf>
  741. </target>
  742. <target name="ricoh-build-dalp" depends="ricoh-build-dalp-with-icon,ricoh-build-dalp-without-icon" if="ricoh-platform.trigger">
  743. <copy todir="${dist.dir}" file="${dalp.dist}" overwrite="true"/>
  744. </target>
  745. <!--savaje-build-jnlp-->
  746. <target name="savaje-prepare-icon" if="savaje-platform.trigger" unless="savaje.icon.invalid">
  747. <pathconvert property="savaje.application.icon.name" pathsep=" ">
  748. <path path="${savaje.application.icon}"/>
  749. <chainedmapper>
  750. <flattenmapper/>
  751. <globmapper from="*" to="*"/>
  752. </chainedmapper>
  753. </pathconvert>
  754. <mkdir dir="${dist.dir}/lib"/>
  755. <copy tofile="${dist.dir}/lib/${savaje.application.icon.name}" file="${savaje.application.icon}" overwrite="true" failonerror="false"/>
  756. </target>
  757. <target name="savaje-build-jnlp" depends="savaje-prepare-icon" if="savaje-platform.trigger">
  758. <mkdir dir="${build.dir}/jnlp/"/>
  759. <taskdef resource="org/netbeans/modules/j2me/cdc/project/savaje/defs.properties">
  760. <classpath>
  761. <pathelement path="${libs.savaje-ant-utils.classpath}"/>
  762. </classpath>
  763. </taskdef>
  764. <jnlp dir="${build.dir}/jnlp/" file="bundle.jnlp" codebase="WTK_AGUI" distjar="lib/${dist.jar.name}" applicationicon="lib/${savaje.application.icon.name}" smallicon="${savaje.application.icon.small}" focusedicon="${savaje.application.icon.focused}" applicationtitle="${application.name}" applicationvendor="${application.vendor}" applicationDescription="${application.description}" applicationArgs="${application.args}" mainClass="${main.class}" debug="${savaje.bundle.debug}" debugport="${savaje.bundle.debug.port}">
  765. <fileset dir="${dist.dir}/lib"/>
  766. </jnlp>
  767. <policy file="${build.dir}/jnlp/bundle.policy" codebase="WTK_AGUI"/>
  768. <copy tofile="${dist.dir}/lib/classes.jar" file="${dist.dir}/${dist.jar}" overwrite="true"/>
  769. <copy todir="${dist.dir}" file="${build.dir}/jnlp/bundle.jnlp" overwrite="true"/>
  770. <copy tofile="${dist.dir}/bundle.policy" file="${build.dir}/jnlp/bundle.policy" overwrite="true"/>
  771. <copy todir="${dist.dir}/lib" overwrite="true" failonerror="false">
  772. <fileset dir="${resources.dir}"/>
  773. </copy>
  774. </target>
  775. <!--jar-->
  776. <target name="pre-jar"/>
  777. <target name="post-jar"/>
  778. <target name="jar" depends="preverify,pre-jar,set-password,create-jad,do-extra-libs,nokiaS80-create-manifest,jad-jsr211-properties,semc-build-j9,do-jar,nsicom-create-manifest,do-jar-no-manifest,update-jad,ricoh-build-dalp,savaje-build-jnlp,post-jar" description="Build jar and application descriptor."/>
  779. <!--override-jad-->
  780. <target name="override-jad" if="override.jarurl.trigger">
  781. <property name="deployment.jarurl" value="${dist.jar}"/>
  782. <nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${deployment.jarurl}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/>
  783. </target>
  784. <!--semc-make-sis-->
  785. <target name="-semc-sis-init" if="semc-platform.trigger" description="Init necessary properties for SEMC platform">
  786. <property name="pprolauncher.dir" value="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/>
  787. </target>
  788. <target name="semc-ppro-arm" if="semc-platform.trigger" description="Builds neccessary files for semc device">
  789. <exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/">
  790. <arg value="arm"/>
  791. <arg value="${application.name}"/>
  792. <arg value="${semc.application.uid}"/>
  793. <arg value="${j9.dist}"/>
  794. <arg value="${semc.application.caps}"/>
  795. <env key="SDKDRIVE" value="${sdkdrive}"/>
  796. <env key="EPOCROOT" value="${epocroot}"/>
  797. <env key="Path" value="${epocpath}"/>
  798. </exec>
  799. </target>
  800. <target name="semc-make-sis-icon" if="semc-platform.trigger" unless="semc.icon.invalid">
  801. <copy file="${semc.application.icon}" tofile="${pprolauncher.dir}/${semc.application.uid}.mbm" failonerror="false"/>
  802. </target>
  803. <target name="semc-make-sis" depends="semc-ppro-arm,semc-make-sis-icon" if="semc-platform.trigger" unless="no.application.uid" description="Builds SIS file for device">
  804. <property name="dll.dir" location="dll"/>
  805. <mkdir dir="${dll.dir}"/>
  806. <copy todir="${pprolauncher.dir}">
  807. <fileset dir="${dist.dir}">
  808. <exclude name="javadoc/**"/>
  809. </fileset>
  810. </copy>
  811. <copy todir="${pprolauncher.dir}">
  812. <fileset dir="${dll.dir}">
  813. <include name="**/*.dll"/>
  814. </fileset>
  815. </copy>
  816. <copy todir="${pprolauncher.dir}" failonerror="false">
  817. <fileset dir="${resources.dir}"/>
  818. </copy>
  819. <pkgmake workdir="${pprolauncher.dir}" id="${semc.application.uid}" appname="${application.name}" appicon="${semc.application.uid}.mbm" vendor="${application.vendor}" version="${deployment.number}" logo="${logo.image}" logoinstallonly="${logo.image.installonly}">
  820. <fileset dir="${dist.dir}">
  821. <exclude name="javadoc/**"/>
  822. </fileset>
  823. <fileset dir="${dll.dir}">
  824. <include name="**/*.dll"/>
  825. </fileset>
  826. <fileset dir="${resources.dir}"/>
  827. </pkgmake>
  828. <exec executable="${platform.home}/epoc32/tools/makesis" dir="${pprolauncher.dir}">
  829. <arg value="-d${pprolauncher.dir}"/>
  830. <arg value="PProLauncher${semc.application.uid}.pkg"/>
  831. <arg value="${application.name}.sis"/>
  832. <env key="SDKDRIVE" value="${sdkdrive}"/>
  833. <env key="EPOCROOT" value="${epocroot}"/>
  834. <env key="Path" value="${epocpath}"/>
  835. </exec>
  836. <copy todir="${dist.dir}">
  837. <fileset dir="${pprolauncher.dir}">
  838. <include name="**/*.SIS"/>
  839. <include name="**/*.sis"/>
  840. </fileset>
  841. </copy>
  842. </target>
  843. <target name="semc-sign-sis" if="semc-platform.trigger" depends="semc-make-sis" unless="no.certificateorkey" description="Sign SIS file">
  844. <exec executable="${platform.home}/epoc32/tools/signsis" dir="${pprolauncher.dir}">
  845. <arg value="-s"/>
  846. <arg value="${pprolauncher.dir}/${application.name}.sis"/>
  847. <arg value="${pprolauncher.dir}/${application.name}-SIGNED.sis"/>
  848. <arg value="${semc.certificate.path}"/>
  849. <arg value="${semc.private.key.path}"/>
  850. <arg value="${semc.private.key.password}"/>
  851. <env key="SDKDRIVE" value="${sdkdrive}"/>
  852. <env key="EPOCROOT" value="${epocroot}"/>
  853. <env key="Path" value="${epocpath}"/>
  854. </exec>
  855. <copy todir="${dist.dir}">
  856. <fileset dir="${pprolauncher.dir}">
  857. <include name="**/*.SIS"/>
  858. <include name="**/*.sis"/>
  859. </fileset>
  860. </copy>
  861. </target>
  862. <target name="semc-no-sign-sis" depends="semc-make-sis" if="no.certificateorkey" unless="no.application.uid" description="Prints out only info when SIS is not signed ">
  863. <echo message="Signed SIS was not created! Set up path to certificate and private key in project properties!"/>
  864. </target>
  865. <target name="-pre-semc-sis" if="semc-platform.trigger" description="Customizable target called before SIS file is built"/>
  866. <target name="semc-sis" if="semc-platform.trigger" depends="-semc-sis-init, -pre-semc-sis, semc-sign-sis,semc-no-sign-sis, -post-semc-sis" unless="no.application.uid"/>
  867. <target name="-post-semc-sis" if="semc-platform.trigger" description="Customizable target called after SIS file is built"/>
  868. <!--increment-app-version-->
  869. <target name="increment-app-version" if="app-version.autoincrement.trigger">
  870. <propertyfile file="nbproject/private/private.properties">
  871. <entry key="deployment.counter" type="int" operation="+" default="2" pattern="0"/>
  872. <entry key="deployment.number" value="000000${deployment.counter}"/>
  873. </propertyfile>
  874. <property name="deployment.number.pattern" value="\2\3.\5\6.\8\9"/>
  875. <replaceregexp byline="true" file="nbproject/private/private.properties" match="^deployment.number=[0-9]*(0|([1-9]))([0-9])(0|([1-9]))([0-9])(0|([1-9]))([0-9])$" replace="deployment.number=${deployment.number.pattern}"/>
  876. </target>
  877. <!--build-->
  878. <target name="pre-build"/>
  879. <target name="post-build"/>
  880. <target name="build" depends="jar,pre-build,override-jad,semc-sis,increment-app-version,post-build" description="Builds final distribution of the application."/>
  881. <!--open-netmon-->
  882. <target name="netmon.check">
  883. <condition property="netmon.allowed">
  884. <and>
  885. <not>
  886. <isset property="bdj-platform.trigger"/>
  887. </not>
  888. <isset property="netbeans.home"/>
  889. <isset property="is.mesdk_netmon"/>
  890. </and>
  891. </condition>
  892. </target>
  893. <target name="open-netmon" description="Open network monitor" depends="netmon.check" if="netmon.allowed">
  894. <opennetmon device="${platform.device}"/>
  895. </target>
  896. <!--cldc-run-->
  897. <target name="cldc-run" if="cldc-platform.trigger">
  898. <nb-run jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" jadurl="${dist.jad.url}" device="${platform.device}" platformhome="${platform.home}" platformtype="${platform.type}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.runcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/>
  899. </target>
  900. <!--ricoh-run-->
  901. <target name="ricoh-run" if="ricoh-platform.trigger">
  902. <copy todir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}" overwrite="true">
  903. <fileset dir="${dist.dir}">
  904. <patternset refid="deployment.patternset"/>
  905. </fileset>
  906. <flattenmapper/>
  907. </copy>
  908. <ant antfile="${platform.home}/startemulator.xml" target="start_emulator" dir="${platform.home}">
  909. <property name="emulator.skin" value="WVGA.xml"/>
  910. <property name="emulator.autolaunchid" value="${ricoh.application.uid}"/>
  911. </ant>
  912. </target>
  913. <!--semc-run-and-debug-prepare-targets-->
  914. <target name="semc-icon-assembly" if="semc-platform.trigger" unless="semc.icon.invalid">
  915. <copy file="${semc.application.icon}" tofile="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm" failonerror="false"/>
  916. <iconassembly home="${platform.home}" uid="${semc.application.uid}" count="${application.icon.count}"/>
  917. </target>
  918. <target name="semc-ppro-emulator" if="semc-platform.trigger" description="Builds neccessary files for semc emulator">
  919. <exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/">
  920. <arg value="win32"/>
  921. <arg value="${application.name}"/>
  922. <arg value="${semc.application.uid}"/>
  923. <arg value="${j9.dist}"/>
  924. <arg value="${semc.application.caps}"/>
  925. <env key="SDKDRIVE" value="${sdkdrive}"/>
  926. <env key="EPOCROOT" value="${epocroot}"/>
  927. <env key="Path" value="${epocpath}"/>
  928. </exec>
  929. </target>
  930. <target name="semc-do-run" if="semc-platform.trigger" description="Prepare log folders, copy necessary files">
  931. <copy todir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}">
  932. <fileset dir="${dist.dir}">
  933. <exclude name="javadoc/**"/>
  934. </fileset>
  935. </copy>
  936. <mkdir dir="${platform.home}/epoc32/winscw/c/logs/j9vm"/>
  937. <epocinipath file="${platform.home}/epoc32/data/epoc.ini"/>
  938. <exec executable="${platform.home}/epoc32/release/winscw/udeb/epoc.exe">
  939. <env key="SDKDRIVE" value="${sdkdrive}"/>
  940. <env key="EPOCROOT" value="${epocroot}"/>
  941. <env key="Path" value="${epocpath}"/>
  942. </exec>
  943. </target>
  944. <!--semc-run-->
  945. <target name="semc-run" depends="semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/>
  946. <!--savaje-run-->
  947. <target name="savaje-run" if="savaje-platform.trigger">
  948. <sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}">
  949. <fileset dir="${dist.dir}">
  950. <exclude name="javadoc/**"/>
  951. </fileset>
  952. </sunEmulatorExec>
  953. </target>
  954. <!--sjmc-run-->
  955. <target name="sjmc-run" if="sjmc-platform.trigger">
  956. <taskdef name="sjmcEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.sjmc.SJMCToolkitEmulatorExecTask" classpath="${libs.sjmc-ant-utils.classpath}"/>
  957. <sjmcEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}">
  958. <fileset dir="${dist.dir}">
  959. <exclude name="javadoc/**"/>
  960. </fileset>
  961. </sjmcEmulatorExec>
  962. </target>
  963. <!--nokiaS80-run-->
  964. <target name="nokiaS80-run" if="nokiaS80-platform.trigger">
  965. <mkdir dir="${platform.home}/epoc32/wins/c/PP_Applications"/>
  966. <mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/>
  967. <taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/>
  968. <nokiaexec jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}">
  969. <fileset dir="${dist.dir}">
  970. <exclude name="javadoc/**"/>
  971. </fileset>
  972. </nokiaexec>
  973. </target>
  974. <!--nsicom-run-->
  975. <target name="nsicom-run" if="nsicom-platform.trigger">
  976. <nsicomExecDeploy home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.jvmargs}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" verbose="${nsicom.application.runverbose}" hostip="${nsicom.application.monitorhost}" runondevice="${nsicom.application.runremote}" remotevmlocation="${nsicom.remotevm.location}" remoteDataLocation="${nsicom.remoteapp.location}">
  977. <fileset dir="${dist.dir}">
  978. <exclude name="javadoc/**"/>
  979. </fileset>
  980. </nsicomExecDeploy>
  981. </target>
  982. <!--cdc-hi-run-->
  983. <target name="-pre-cdc-hi-run" if="cdc-hi-platform.trigger"/>
  984. <target name="-cdc-hi-run" if="cdc-hi-platform.trigger">
  985. <exec executable="${platform.home}/bin/emulator">
  986. <arg value="-cp"/>
  987. <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
  988. <arg value="-Xdevice:${platform.device}"/>
  989. <arg value="${run.cmd.options}"/>
  990. <arg value="-Xmain:${main.class}"/>
  991. <arg value="${application.args}"/>
  992. </exec>
  993. </target>
  994. <target name="-post-cdc-hi-run" if="cdc-hi-platform.trigger"/>
  995. <target name="cdc-hi-run" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-run, -cdc-hi-run, -post-cdc-hi-run"/>
  996. <!--open-profiler-->
  997. <target name="profiler.check">
  998. <condition property="profiler.allowed">
  999. <and>
  1000. <not>
  1001. <isset property="bdj-platform.trigger"/>
  1002. </not>
  1003. <isset property="netbeans.home"/>
  1004. <isset property="is.mesdk_profiler"/>
  1005. </and>
  1006. </condition>
  1007. </target>
  1008. <target name="open-profiler" description="Open profiler snapshot" depends="profiler.check" if="profiler.allowed">
  1009. <openprofiler device="${platform.device}"/>
  1010. </target>
  1011. <!--run-->
  1012. <target name="pre-run"/>
  1013. <target name="run" depends="jar,pre-run,open-netmon,cldc-run,ricoh-run,semc-run,savaje-run,sjmc-run,nokiaS80-run,nsicom-run,cdc-hi-run,open-profiler" description="Run MIDlet suite."/>
  1014. <target name="run-no-build" depends="init,pre-run,open-netmon,cldc-run,ricoh-run,semc-run,savaje-run,sjmc-run,nokiaS80-run,nsicom-run,cdc-hi-run,open-profiler" description="Quick Run already built MIDlet suite."/>
  1015. <!--cldc-debug-->
  1016. <target name="cldc-debug" if="cldc-platform.trigger">
  1017. <parallel>
  1018. <nb-run debug="true" debugsuspend="true" debugserver="true" debuggeraddressproperty="jpda.port" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadfile="${dist.dir}/${dist.jad}" jadurl="${dist.jad.url}" jarfile="${dist.dir}/${dist.jar}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.debugcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/>
  1019. <sequential>
  1020. <sleep seconds="5"/>
  1021. <antcall target="nbdebug"/>
  1022. </sequential>
  1023. </parallel>
  1024. </target>
  1025. <!--ricoh-debug-->
  1026. <target name="ricoh-debug" if="ricoh-platform.trigger">
  1027. <copy todir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}" overwrite="true">
  1028. <fileset dir="${dist.dir}">
  1029. <patternset refid="deployment.patternset"/>
  1030. </fileset>
  1031. <flattenmapper/>
  1032. </copy>
  1033. <parallel>
  1034. <ant antfile="${platform.home}/startemulator_debug.xml" target="debug_emulator" dir="${platform.home}">
  1035. <property name="emulator.skin" value="WVGA.xml"/>
  1036. <property name="emulator.autolaunchid" value="${ricoh.application.uid}"/>
  1037. </ant>
  1038. <sequential>
  1039. <sleep seconds="5"/>
  1040. <property name="jpda.port" value="8000"/>
  1041. <property name="debug.period" value="3000"/>
  1042. <antcall target="nbdebug" inheritall="true" inheritrefs="true"/>
  1043. </sequential>
  1044. </parallel>
  1045. </target>
  1046. <!--semc-debug-->
  1047. <!--semc-build-j9-debug-->
  1048. <target name="semc-build-j9-debug" if="semc-platform.trigger">
  1049. <fail message="Main class is not set!">
  1050. <condition>
  1051. <equals arg1="${main.class}" arg2=""/>
  1052. </condition>
  1053. </fail>
  1054. <j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
  1055. </target>
  1056. <target name="semc-debug-start" if="semc-platform.trigger">
  1057. <nbjpdastart transport="dt_socket" addressproperty="jpda.port" name="${main.class}">
  1058. <classpath>
  1059. <path path="${build.classes.dir}"/>
  1060. </classpath>
  1061. <bootclasspath>
  1062. <path path="${platform.bootclasspath}"/>
  1063. </bootclasspath>
  1064. </nbjpdastart>
  1065. </target>
  1066. <target name="semc-debug" depends="semc-debug-start,semc-build-j9-debug,semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/>
  1067. <!--savaje-debug-->
  1068. <target name="savaje-debug" if="savaje-platform.trigger">
  1069. <parallel>
  1070. <sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port">
  1071. <fileset dir="${dist.dir}">
  1072. <exclude name="javadoc/**"/>
  1073. </fileset>
  1074. </sunEmulatorExec>
  1075. <sequential>
  1076. <sleep seconds="5"/>
  1077. <antcall target="nbdebug"/>
  1078. </sequential>
  1079. </parallel>
  1080. </target>
  1081. <!--sjmc-debug-->
  1082. <target name="sjmc-debug" if="sjmc-platform.trigger">
  1083. <taskdef name="sjmcEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.sjmc.SJMCToolkitEmulatorExecTask" classpath="${libs.sjmc-ant-utils.classpath}"/>
  1084. <parallel>
  1085. <sjmcEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port">
  1086. <fileset dir="${dist.dir}">
  1087. <exclude name="javadoc/**"/>
  1088. </fileset>
  1089. </sjmcEmulatorExec>
  1090. <sequential>
  1091. <sleep seconds="1"/>
  1092. <antcall target="nbdebug"/>
  1093. </sequential>
  1094. </parallel>
  1095. </target>
  1096. <!--cdc-hi-debug-->
  1097. <target name="-pre-cdc-hi-debug" if="cdc-hi-platform.trigger"/>
  1098. <target name="-cdc-hi-debug" if="cdc-hi-platform.trigger">
  1099. <taskdef name="freePortRetriever" classname="org.netbeans.modules.j2me.cdc.project.savaje.FreePortRetriever" classpath="${libs.savaje-ant-utils.classpath}"/>
  1100. <freePortRetriever debuggerPortProperty="active.debug.port"/>
  1101. <parallel>
  1102. <exec executable="${platform.home}/bin/emulator">
  1103. <arg value="-cp"/>
  1104. <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
  1105. <arg value="-Xdevice:${platform.device}"/>
  1106. <arg value="-Xmain:${main.class}"/>
  1107. <arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
  1108. <arg value="-Xdebug"/>
  1109. </exec>
  1110. <property name="debug.delay" value="500"/>
  1111. <nb-mobility-debug address="${active.debug.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
  1112. </parallel>
  1113. </target>
  1114. <target name="-post-cdc-hi-debug" if="cdc-hi-platform.trigger"/>
  1115. <target name="cdc-hi-debug" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-debug, -cdc-hi-debug, -post-cdc-hi-debug"/>
  1116. <!--nokiaS80-debug-->
  1117. <target name="nokiaS80-debug" if="nokiaS80-platform.trigger">
  1118. <taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/>
  1119. <j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
  1120. <mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/>
  1121. <taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/>
  1122. <parallel>
  1123. <nokiaexec debug="true" debuggeraddressproperty="jpda.port" jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}">
  1124. <fileset dir="${dist.dir}">
  1125. <exclude name="javadoc/**"/>
  1126. </fileset>
  1127. </nokiaexec>
  1128. <sequential>
  1129. <sleep seconds="10"/>
  1130. <antcall target="nbdebug"/>
  1131. </sequential>
  1132. </parallel>
  1133. </target>
  1134. <!--nsicom-debug-->
  1135. <target name="nsicom-debug" if="nsicom-platform.trigger">
  1136. <fail message="Debugging is not supported in this NSIcom VM version. Use monitoring facility instead!"/>
  1137. </target>
  1138. <!--debug-->
  1139. <target name="remove-timestamp">
  1140. <delete file="$/.timestamp"/>
  1141. </target>
  1142. <target name="pre-debug"/>
  1143. <target name="debug" description="Debug project." depends="clean,jar,remove-timestamp,pre-debug,cldc-debug,ricoh-debug,semc-debug,savaje-debug,sjmc-debug,cdc-hi-debug,nokiaS80-debug,nsicom-debug"/>
  1144. <target name="nbdebug" description="Start NetBeans debugger" if="netbeans.home">
  1145. <property name="debug.delay" value="5000"/>
  1146. <nb-mobility-debug address="${jpda.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
  1147. </target>
  1148. <target name="debug-run-base" depends="cldc-debug-run,cdc-hi-debug-run"/>
  1149. <target name="-pre-cldc-debug-run" if="cldc-platform.trigger"/>
  1150. <target name="-cldc-debug-run" depends="init,jar" if="cldc-platform.trigger">
  1151. <echo> Starting emulator with port number ${active.debug.port} </echo>
  1152. <exec executable="${platform.home}/bin/emulator">
  1153. <arg value="-Xdescriptor:${basedir}/${dist.dir}/${dist.jad}"/>
  1154. <arg value="-Xdevice:${platform.device}"/>
  1155. <arg value="-Xdebug"/>
  1156. <arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
  1157. </exec>
  1158. </target>
  1159. <target name="-post-cldc-debug-run" if="cldc-platform.trigger"/>
  1160. <target name="cldc-debug-run" if="cldc-platform.trigger" depends="-pre-cldc-debug-run, -cldc-debug-run, -post-cldc-debug-run"/>
  1161. <target name="-pre-cdc-hi-debug-run" if="cdc-hi-platform.trigger"/>
  1162. <target name="-cdc-hi-debug-run" depends="init,jar" if="cdc-hi-platform.trigger">
  1163. <echo> Starting emulator with port number ${active.debug.port} </echo>
  1164. <exec executable="${platform.home}/bin/emulator">
  1165. <arg value="-cp"/>
  1166. <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
  1167. <arg value="-Xdevice:${platform.device}"/>
  1168. <arg value="-Xmain:${main.class}"/>
  1169. <arg value="-Xdebug"/>
  1170. <arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
  1171. </exec>
  1172. </target>
  1173. <target name="-post-cdc-hi-debug-run" if="cdc-hi-platform.trigger"/>
  1174. <target name="cdc-hi-debug-run" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-debug-run, -cdc-hi-debug-run, -post-cdc-hi-debug-run"/>
  1175. <!--javadoc-->
  1176. <target name="browse-javadoc" if="netbeans.home" unless="no.javadoc.preview">
  1177. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  1178. </target>
  1179. <target name="javadoc" depends="preprocess">
  1180. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  1181. <mkdir dir="${dist.javadoc.dir}"/>
  1182. <javadoc source="${javac.source}" destdir="${dist.javadoc.dir}" bootclasspath="${platform.bootclasspath}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" encoding="${javac.encoding}" docencoding="${javac.encoding}" charset="${javac.encoding}">
  1183. <classpath>
  1184. <path path="${libs.classpath}"/>
  1185. </classpath>
  1186. <sourcepath>
  1187. <pathelement location="${buildsystem.baton}"/>
  1188. </sourcepath>
  1189. </javadoc>
  1190. <antcall target="browse-javadoc"/>
  1191. </target>
  1192. <!--clean and build-->
  1193. <target name="rebuild" depends="clean,build" description="Rebuild the application."/>
  1194. <target name="clean-timestamp">
  1195. <delete file="${build.dir}/.timestamp"/>
  1196. </target>
  1197. <target name="clean-preprocessed">
  1198. <delete dir="${preprocessed.dir}"/>
  1199. </target>
  1200. <target name="clean-classes">
  1201. <delete dir="${build.classes.dir}"/>
  1202. </target>
  1203. <target name="clean-obfuscated">
  1204. <delete file="${obfuscator.srcjar}"/>
  1205. <delete file="${obfuscator.destjar}"/>
  1206. <delete dir="${obfuscated.classes.dir}"/>
  1207. </target>
  1208. <target name="clean-preverified">
  1209. <delete dir="${preverify.sources.dir}"/>
  1210. <delete dir="${preverify.classes.dir}"/>
  1211. </target>
  1212. <target name="clean-manifest" if="manifest.build.file">
  1213. <delete file="${manifest.build.file}"/>
  1214. </target>
  1215. <target name="clean-jar">
  1216. <delete file="${dist.dir}/${dist.jar}"/>
  1217. </target>
  1218. <target name="clean-jad">
  1219. <delete file="${dist.dir}/${dist.jad}"/>
  1220. </target>
  1221. <target name="clean-javadoc">
  1222. <delete dir="${dist.javadoc.dir}"/>
  1223. </target>
  1224. <target name="clean-j9" if="j9.dist">
  1225. <delete file="${j9.dist}"/>
  1226. </target>
  1227. <target name="clean-ricoh" if="ricoh-platform.trigger">
  1228. <delete dir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}"/>
  1229. <delete dir="${build.dir}/dalp"/>
  1230. <delete file="${dist.dir}/${application.name}.dalp"/>
  1231. <delete dir="${dist.dir}/lib"/>
  1232. </target>
  1233. <target name="clean-semc" if="semc-platform.trigger">
  1234. <delete dir="${dist.dir}" includes="*.sis,*.SIS"/>
  1235. <delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/win32/PProLauncher${semc.application.uid}"/>
  1236. <delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/>
  1237. <delete file="${platform.home}/epoc32/release/winscw/udeb/PProLauncher${semc.application.uid}.exe"/>
  1238. <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/>
  1239. <delete file="${platform.home}/epoc32/release/winscw/udeb/z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/>
  1240. <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/>
  1241. <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm"/>
  1242. <delete file="${platform.home}/epoc32/data/Z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/>
  1243. <delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/>
  1244. <delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/>
  1245. <delete dir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}"/>
  1246. </target>
  1247. <target name="clean-savaje" if="savaje-platform.trigger">
  1248. <delete dir="${build.dir}/jnlp"/>
  1249. <delete file="${dist.dir}/bundle.jnlp"/>
  1250. <delete file="${dist.dir}/bundle.policy"/>
  1251. <delete dir="${dist.dir}/lib"/>
  1252. </target>
  1253. <target name="clean-sjmc" if="sjmc-platform.trigger">
  1254. <delete dir="${dist.dir}/lib"/>
  1255. </target>
  1256. <!--clean-->
  1257. <target name="pre-clean"/>
  1258. <target name="post-clean"/>
  1259. <target name="-clean-configuration">
  1260. <condition property="can.clean.config.completely">
  1261. <not>
  1262. <equals arg1="${config.active}" arg2="" trim="true"/>
  1263. </not>
  1264. </condition>
  1265. </target>
  1266. <target name="-clean-configuration-root" depends="-clean-configuration" if="can.clean.config.completely">
  1267. <delete dir="${build.dir}"/>
  1268. <delete dir="${dist.dir}"/>
  1269. <available property="dist.dir.exists" file="dist"/>
  1270. <condition property="dist.dir.empty">
  1271. <and>
  1272. <isset property="dist.dir.exists"/>
  1273. <resourcecount count="0">
  1274. <fileset dir="dist"/>
  1275. </resourcecount>
  1276. </and>
  1277. </condition>
  1278. </target>
  1279. <target name="-clean-default-configuration-root" depends="-clean-configuration" unless="can.clean.config.completely">
  1280. <tempfile deleteonexit="true" property="tmp.exclude" prefix="convert"/>
  1281. <echo file="${tmp.exclude}">${all.configurations}</echo>
  1282. <replaceregexp file="${tmp.exclude}" match="(.)(,|$)" replace="\1/**\2" flags="g"/>
  1283. <loadfile srcfile="${tmp.exclude}" property="exclude.pattern"/>
  1284. <delete file="${tmp.exclude}"/>
  1285. <delete quiet="true">
  1286. <fileset dir="${build.dir}" excludes="${exclude.pattern}"/>
  1287. </delete>
  1288. <delete quiet="true">
  1289. <fileset dir="${dist.dir}" excludes="${exclude.pattern}"/>
  1290. </delete>
  1291. <delete quiet="true">
  1292. <fileset dir="${dist.dir}/lib"/>
  1293. </delete>
  1294. <available property="dist.dir.exists" file="dist"/>
  1295. <condition property="dist.dir.empty">
  1296. <and>
  1297. <isset property="dist.dir.exists"/>
  1298. <resourcecount count="0">
  1299. <fileset dir="dist"/>
  1300. </resourcecount>
  1301. </and>
  1302. </condition>
  1303. </target>
  1304. <target name="-clean-completely" if="dist.dir.empty">
  1305. <delete dir="build" quiet="true"/>
  1306. <delete dir="dist" quiet="true"/>
  1307. </target>
  1308. <target name="do-clean" depends="pre-clean,clean-timestamp,clean-preprocessed,clean-classes,clean-obfuscated,clean-preverified,clean-manifest,clean-jar,clean-jad,clean-javadoc,clean-j9,clean-ricoh,clean-semc,clean-savaje,clean-sjmc,-clean-default-configuration-root,-clean-configuration-root,-clean-completely,post-clean"/>
  1309. <target name="clean" depends="conditional-clean" if="no.clean.before.build" description="Clean build products.">
  1310. <antcall target="do-clean" inheritall="true" inheritrefs="true"/>
  1311. </target>
  1312. <!--deploy-->
  1313. <target name="pre-deploy"/>
  1314. <target name="do-deploy" if="deployment.method" unless="skip.deployment">
  1315. <fail unless="deployment.scriptfile">Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment.</fail>
  1316. <ant antfile="${deployment.scriptfile}" inheritall="true" inheritrefs="true"/>
  1317. <antcall target="post-deploy" inheritall="true" inheritrefs="true"/>
  1318. </target>
  1319. <target name="post-deploy"/>
  1320. <target name="deploy" depends="build,pre-deploy,do-deploy,post-deploy"/>
  1321. <!--for-all-configs targets-->
  1322. <target name="for-all-configs" depends="load-properties">
  1323. <fail unless="libs.ant-contrib.classpath">Classpath to Ant Contrib library (libs.ant-contrib.classpath property) is not set.</fail>
  1324. <property name="selected.configurations" value="${all.configurations}"/>
  1325. <taskdef resource="net/sf/antcontrib/antlib.xml">
  1326. <classpath>
  1327. <pathelement path="${libs.ant-contrib.classpath}"/>
  1328. </classpath>
  1329. </taskdef>
  1330. <for list="${selected.configurations}" param="cfg" keepgoing="true" trim="true">
  1331. <sequential>
  1332. <echo>Active project configuration: @{cfg}</echo>
  1333. <antcall target="${target.to.call}" inheritall="false" inheritrefs="false">
  1334. <param name="config.active" value="@{cfg}"/>
  1335. <propertyset>
  1336. <propertyref name="no.deps"/>
  1337. </propertyset>
  1338. </antcall>
  1339. <property name="no.deps" value="true"/>
  1340. </sequential>
  1341. </for>
  1342. </target>
  1343. <target name="jar-all">
  1344. <antcall target="for-all-configs">
  1345. <param name="target.to.call" value="jar"/>
  1346. </antcall>
  1347. </target>
  1348. <target name="build-all">
  1349. <antcall target="for-all-configs">
  1350. <param name="target.to.call" value="build"/>
  1351. </antcall>
  1352. </target>
  1353. <target name="javadoc-all">
  1354. <antcall target="for-all-configs">
  1355. <param name="target.to.call" value="javadoc"/>
  1356. </antcall>
  1357. </target>
  1358. <target name="deploy-all">
  1359. <antcall target="for-all-configs">
  1360. <param name="target.to.call" value="deploy"/>
  1361. </antcall>
  1362. </target>
  1363. <target name="rebuild-all">
  1364. <antcall target="for-all-configs">
  1365. <param name="target.to.call" value="rebuild"/>
  1366. </antcall>
  1367. </target>
  1368. <target name="clean-all">
  1369. <property file="nbproject/project.properties"/>
  1370. <fail unless="build.root.dir">Property build.root.dir is not set. By default its value should be \"build\".</fail>
  1371. <fail unless="dist.root.dir">Property dist.root.dir is not set. By default its value should be \"dist\".</fail>
  1372. <antcall target="for-all-configs">
  1373. <param name="target.to.call" value="clean"/>
  1374. </antcall>
  1375. </target>
  1376. </project>