Customized builds

8 posts / 0 new
Last post
Vasily Zakharov
Jolaf's picture
Offline
Mobile Conjurer
Joined: 6 Apr 2010
Posts:
Customized builds

I'm writing a program that needs to be customized (with resources) for particular persons that would use it. Putting resources for all users in one build would be unsecure and would make program huge.

For example, I have 3 persons with phone model A, 2 persons with phone model B and one person with phone model C. So, at finalization, I have to create a total of 6 builds for 3 phone models.

Is it possible with the current build system? What would be the optimal way to achieve this?

One possible solution would be to download resources from custom URLs at startup, but using downloaded resources is not possible as far as I can see. Is it true?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Fredrik Eldh
Fredrik's picture
Offline
Mobile Sorcerer
Joined: 16 Feb 2009
Posts:

MoSync's build system is not yet very good at handling customized resources. You might be able to do something with Build Configurations, but the details are beyond me. Improving this is on our list of things to do.

Downloaded resources are quite possible. Individual objects (images, text files, binaries) can be downloaded at any time. Entire compiled resource files can be loaded using maLoadResources().

Vasily Zakharov
Jolaf's picture
Offline
Mobile Conjurer
Joined: 6 Apr 2010
Posts:
"Fredrik" wrote:

Entire compiled resource files can be loaded using maLoadResources()

Hmm, maLoadResources() accepts a MAHandle, but how can I get a MAHandle for a binary I've downloaded from the Internet?

Fredrik Eldh
Fredrik's picture
Offline
Mobile Sorcerer
Joined: 16 Feb 2009
Posts:

Depends a little on how you download it. MAUtil::Downloader gives you an MAHandle by default. If you use MAUtil::Connection, you should use readToData() rather than read().

Vasily Zakharov
Jolaf's picture
Offline
Mobile Conjurer
Joined: 6 Apr 2010
Posts:
"Fredrik" wrote:

Depends a little on how you download it. MAUtil::Downloader gives you an MAHandle by default. If you use MAUtil::Connection, you should use readToData() rather than read().

Oh, that sounds optimistic! Smile Thank you!

Vasily Zakharov
Jolaf's picture
Offline
Mobile Conjurer
Joined: 6 Apr 2010
Posts:

Is there a way to "patch" a MoSync phones list, and manually add, for example, models SonyEricsson C702-John and C702-Bill to do custom builds with personal settings for John and Bill?

Fredrik Eldh
Fredrik's picture
Offline
Mobile Sorcerer
Joined: 16 Feb 2009
Posts:

You could do that. The list is stored in the filesystem, under MoSync/profiles. It should be pretty easy to copy a profile and customize it a little. You'll need to restart the IDE, to reload the list, after adding or removing a profile.

Note that the list will get deleted and overwritten when you reinstall MoSync, including when upgrading to a new version.

Vasily Zakharov
Jolaf's picture
Offline
Mobile Conjurer
Joined: 6 Apr 2010
Posts:

Thanks, that sounds great to me!