ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

article
part 1
part 2
part 3
part 4
part 5
part 6
part 7


5 - But What If...

There are some disadvantages with string arrays. As it stands, it won't work with images (although you could modify it to include arrays of IMAGEs, etc.). As well, new language support means issuing a complete recompile of the program with the new strings. Finally, the size of the data is multiplied by the number of languages you support, making multiple language support memory-intensive. To avoid these problems, you can use a dynamically loaded package file, and distribute the appropriate one for the client. Briefly, package creation consists of the following:
  • Create your text and images resources.
  • Combine them in a resource list.
  • Run 'binpkg' to combine the resources into a package.
  • Open the package at runtime with the PKG_Open() function, and read data with the PKG_String() and PKG_Image() functions.
For further details on package creation, look up the documentation on the binpkg program, as well as the pkg.h/pkg.c files describing the PKG_ functions. See also the samples/gui/source/gui_pkg.h file to see how a package list is formatted.

Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice