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:
Create a text file with extension .pkg
.
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.
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.
Specify the source and target destinations for any other files to be installed.
Invoke the Installation File Generator on the package file.
How to create a simple installation file, How to create an installation file for a multilingual application
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
There are a number of concepts in the file which are explained in the "How To" for a simple installation (e.g. UID, Build number, comments). See this topic for more information.
The RI specifies that the file is to run on installation, however it is also possible to specify that it be run when the application is removed. The file/program is deleted after it has been executed.