java

位置:IT落伍者 >> java >> 浏览文章

在Eclipse中使用Ant来自动编译J2me程序[3]


发布日期:2020年03月01日
 
在Eclipse中使用Ant来自动编译J2me程序[3]

<?xml version= encoding=GBK?>

<project name=automake default=end basedir=>

<property file=CONFproperties/>

<property name=srcdir value=${basedir}\src/>

<property name=resdir value=${basedir}\res/>

<property name=builddir value=${basedir}\build/>

<property name=deploydir value=${basedir}\deploy/>

<property name=packagedir value=${basedir}\package/>

<property name=packageextractdir value=${packagedir}\extract/>

<property name=preverifieddir value=${basedir}\preverified/>

<property name=preverifiednoObfusedClassdir value=${preverifieddir}\noObfused\classes/>

<property name=preverifiedobfusedClassdir value=${preverifieddir}\obfused\classes/>

<property name=preverifybin value=${wtkhomedir}\bin\preverifyexe/>

<property name=emulatorbin value=${wtkhomedir}\bin\emulatorexe/>

<property name=proguardlibdir value=${basedir}\lib/>

<property name=jadfile value=${programName}jad/>

<target name=init description=初始化环境>

<echo message=初始化目录/>

<delete dir=${builddir}/>

<delete dir=${deploydir}/>

<delete dir=${packagedir}/>

<delete dir=${preverifieddir}/>

<mkdir dir=${builddir}/>

<mkdir dir=${deploydir}/>

<mkdir dir=${packagedir}/>

<mkdir dir=${packageextractdir}/>

<mkdir dir=${preverifieddir}/>

<mkdir dir=${preverifiednoObfusedClassdir}/>

<mkdir dir=${preverifiedobfusedClassdir}/>

</target>

<target name=complie depends=init description=编译>

<echo message=编译程序/>

<javac srcdir=${srcdir} destdir=${builddir}>

<bootclasspath path=${midplibdir}/>

<classpath>

<fileset dir=${midplibdir} includes=*jar/>

</classpath>

</javac>

</target>

<target name=verifyForNoObfuscate description=验证jme的class将验证后的class输出到${preverifiednoObfusedClassdir}>

<echo message=验证生成的class将验证后的class输出到${preverifiednoObfusedClassdir}/>

<exec executable=${preverifybin} searchpath=false>

<arg line=classpath ${midplibpath}/>

<arg line=d ${preverifiednoObfusedClassdir}/>

<arg line=${builddir}/>

</exec>

</target>

<target name=genManifest description=根据模板属性文件的值生成Manifest文件>

<echo message=根据模板属性文件的值生成Manifest文件/>

[] [] [] []

               

上一篇:在Eclipse中使用Ant来自动编译J2me程序[2]

下一篇:在Eclipse中使用Ant来自动编译J2me程序[4]