Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



How to display a licence agreement during installation

Package files can be configured to display text, or to run custom programs, during installation and/or removal of an application. The most common use of this facility is to display a license agreement during installation. The process is:

  1. Create a text file with extension .pkg.

  2. Specify the supported languages and the package header. These are discussed in the "How to" topics for a simple installation and for installing a multilingual application.

  3. Specify the source location for the text file to be displayed during installation. No destination is specified, as the file is not installed. Use the code FT to indicate that the file is text to be displayed during installation. Use the code TA (text abort) to specify that the installation is aborted if No is pressed on the licence dialog.

  4. Specify the source and target destinations for any other files to be installed.

  5. Invoke the Installation File Generator on the package file.


See also

How to create a simple installation file, How to create an installation file for a multilingual application

[Top]


Example

The package file for an installation in which a licence agreement is displayed is provided in epoc32ex\ToolsAndUtilities\HelloWorldText.pkg. A listing of the file is given below:

#{"Application with Licence"},(0x10004299),1,0,0,TYPE=SISAPP

"HelloWorldl.txt"-"",FT,TA

; Files to be installed - only three, no language variants
"HelloWorld.app"-"!:\system\apps\HelloWorld\HelloWorld.app"
"HelloWorld.rsc"-"!:\system\apps\HelloWorld\HelloWorld.rsc"
"Helloworld.doc"-"!:\Documents\HelloWorld.doc",FR,RI

The package file installs exactly the same application as described in the “How to” for a simple installation. However the installation is different in two respects.

Firstly, the second line specifies that HelloWorldl.txt is to be displayed during installation. Since the file is not installed, the destination is represented by empty quotes. The arguments specify that the file is text to be displayed during installation (FT), and that the installer should display a Yes/No dialog instead of the default Continue dialog (TA). The dialog aborts if No is pressed..

The second difference is in the final line, which specifies a file to be installed and run on the target Symbian OS phone (FR). The argument RI indicates that the file is to be run only during installation. In other words, the licence text will be displayed on the Symbian OS phone after it is installed.

To create the installation file HelloWorldText.sis, invoke the Installation File Generator on the package file:

makesis HelloWorldText.pkg

[Top]


Notes