Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to compile an aif file


Overview

Once you have created a suitable resource file and bitmaps, you must compile these into a single binary aif file. You can to do this in two ways:

[Top]


Compiling using abld

For C++ applications, an aif file can be compiled with the abld tool by using an aif statement in the .mmp project file. This should list the target file, the source path of the resource file, and any bitmaps. For example,

aif hello.aif helloaif.rss icon1.bmp iconmask1.bmp icon2.bmp iconmask2.bmp

specifies to compile hello.aif in the application's directory, from the resource file helloaif.rss, with icons icon1.bmp and icon2.bmp and their corresponding masks. The mask bitmap must immediately follow the associated icon.

The aif file is compiled when the project is built the abld build. To just build the aif file (plus the resource files and bitmaps), without other build steps such as compiling C++ files, you can use abld resource.

abld calls the lower-level command-line tools aiftool and bmconv to compile the aif file. These tools can also be used directly, as explained in the next section.

[Top]


Compiling using aiftool and bmconv

An aif file can be compiled using the command-line tools bmconv and aiftool.


Creating an icon file

The bitmaps must be converted into a single multi-bitmap (.mbm) file using the bitmap converter tool bmconv. You provide a list of the bitmaps to bmconv, listing each image before its corresponding mask.

For details of the tool, see File Conversion Utilities Guide.


Creating the aif file

Aiftool is invoked to compile the resource definition file, together with the multi-bitmap file, into an aif file. For example,

aiftool hello hello.mbm

This takes the hello.rss and hello.mbm files as input, and produces an application information file hello.aif as output.