wiki:UsingResources

Version 7 (modified by dennisr, 8 years ago) (diff)

--

Using resources

For now, see Hmi\HmiUtil\docs\report\HmiUtilReport.tex for an explanation.

Elckerlyc depends on a large number of resources, such as the graphical embodiments of avatars, the collections of gestures and face expressions, etcetera. There are basically two ways to include these resources into your project. Note that if a specific resource is included in more than one way at the same time, the system will get confused about which version to use :)

1) Include resources as released library packages.

When you don't need to modify resources, this is a very good way to incorporate the main resources in your project. In HmiDemo/MyFirstProject you will see a good example of how to do this.

  • for most resource sets, a release library exists (usually somewhere in HmiShared/repository/resource/HMI)
  • you specify the inclusion of one of these libraries by adding an entry to the ivy.xml file of your project
  • in command prompt, do "ant resolve" to actually import the libraries specified in ivy.xml
  • more information on the release library versioning and import system, see the global project guides in HmiShared/docs

2) Include the resources by directly adding to the classpath a reference to the source versions of these resources.

When you want to modify some of the the resource files, this is a good option. Note that if you change core resource files, they may be overwritten by new versions.

  • source versions of most resources reside in the HmiResource repository
  • add them to the class path by adding a "resource.path=..." setting to the build.properties file
  • see HmiDemo/MyAlphaProject for an example of this method
  • there are a few pre-specified paths expressions:

${shared.repository} refers to the Shared repository directory ${shared.resources} refers to the HmiResource? repository directory

3) Final note: any resource file that you put below the 'resource' directory of your own project, will automatically be available through its relative path from this 'resource' directory. See the extended documentation on using resource paths for more information.

User contributions

Ask specific questions below...

Discussion

UsingResources
 unsolved

Add your experiences and comments below...