Frage

I have made a J2ME program. This program will be used in 3 specific countries and has to support 7 different screen resolutions.

At the moment I have created 7 different builds for each resolution type and 3 variants in each for each of the 3 countries.

I am using LWUIT as my UI framework. I have configured MTJ with the following.

  • antenna-bin-1.2.1-beta.jar
  • WTK2.5.2_01
  • proguard4.8

on Eclipse 3.7.2

  1. In the package explorer i right click on my project directory
  2. select 'Export' (I couldn't find 'Export Antenna Build Files' under the 'Mobile Tools for Java' option)
  3. I wait for it to do its thing.
  4. I open the project folder and search for Build.xml. But can't find anything .
  5. I find a folder called 'mtj-build' that contains another folder(custom-tasks) and two files mtj-build.properties and mtj-build.xml .

I want to able to write a build file that would be able to do the following

  1. put in the correct resources according to the resolution its building
  2. put in the correct theme according to the resolution its building
  3. set the relevant attributes in the Application Descriptor file for each country
  4. repeat this process automatically for each resolution and each country and place the respective .Jad and .Jar files in a particular folder structure as shown.

MainFolder:

{
    Country1:{
        Res1,
        Res2, 
        Res3, 
        ....}, 
   Country2:{
        Res1, 
        Res2, 
        Res3, 
        ....}, 
   Country3:{
        Res1, 
        Res2, 
        Res3, 
        ....}, 
   ....etc}
}

As I understand to do this I would need to set up a Build.xml. But then I can't find Build.xml after selecting the Export Antenna Build Files option.

How do I achieve this goal? Is it even possible to do this? Please do help . Thanks in Advance

===================UPDATE TO THIS POST #1======================

Follow the links mentioned by Eugen Martynov below. on a side note: The reason I wasn't getting the option to Export Antenna Build files on the right click of the project was because they were referring to a customized version of the Eclipse IDE called Pulsar Eclipse.[ http://www.eclipse.org/pulsar/ ]

The Antenna build xml file generated by it is far more optimized than the one you get out of the standard Eclipse. I dunno why that is. But thats my Observation.

===================UPDATE TO THIS POST #2======================

Thanks for your suggestion Eugen. I will be writing a few sub Ant Build files to simplify my problem. I still have to figure out how to break this down.

Thanks for the link Telmo Pimentel Mota. In my current build I have 'wtkbuild' and 'wtkpackage'. And the build is working great. I just now have to figure out how to call or execute one build file from another following Eguen's suggestion.

War es hilfreich?

Lösung

I wouldn't give you complete answer but I give you way to find out it yourself.

Here about ant and building process. Here is building j2me with antenna. There are also should be examples of build.xml files in antenna sample folder. Here is alternate example about ant and building j2me without using antenna.

In your case you have to use different res folders and set different manifest options based on two additional properties country and resolution. You could pass properties outside build.xml by using properties file or by command line:

ant -f <path to build.xml> -D<property name>=<property value>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top