A source file for binary resources contains a textual description of all the resource records, possibly in several languages. The records are organised in a hierarchical way, thanks to namespaces. Every record has a symbolic name attached to it.
The resource file name is defined by command .resfile.
The relative directory used to store the output files is specified by command .reldir.
The namespace is specified by command .namespace. In order to enter a new namespace level, use .namespace name. To leave the current level, use .namespace ...
Every resource record must start with a .symbol command, which defines the symbolic name of the record. The fully qualified symbolic name is made of the concatenation of the namespace names (separated by ":") and the symbolic name.
A string is coded with UTF-8. It is defined with the .string command. The text can be written as a single line or split over several lines using the \-newline combination. The source string may contain following special commands :
The following escape sequences are recognised :
A resource link table stores a table of Big Endian 32-bit resource record indexes. It is defined with the .reslink command. The indexes are defined by fully qualified symbolic names, separated by commas and optionally split overs several lines using the \-newline combination. An empty link (no name specified) will be mapped to zero.
Some Unicode character codes have been reserved for internal use by the OPaC library. Currently, following values are defined :
A menu is defined using a resource link table pointing to string records. Every string record contains three elements separated by ":", namely the command name, the icon name and the displayed label. The icon name may be replaced with a "*" in case there is no icon.
Example :
.namespace MyNamespace .symbol MyMenu <*> .reslink MyNamespace:MenuCut, MyNamespace:MenuCopy, \ MyNamespace:MenuPaste, \ ... .symbol MenuCut <*> .string EditCut:PIC_EDIT:Cut <fr> .string EditCut:PIC_EDIT:Coupe .symbol MenuCopy <*> .string EditCopy:PIC_COPY:Copy <fr> .string EditCopy:PIC_COPY:Copie ... .namespace ..