Cross-platform SDK and HTML5 tools for mobile app development
X
 

Multiple bundles & bundle switching [SOLVED]

3 posts / 0 new
Last post
widagroup
widagroup's picture
Offline
Mobile Conjurer
Joined: 18 Feb 2012
Posts:
Multiple bundles & bundle switching [SOLVED]

Hi all, I have over 7000 images for my app, and to stop my speed issues, I have split these images across several bundle files (each containing 400 images). Each item that I will list with an image, has a number representing  which file it's image is stored in. E.g. If the file number is 1, then this refers to the ma handle. IMAGEFILE1 (which might have a const value of 24) Does anyone know the best way for me to set the correct bundle(s) as the  current filesystem? Ideally I would need a method that requires no code changes if I have more or less bundle files. Thanks for your help

Fredrik Eldh
Fredrik's picture
Offline
Mobile Sourcerer
Joined: 16 Feb 2009
Posts:
It sounds like you're going

It sounds like you're going to have to generate the bundle files dynamically, at compile time, and the .lst file as well. That way, the bundles can be numbered incrementally, so that bundle X will have the resource number (IMAGEFILE0 + X).

We've never done what you propose exactly, but we have an example that might be helpful: GenerateResources. You'll also want to take a look at mosync_resources.rb. I imagine you could set up a variant of the GeneratedLstTask (based on MemoryGeneratedFileTask), and an array of BundleTasks.

widagroup
widagroup's picture
Offline
Mobile Conjurer
Joined: 18 Feb 2012
Posts:
Thanks Fredrik :) This has

Thanks Fredrik :)

This has managed to solve my issue with Bundle switching :)

Login or register to post comments