[openbeos] Re: Resource Compiler

  • From: François Revol <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 06 Jan 2003 22:58:13 +0100 (CET)

En réponse à Matthijs Hollemans <matthijs@xxxxxxxxxxxxxxxxxxx>:

> 
> > > perhaps i am out of context , but the Pe cvs holds a
> > > folder called rez, which seems to do the same thing?
> 
> You are right: rez is also a resource compiler. In many ways it is
> even much more capable than beres. However, it does not read .rdef
> files, which is more-or-less the "official" format. If I am not
> mistaken, there are more people using .rdef than rez's format, so it
> makes sense to provide an open source replacement for beres. Plus, I
> wanted to play with flex and bison, which are two compiler-generator
> programs ;-)
> 
> 
> > when i digged everywhere i could searching for beos
> > programming docs and samples, i couldnt find *anything*
> > that would explain the whole concept of Resources [...]
> 
> You may want to look at the BResources chapter in the Storage Kit
> section of the BeBook. In short, a resource is data that is bundled
> with an application. Typical examples are the application's icons,
> its signature, its launch flags (single launch, multiple launch,
> etc), and version information. However, you can associate any kind
> of data with your files, such as pictures, sounds, cursors, and
> text. Resources are different from attributes because they are
> stored inside the files themselves, and are typically used only for
> applications. There probably is a very good reason why attributes
> aren't used for this, but I can't think of one.

Attribute dissapear when moving to a FAT drive, resources don't, because they 
are part of the file data.

resources can be seen as a directory of items, each being a resource, which 
has a type and a name, like attributes, but also an identifying number.
resources can be added to binary files (either PEF or ELF).

Btw, libraries also are binary files, and even if it's not very common, there 
is one good sample of it:
QuickRes /system/lib/libbe.so &

François.

Other related posts: