13.2 Creating resources

The Free Pascal compiler itself doesn't create any resource les; it just compiles them into the executable. To create resource les, you can use some GUI tools as the Borland resource workshop; but it is also possible to use a Windows resource compiler like gnu windres. windres comes with the gnu binutils, but the Free Pascal distribution also contains a version which you can use.

The usage of windres is straightforward; it reads an input le describing the resources to create and outputs a resource le.

A typical invocation of windres would be

windres -i mystrings.rc -o mystrings.res

this will read the mystrings.rc le and output a mystrings.res resource le.

A complete overview of the windres tools is outside the scope of this document, but here are some things you can use it for:

stringtables
that contain lists of strings.
bitmaps
which are read from an external le.
icons
which are also read from an external le.
Version information
which can be viewed with the Windows explorer.
Menus
Can be designed as resources and used in your GUI applications.
Arbitrary data
Can be included as resources and read with the windows API calls.

Some of these will be described below.