Package File Format
A package (PKG) file is a text file containing items/statements that define the information required by the installation (SIS) file creation utility, MakeSIS.
The first item in a PKG file should list the languages supported by the SIS file.
This must be followed by the package header, which provides the SIS component name, UID, and version information.
The localised and non-localised vendor names must follow the package header.
This may be followed by an optional logo.
The next item is a digital signature which gives the name of the private key file and associated certificates to be used to digitally sign the SIS file.
The remainder of the PKG file lists the files and components to be included in the SIS file, or dependencies upon other installed components.
The PKG file format, which is described in modified BNF notation, can be broken down into the following items:
languages
(language code table)
package-header
vendor
logo
[package-signature]
package-body
dependency
properties
Example PKG files

The same list with further details:
Item/Statement Description Example
languages List of languages provided by the SIS file.
The supported languages and their abbreviations are defined in the language code table. &EN,FR
package-header Component name, UID, major version, minor version, build number and options #{"MyApp-EN", "MyApp-FR"}, (0x1000001F), 1, 2, 3, TYPE=SA
vendor Localised vendor names
Pre-Symbian9.x PKG file
%{"Vendor-EN", ..., "Vendor-FR"}
:"Unique vendor name"
logo Defines the logo using file, MIME-type, and optional target ="logo.jpg","image/jpeg","target.jpg"
[package-signature] Optional. Private key file and associated certificates used for signature *"files\private.key","files\cert.cer"
package-body Comments - are ignored by SIS creation tool
condition-block - controls which parts of the SIS file are skipped
options-list - to display a list of options to the user
install-file - describes which files to install to which destination
embedded-sis - to include a SIS file within a SIS file
; this is a comment
IF (some_condition) ... package- body ... ENDIF
!({"Add-on 1 (20KB)"},{"Add-on 2 (75KB)"})
"files\myFile.txt"- "!:\Documents\myFile.txt";
@"depend.sis",(0x10000002)
dependency dependency on another component not embedded in the SIS file (UID contained in round brackets)
dependency on specific target hardware/UI platform (UID contained in square brackets)
(0x10000003), 2, 2, 3, {"Depend- EN", "Depend-FR"}
[0x101F61CE], *, *, *, {"UIQ21ProductID"}
properties Defines the properties of the package +(0=1,1=2,3=-1)

All PKG and text files parsed by makesis may be in either UTF8 or UNICODE format. UTF8 text is converted to UNICODE when creating a UNICODE SIS file. Both little-endian and big-endian UNICODE files may be used; automatic conversion is performed by makesis as appropriate.
Characters may be included within strings using an escape syntax. The following examples from a package-header add a "™" symbol to the end of the application name (for decimal and hexadecimal respectively):
#{"MyApp"<153>}, ...

#{"MyApp"<0x99>}, ...
A numeric character code should be specified outside any double quotes and enclosed by "<" and ">" characters.
Each PKG item/statement may be spread over multiple lines if desired.
For example PKG files see:
Example PKG files
HelloWorld example PKG files


Related Posts :



0 comments