Hello Tzur,

i have entendet the buildfiles for my own purpose, to support preprocessing.

I also noticed, that the shipped templates from eclipseME contain redundant task, initialisation is done more than once.

Look at those three XML-Files. Maybe you can can use it as a base for your work. (if they don't come through the mailing-list, then write a mail to me!)

Markus


tzur Sayag schrieb:
looks that way,
thanx Omry, I'll revert to writing my own build file.
did you get around to fixing the encoding issue we found a few weeks ago? I haven't seen an update on that one.
Shlomot,
--tzurs

On Nov 10, 2007 12:50 AM, Omry Yadan <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Personally I don't use the automatic generation of build files, so I
    can't be sure. (I got my own build system).

    it's possible that EclipseME does not support the preprocessor in the
    automated build file yet.


    tzur Sayag wrote:

    > that's obvious,
    > however, the generated build.xml and eclipseme-build.xml
    > are looking at "src" by default, obviously you don't want to run
    the
    > preprocessor on src and write to src (which is source controled read
    > only) so other than making some real changes in the autogenerated
    > files, which I can do of course,
    > I was wondering if I'm missing some simple property that I
    should set
    > and "everything" works.
    > if I have to manually make it work, having many too "gmake" years on
    > my back, I'm sure I'll get it to work,
    > again,
    > *I was wondering if I'm missing some simple property that I
    should set
    > that would run the preprocessor at the appropriate time placing its
    > output in the correct location for the build.*
    > thanx!
    > --tzurs
    >
    > On Nov 10, 2007 12:32 AM, Omry Yadan < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
    >
    >     Preprocessing should happen before you compile the code.
    >
    >
    >     tzur Sayag wrote:
    >
    >     > Hi Guys,
    >     >
    >     > I finally got to doing this, I generated the Build.xml
    file and
    >     wish
    >     > to add the preprocessing task to it,
    >     > I created the target and assign the right symbols to it,
    running the
    >     > task even works and
    >     > places my preprocessed files in output\src
    >     > now the issue is when to call this target, I'm not sure I
    fully
    >     > understand the way
    >     > the current eclipseME build works,
    >     > I'm running the deployedSuite target and it seems to go
    through some
    >     > many steps of initilizing the environment, compiling,
    copying the
    >     > source to some tmp directory etc,
    >     > if anyone can hint on where the preprocessing phase should
    go, I
    >     would
    >     > assume its basically the first step, but when I place it
    as a first
    >     > step on which the deployedSuite depends, it runs but then
    I think
    >     > everything gets deleted and compiled again but not from the
    >     > preprocessor output but from the original src folder, so the
    >     > preprocessing phase is basically not taken into account,
    >     > can anyone hint on where its best to put the target in the
    build.xml
    >     > file? (yes I know its not a file I should be editing but what
    >     can I do
    >     > if the preprocessing phase is not there?),
    >     >
    >     >
    >     > thanx again for any time saving tip,
    >     > --tzurs
    >     >
    >     > On Nov 4, 2007 9:04 PM, tzur Sayag < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    >     <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
    >     > <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote:
    >     >
    >     >     mucho gracias or the tips!
    >     >     I had no direction, thought the synbol set is a j2me
    feature,
    >     >     now clear, cheers!
    >     >     --t
    >     >
    >     >
    >     >     On 11/4/07, *Markus Sinner* < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    >     <mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
    >     >     <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>>>
    >     wrote:
    >     >
    >     >         Yes, that is possible. I do it with shell-scripts like
    >     these:
    >     >
    >     >         ant -Dsymbols=RELEASE,NETWORK
    >     >
    >     >         And you can specify a device in a wtk-task. Parameter
    >     "device"
    >     >         allows
    >     >         you to choose a device, like "Generic/midp2". Then
    you
    >     can use
    >     >         preprocessor-directives like #if
    JavaPlatform=="MIDP/2.0".
    >     >         See
    http://antenna.sourceforge.net/wtkpreprocess.php
    <http://antenna.sourceforge.net/wtkpreprocess.php>
    >     <http://antenna.sourceforge.net/wtkpreprocess.php>
    >     >
    >     >         Markus
    >     >
    >     >         tzur Sayag schrieb:
    >     >         > Hi guys,
    >     >         >
    >     >         > is there any way to build multiple versions
    (each using a
    >     >         differnet
    >     >         > symbol set, say : "Nokia", "Sony" etc)
    >     >         > using antenna?
    >     >         > is it possible to change the symbol set (I can't
    find
    >     where the
    >     >         > project symbol set is defined) via some
    >     >         > wtk task?
    >     >         > any help, as usual, much appreciated,
    >     >         > --tzurs
    >     >         >
    >     >
> ------------------------------------------------------------------------
    >
    >     >         >
    >     >         >
    >     >
> -------------------------------------------------------------------------
    >     >
    >     >         > This SF.net email is sponsored by: Splunk Inc.
    >     >         > Still grepping through log files to find
    problems?  Stop.
    >     >         > Now Search log events and configuration files using
    >     AJAX and
    >     >         a browser.
    >     >         > Download your FREE copy of Splunk now >>
    >     http://get.splunk.com/
    >     >         >
    >     >
> ------------------------------------------------------------------------
    >     >         >
    >     >         > _______________________________________________
    >     >         > Eclipseme-users mailing list
    >     >         > [email protected]
    <mailto:[email protected]>
    >     <mailto:[email protected]
    <mailto:[email protected]>>
    >     >         <mailto: [email protected]
    <mailto:[email protected]>
    >     <mailto:[email protected]
    <mailto:[email protected]>>>
    >     >         >
    >     https://lists.sourceforge.net/lists/listinfo/eclipseme-users
> <https://lists.sourceforge.net/lists/listinfo/eclipseme-users
    <https://lists.sourceforge.net/lists/listinfo/eclipseme-users>>
    >     >
    >     <https://lists.sourceforge.net/lists/listinfo/eclipseme-users>
    >     >         >
    >     >
    >     >
> -------------------------------------------------------------------------
    >
    >     >         This SF.net email is sponsored by: Splunk Inc.
    >     >         Still grepping through log files to find problems?
     Stop.
    >     >         Now Search log events and configuration files
    using AJAX
    >     and a
    >     >         browser.
    >     >         Download your FREE copy of Splunk now >>
    >     http://get.splunk.com/
    >     >         _______________________________________________
    >     >         Eclipseme-users mailing list
    >     >         [email protected]
    <mailto:[email protected]>
    >     <mailto:[email protected]
    <mailto:[email protected]>>
    >     >         <mailto: [email protected]
    <mailto:[email protected]>
    >     <mailto:[email protected]
    <mailto:[email protected]>>>
> > https://lists.sourceforge.net/lists/listinfo/eclipseme-users
    >     >
    >     >
    >     >
    >     >
> ------------------------------------------------------------------------
    >     >
    >     >
> -------------------------------------------------------------------------

    >     > This SF.net email is sponsored by: Splunk Inc.
    >     > Still grepping through log files to find problems?  Stop.
    >     > Now Search log events and configuration files using AJAX and a
    >     browser.
    >     > Download your FREE copy of Splunk now >>
    http://get.splunk.com/
    >     >
> ------------------------------------------------------------------------

    >     >
    >     > _______________________________________________
    >     > Eclipseme-users mailing list
    >     > [email protected]
    <mailto:[email protected]>
    >     <mailto:[email protected]
    <mailto:[email protected]>>
    >     > https://lists.sourceforge.net/lists/listinfo/eclipseme-users
    >     >
    >
    >
> -------------------------------------------------------------------------
    >     This SF.net email is sponsored by: Splunk Inc.
    >     Still grepping through log files to find problems?  Stop.
    >     Now Search log events and configuration files using AJAX and a
    >     browser.
    >     Download your FREE copy of Splunk now >> http://get.splunk.com/
    >     _______________________________________________
    >     Eclipseme-users mailing list
    >     [email protected]
    <mailto:[email protected]>
    >     <mailto:[email protected]
    <mailto:[email protected]>>
    >     https://lists.sourceforge.net/lists/listinfo/eclipseme-users
    >
    >
    >
    ------------------------------------------------------------------------
    >
    >
    -------------------------------------------------------------------------

    > This SF.net email is sponsored by: Splunk Inc.
    > Still grepping through log files to find problems?  Stop.
    > Now Search log events and configuration files using AJAX and a
    browser.
    > Download your FREE copy of Splunk now >> http://get.splunk.com/
    >
    ------------------------------------------------------------------------
    >
    > _______________________________________________
    > Eclipseme-users mailing list
    > [email protected]
    <mailto:[email protected]>
    > https://lists.sourceforge.net/lists/listinfo/eclipseme-users
    >


    -------------------------------------------------------------------------
    This SF.net email is sponsored by: Splunk Inc.
    Still grepping through log files to find problems?  Stop.
    Now Search log events and configuration files using AJAX and a
    browser.
    Download your FREE copy of Splunk now >> http://get.splunk.com/
    _______________________________________________
    Eclipseme-users mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/eclipseme-users


------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
------------------------------------------------------------------------

_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users
<!-- ================================================================================= -->
<!-- This build file automatically generated by EclipseME                              -->
<!-- Version 1.5.5 on Thu Dec 07 10:29:04 CET 2006.                                    -->
<!--                                                                                   -->
<!-- Modifications may be made to this file and to the user-build.properties files.    -->
<!-- Do not alter eclipseme-build.xml or eclipseme-build.properties.                   -->
<!-- ================================================================================= -->
<project name="MobileADR" default="deployedSuite" basedir=".">
	<!-- User build properties come first so that they can override -->
	<!-- the generated properties file.  Be careful with these      -->
	<!-- overrides.                                                 -->
	<property file="user-build.properties" />
	
	<!-- Generated properties come next.  The properties in this    -->
	<!-- file drive the build process and should not be changed.    -->
	<property file="eclipseme-build.properties" />
	
	<!-- Import the low-level targets -->
	<import file="eclipseme-build.xml" />
	
	<!-- The primary target of the build file.  The end result is   -->
	<!-- the deployed jar and jad files.                            -->
	<target name="deployedSuite" depends="deployable" />

	<!-- Initialize the build environment as necessary -->
	<target name="-initialize" description="Initializes the build environment">
		<echo message="Initializing build environment..." />
		
		<!-- Create the build directories -->
		<mkdir dir="${path.build}" />
		<mkdir dir="${path.build.classes}" />
		<mkdir dir="${path.build.classes}/_no_export" />
		<mkdir dir="${path.build.output}" />
		<mkdir dir="${path.build.processed}" />
	</target>
	
	<!-- Build the classes that make up the midlet -->
	<target name="build" depends="-initialize,-eclipseme-build"
		description="Builds the classes that make up the project">
	</target>
	
	<!-- Package up the compiled code without obfuscation -->
	<target name="jar" depends="build,-eclipseme-jar"
		description="Packages the midlet jar without obfuscation">
	</target>
	
	<!-- Package up the compiled code with obfuscation -->
	<target name="deployable" depends="-initialize,-eclipseme-deployable" 
		description="Packages the midlet jar, with obfuscation">
	</target>
	
	<!-- Run the packaged code -->
	<target name="run" depends="deployable,-eclipseme-run" 
		description="Runs the deployed package in the emulator">
	</target>
	
	<!-- Build a Palm PRC file -->
	<target name="makeprc" depends="deployable,-eclipseme-makeprc" 
		description="Generates a deployable Palm PRC file">
	</target>
		
	<!-- Clean the output of a previous execution -->
	<target name="clean" description="Cleans the output from previous builds">
		<echo message="Cleaning project files..." />
		<antcall target="-eclipseme-clean" />
	</target>
</project>
<?xml version="1.0" encoding="UTF-8"?><!--
	Automatically generated by EclipseME on Thu Jul 12 16:52:07 CEST 2007
	DO NOT ALTER THIS FILE.  IT WILL BE OVERWRITTEN

	Changes may be made to build.xml and user-build.properties
-->
<project default="-eclipseme-build" name="eclipseme-MobileADR">
   <path id="classpath.MobileADR">
      <path location="${path.build.classes}"/>
      <path location="${path.build.classes}/_no_export"/>
   </path>
   <target name="-eclipseme-initialize">
      <echo message="Initializing EclipseME Antenna build environment..."/>
      <taskdef resource="antenna.properties">
         <classpath location="${path.antenna.jar}"/>
      </taskdef>
      <mkdir dir="${path.build.classes}/_no_export"/>
   </target>
   <target depends="-eclipseme-initialize" name="-eclipseme-build">
      <echo message="Preprocessing source files..."/>

      <delete includeEmptyDirs="true" quiet="false">
            <fileset dir="${path.build.processed}" includes="*,*/**"/>
      </delete>

      <wtkpreprocess if="flag.preprocess" verbose="no"
         device="${preprocess.device}" printsymbols="yes"
         destdir="${path.build.processed}" srcdir="${project.root.MobileADR}/src" >

         <exclude name=".cvsignore"/>
         <exclude name="de/arktosmedia/adr/"/>
         <exclude name="de/arktosmedia/aes/"/>
         <exclude name="de/arktosmedia/test/"/>
         <exclude name="java/"/>
         <exclude name="jde.jdw"/>
         <exclude name="jdeprojekt.jdp"/>
         <exclude name="linkforjdecompile.sh"/>
         <exclude name="org/"/>
      </wtkpreprocess>

      <echo message="Building source files..."/>
      <wtkbuild if="flag.preprocess" target="1.1" destdir="${path.build.classes}" encoding="${src.encoding}" source="1.3" sourcepath="" srcdir="${path.build.processed}" preverify="no" >
          <classpath refid="classpath.MobileADR"/>
      </wtkbuild>
      
      <wtkbuild unless="flag.preprocess" target="1.1" destdir="${path.build.classes}" encoding="${src.encoding}" source="1.3" sourcepath="" srcdir="${project.root.MobileADR}/src" preverify="no" >
          <classpath refid="classpath.MobileADR"/>

         <exclude name=".cvsignore"/>
         <exclude name="de/arktosmedia/adr/"/>
         <exclude name="de/arktosmedia/aes/"/>
         <exclude name="de/arktosmedia/test/"/>
         <exclude name="java/"/>
         <exclude name="jde.jdw"/>
         <exclude name="jdeprojekt.jdp"/>
         <exclude name="linkforjdecompile.sh"/>
         <exclude name="org/"/>
      </wtkbuild>

      <wtkbuild destdir="${path.build.classes}" encoding="${src.encoding}" source="1.3" sourcepath="" srcdir="${project.root.MobileADR}/res" preverify="no" >
         <classpath refid="classpath.MobileADR"/>
      </wtkbuild>

   </target>
   <target depends="-eclipseme-build" name="-eclipseme-jar">
      <echo message="Generating unobfuscated jar file..."/>
      <antcall target="-eclipseme-clean"/>
      <delete includeEmptyDirs="true" quiet="true">
         <fileset dir="${path.build.output}" includes="*,*/**"/>
      </delete>
      <antcall target="-eclipseme-internal-package"/>
   </target>
   <target name="-eclipseme-deployable">
      <echo message="Generating obfuscated jar file..."/>
      <antcall target="-eclipseme-clean"/>

      <echo message="Interal Package..."/>
      <antcall target="-eclipseme-internal-package">
         <param name="flag.should.obfuscate" value="true"/>
      </antcall>
   </target>

   <target depends="-eclipseme-build" name="-eclipseme-internal-package">
      <copy file="${midlet.name}.jad" todir="${path.build.output}"/>

       <!-- ${flag.preverify} -->
      <wtkpackage verbose="yes" autoversion="${flag.autoversion}" obfuscate="no" preverify="no"
      jadfile="${path.build.output}/${midlet.name}.jad" jarfile="${path.build.output}/${midlet.name}.jar">
         <fileset dir="${path.build.classes}">
            <exclude name="_no_export/"/>
         </fileset>
         <classpath refid="classpath.MobileADR"/>
         <fileset dir="${project.root.MobileADR}/res">
            <exclude name="**/*.java"/>
            <exclude name="build/"/>
         </fileset>
         <fileset dir="${project.root.MobileADR}/src">
            <exclude name="**/*.java"/>
            <exclude name="build/"/>
            <exclude name=".cvsignore"/>
            <exclude name="de/arktosmedia/adr/"/>
            <exclude name="de/arktosmedia/aes/"/>
            <exclude name="de/arktosmedia/test/"/>
            <exclude name="java/"/>
            <exclude name="jde.jdw"/>
            <exclude name="jdeprojekt.jdp"/>
            <exclude name="linkforjdecompile.sh"/>
            <exclude name="org/"/>
         </fileset>
      </wtkpackage>
      
      <!-- call proguard externally, because the wtkpackage target does not suppoert some parameters -->
      <antcall target="-eclipseme-obfuscate"/>

      <wtkpreverify if="flag.preverify" jadfile="${path.build.output}/${midlet.name}.jad"  verbose="yes" 
                    jarfile="${path.build.output}/${midlet.name}.jar" />
   </target>

   <target if="flag.should.obfuscate" name="-eclipseme-obfuscate">
      <copy file="${path.build.output}/${midlet.name}.jar" tofile="${path.build.output}/${midlet.name}_base.jar"/>

      <wtkobfuscate jadfile="${path.build.output}/${midlet.name}.jad" jarfile="${path.build.output}/${midlet.name}.jar" verbose="yes">
         <argument value="'-keep public class * extends javax.microedition.midlet.MIDlet'"/>
         <argument value="-dontusemixedcaseclassnames -dontnote -defaultpackage ''"/>
      </wtkobfuscate>
   </target>

   <target depends="-eclipseme-deployable" name="-eclipseme-run">
      <echo message="Running emulator..."/>
      <wtkrun device="${run.device.name}" jadfile="${path.build.output}/${midlet.name}.jad" trace="${run.trace.options}" wait="true"/>
   </target>
   <target depends="-eclipseme-deployable" name="-eclipseme-makeprc">
      <echo message="Generating Palm PRC file..."/>
      <wtkmakeprc jadfile="${path.build.output}/${midlet.name}.jad" prcfile="${path.build.output}/${midlet.name}.prc"/>
   </target>
   <target name="-eclipseme-clean">
      <echo message="Deleting classfiles..."/>
      <delete includeEmptyDirs="true" quiet="true">
         <fileset dir="${path.build.classes}" includes="*,*/**"/>
         <fileset dir="${path.build.output}" includes="*,*/**"/>
      </delete>

   </target>
</project>
# EclipseME Build Properties - DO NOT ALTER THIS FILE - Make changes in 
user-build.properties
#Thu Jul 12 16:52:07 CEST 2007
run.trace.options=
path.build.output=${basedir}/deployed
flag.autoversion=false
flag.obfuscate=true
path.build=${basedir}/build
wtk.midpapi=/usr/local/wtk2.2/lib/midpapi20.jar\:/usr/local/wtk2.2/lib/cldcapi11.jar\:/usr/local/wtk2.2/lib/wma20.jar\:/usr/local/wtk2.2/lib/mmapi.jar\:/usr/local/wtk2.2/lib/j2me-ws.jar\:/usr/local/wtk2.2/lib/jsr75.jar\:/usr/local/wtk2.2/lib/jsr082.jar\:/usr/local/wtk2.2/lib/jsr184.jar
wtk.cldc.version=1.0
run.device.name=DefaultColorPhone
src.encoding=UTF-8
flag.preverify=true
flag.preprocess=true
wtk.proguard.home=/usr/local/proguard3.8
midlet.name=MobileADR
#path.antenna.jar=/usr/local/java/antenna-bin-0.9.15-beta.jar
#path.antenna.jar=/home/archiv/java/antenna/antenna-bin-0.9.14.jar
path.antenna.jar=/home/sinner/2nd_workspace/antenna/dist/antenna-bin-0.9.15-CVS.jar
project.root.MobileADR=${basedir}
wtk.midp.version=1.0
#wtk.home=/home/sinner/WTK2.5.1
wtk.home=/usr/local/wtk2.2
path.build.classes=${basedir}/build/classes
path.build.processed=${basedir}/build/.ant_processed
preprocess.device=Generic/midp2
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users

Reply via email to