Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    42

    Build for multiple devices

    Hi everybody,

    i have developed an application for 3rd edition that i want to install in devices with different screen resolutions. I want to have only one sis file. My code is now dependant of this feature by means of macros along cpp and if clauses in pkg file. What do you consider is the best way to define macros and make such differentiation between devices?, maybe different mmp's with macro definition?. Any other idea?

    Thanks!

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Build for multiple devices

    Why not retrieve such dimensions in runtime, and act accordingly? You'll have a single sis file.

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    42

    Re: Build for multiple devices

    That is a possibility, that i don't like, cause i must take into account that difference along all the files in the project. It'd suppose to be passing that parameter (boolean if i consider only two resolutions or an enum in case of consider more than two) between all classes. I wonder if exists a easier way of doing this. In debug for instance i have a config header file, in which i select the targeted device (define or undef macro), and i can use it along the whole project. I think other possibility would be to have different mmp's, one for each project, with the macro defined on it. If i could define these macros when detecting the resolution, that would be perfect, but preprocessing labels cannot be defined in cpps. Is there ny other easier way of making this?. Thanks PushL for your response.

  4. #4
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Build for multiple devices

    One possibility is using the MACRO statement in the mmp file (see sdk docs for detailed info). This way, you can set/clear any combination you want to:

    MACRO SCREEN_176x208
    ...

    Then in your cpp files, you do the usual:

    #if defined(SCREEN_176x208)
    ...
    #elif ...
    ...
    #else
    #error "Unsupported resolution"
    #endif

    The problem of course is maintainance. OTOH, I have been using runtime resolution for drawing custom boxes, etc. depending on the screen size (on a non graphic intensive program) and it works pretty well. Also, depending on your design, you could instantiate a specific object (from a pool of several) according to the current resolution. This way you'd make comparisons once.

  5. #5
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    59

    Re: Build for multiple devices

    Hi,

    the same problem occurs when you create games in j2me, only then do you have a device databse of around 1000 handsets, each with different processors, capabilities and resolutions. So with Symbian we're still pretty ok.

    anyhow, what I use is ANT for making a build script. With this script you build for every known device group/operator and language. SO you set it running and an hour l;ater you have all your builds ready.

    using ant you can generate include files, tweak MMP files and your PKG files according to a set of rules.

    downside of ANT is that it is Java,... but if you don't have a problem with that it actually works pretty good. ;^)

    of course there are also other build systems like visual build, so maybe you should do some research which system works best for you

    Reinier

  6. #6
    Regular Contributor
    Join Date
    Jul 2005
    Posts
    185

    Re: Build for multiple devices

    Hi, I can't understand why don't you code a scalable UI? See some new FN examples and you'll see the idea.

Similar Threads

  1. Alerting on BT devices out of range or off
    By jameelh in forum Bluetooth Technology
    Replies: 8
    Last Post: 2006-04-07, 15:44
  2. Latest Carbide.vs and problems with ARMI build
    By mhakkara in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2006-04-05, 10:17
  3. Build problem
    By kirangullapalli in forum Symbian
    Replies: 1
    Last Post: 2004-10-19, 11:07
  4. Replies: 1
    Last Post: 2004-02-19, 19:46
  5. armi build not working
    By lemody in forum Symbian
    Replies: 0
    Last Post: 2003-06-14, 15:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×