Specifications
SERIES 3/3A PROGRAMMING GUIDE
1-2
Other parts of the SDK that may be found of particular relevance to programming for the Series 3
include:
•
the descriptions of file formats used by various applications, in the Additional System
Information manual
•
a description of the special form of printer driver files used on the Series 3, also in the Additional
System Information manual.
Before proceeding further with this chapter, the reader is recommended to be familiar with the basic
contents of the
General Programming
manual.
Differences between .app files and .img files
Strictly speaking, there is no real difference between files with extension
.img
and those with extension
.app
. For example, although the System Screen usually expects to install
.app
files, it will also, if
requested, install suitable
.img
files.
However, by convention a
.app
file contains one or more extra so-called
add-files
embedded within it, in
addition to the core
.img
file itself. These files may include:
•
a
.pic
file providing the
icon
for the application
•
a
.rsc
or
.rzc
file providing the
resource file
for the application
•
a
.shd
file providing the
shell data
for the application.
Any such add-files can be added into the
.img
file automatically, via the operation of
emake.exe
, at the
time the
.img
file is itself created. What controls the set of add-files used (if any) is the presence or
absence of a suitably named
add-file list
(
.afl
) file.
Add-file lists
An add-file list (
.afl
) file is a text file containing from one to four filenames. For example, the contents of
a file
tele.afl
could be:
tele.pic
tele.rsc
tele.shd
When any
.pr
project file is invoked that leads to the building of
tele.img
, the existence of a file
tele.afl
is
checked for. If such a file is found, the files listed therein are combined with the core
.img
file to form a
larger
.img
file as output. By convention,
.img
files that contain embedded add-files are renamed to
.app
files.
See the chapter
Building an Application
in the
General Programming
manual, for more details.
Pre-defined add-file slots
The
RSCFILE
class in the OLIB library can find resource files embedded in a
.app
file, but only if they are
placed in the
second
of the four slots.
The System Screen expects to find a
.shd
file in the
third
add-file slot of a program being installed, and
indeed will refuse to install it if no such data is found there.
The Window Server, however, will find a
.pic
file (or a
.fon
file) at any of the four add-file positions
within a
.app
. In view of the requirements for resource files to occupy the second slot, and for
.shd
files to
occupy the third slot,
.pic
icon files are usually placed in the first add-file slot - as in the above example.
At the time of writing, there is no mechanism to specify a file for (say) the third add-file slot, while
omitting the second add-file altogether. For this reason, it may occasionally be necessary to create and
maintain a zero-length file for the second slot.










