原文地址:http://homepage.ntlworld.com/thouky/software/psifs/sis.html
用于分析SISX文件格式,解压SISX文件,压缩SISX文件,程序自动打包S60安装程序等.
Version 1.18, 19-Dec-07
by Alexander Thoukydides (alex@thouky.co.uk
)
Copyright © Alexander Thoukydides.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled " GNU Free Documentation License".
The EPOC operating system uses files with a .SIS
extension to allow easy installation of applications. These are usually produced using the makesis
tool, and are handled by either the control panel Add/remove
program or EPOC Connect. This document attempts to provide sufficient information to allow other software to be written that can decode and use SIS files.
The format of SIS files was changed in the Symbian OS version 9.1 release of Software Install. This document describes the original format used by earlier versions. Information about the restructured and redesigned format can be found at http://www.symbian.com/developer/techlib/papers/SymbianOSv91/softwareinstallsis.pdf.
The latest version of this document will normally be available from http://www.thouky.co.uk/software/psifs/sis.html.
Revision | Date | Author | Description |
---|---|---|---|
1.18 | 19-Dec-07 | Alexander Thoukydides | Corrected conditional expression types. |
1.17 | 27-Nov-07 | Alexander Thoukydides | Corrected size of the Number of certificates field. |
1.16 | 18-Jul-07 | Alexander Thoukydides | Added standard names and other uses for the CRC algorithm. |
1.15 | 03-Feb-07 | Alexander Thoukydides | Added note about endianness. |
1.14 | 23-Sep-06 | Alexander Thoukydides | Added link to Symbian 9.1 SIS file format documentation. |
1.13 | 07-Jun-06 | Alexander Thoukydides | Exclude signature block from calculation of the Checksum field. |
1.12 | 04-Apr-06 | Alexander Thoukydides | Corrected description of Original file length field. |
1.11 | 05-May-04 | Alexander Thoukydides | Added long option codes. |
1.10 | 04-May-04 | Alexander Thoukydides | Added more language and type codes. |
1.09 | 14-Mar-04 | Alexander Thoukydides | Added more details of EPOC release 6 format files. |
1.08 | 30-Apr-03 | Alexander Thoukydides | Added more details of EPOC release 6 format files. |
1.07 | 08-Jul-01 | Alexander Thoukydides | Split the flags field into options and type. Corrected installer version field. |
1.06 | 07-Jul-01 | Alexander Thoukydides | Corrected description of requisites with multiple language versions. |
1.05 | 30-Jun-01 | Alexander Thoukydides | Added desription of checksum field in the header. Explained calculation of UID4 better. |
1.04 | 27-Jun-01 | Alexander Thoukydides | Added flags field to the file header. |
1.03 | 09-Jun-01 | Alexander Thoukydides | Added missing languages and clarified some descriptions. |
1.02 | 02-Jun-00 | Alexander Thoukydides | Released under version 1.1 of the GNU Free Documentation License. |
1.01 | 21-Apr-00 | Alexander Thoukydides | Corrected HTML. Added URL for latest version of this document. |
1.00 | 27-Mar-00 | Alexander Thoukydides | First draft. |
This document is supplied "as is"; no warranty, express or implied, of the merchantability of this document or its fitness for any particular purpose is given. In no circumstances shall the author, or any provider or distributor of this document, be liable for any damage, loss of profits, or any indirect or consequential loss arising out of the use or misuse of any information or particular in this document.
All trademarks are acknowledged.
The information contained within this document was collated from many different sources, including (but not restricted to):
xmakesis
Perl script, as updated by Rudolf Koenig. Due to the diverse and incomplete nature of these sources, the description here probably contains both errors and omissions. Please send any corrections or additions to the author for inclusion in future revisions.
SIS files consist of the following sections:
Section |
---|
File Header |
Language Records |
File Records |
Requisite Records |
Component Name Record |
Capabilities Record |
Certificates Record |
Resource Data |
The sections are stored contiguously, without any padding or alignment. They should also normally be in the order listed, otherwise the residual SIS files may be larger than necessary.
Unless otherwise specified the following conventions apply:
All SIS files start with a standard header:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | UID 1 |
0x04 | 4 | 4 | UID 2 |
0x08 | 8 | 4 | UID 3 |
0x0c | 12 | 4 | UID 4 |
0x10 | 16 | 2 | Checksum |
0x12 | 18 | 2 | Number of languages |
0x14 | 20 | 2 | Number of files |
0x16 | 22 | 2 | Number of requisites |
0x18 | 24 | 2 | Installation language |
0x1a | 26 | 2 | Installation files |
0x1c | 28 | 2 | Installation drive |
0x1e | 30 | 2 | Number of capabilities |
0x20 | 32 | 4 | Installer version |
0x24 | 36 | 2 | Options |
0x26 | 38 | 2 | Type |
0x28 | 40 | 2 | Major version |
0x2a | 42 | 2 | Minor version |
0x2c | 44 | 4 | Variant |
0x30 | 48 | 4 | Languages pointer |
0x34 | 52 | 4 | Files pointer |
0x38 | 56 | 4 | Requisites pointer |
0x3c | 60 | 4 | Certificates pointer |
0x40 | 64 | 4 | Component name pointer |
The header of EPOC release 6 format SIS files is extended:
Offset | Bytes | Description | |
---|---|---|---|
0x44 | 68 | 4 | Signature pointer |
0x48 | 72 | 4 | Capabilities pointer |
0x4C | 76 | 4 | Installed space |
0x50 | 80 | 4 | Maximum installed space |
0x54 | 84 | 16 | Reserved |
The UID 1, UID 2 and UID 3 fields are the first three words of the file, and indicate the type of data it contains. UID 1 is the UID of the application to be installed, or 0x10000000
if none. UID 2 is 0x1000006D
for EPOC releases 3, 4 and 5, and 0x10003A12
for EPOC release 6. UID 3 is always 0x10000419
.
UID 4 is a checksum calculated from the preceding fields. The least significant 16 bits are given by the CRC16 of the bytes at even offsets from the start of the file, and the most significant 16 bits are given by the CRC16 of the bytes at odd offsets from the start of the file.
The Checksum field is calculated as the CRC16 of all the data in the SIS file excluding the 2 bytes occupied by the Checksum itself and any signature block. It is not updated for the residual SIS file.
The Number of languages and Languages pointer fields specify the number of languages supported by the SIS file and the offset to the languages records respectively.
The Number of files and Files pointer fields specify the number of files included in the SIS file and the offset to the files records respectively.
The Number of requisites and Requisites pointer fields specify the number of requisites specified in the SIS file and the offset to the requisites records respectively.
The Installation language and Installation files fields are both initially zero. When the SIS file is installed, these are modified with the settings used for the installation.
The Installation drive field is initially 0x0000
for EPOC releases 3, 4 and 5, and 0x0021
(the character code for "!
") for EPOC release 6. When the SIS file is installed, this is modified with the setting used for the installation.
The Installer version field specifies the version of the Add/remove
program required to handle the file. This is normally 68 (0x00000044
) or 100 (0x00000064
) for EPOC releases 3, 4 and 5, and 200 (0x000000c8
) for EPOC release 6.
The Options may combine any of the following flags:
Option | Code | Description | |
---|---|---|---|
0x0001 | IU | IsUnicode (EPOC release 5) | |
0x0002 | ID | IsDistributable (EPOC release 5) | |
0x0008 | NC | NOCOMPRESS | NoCompress (EPOC release 6) |
0x0010 | SH | SHUTDOWNAPPS | ShutdownApps (EPOC release 6) |
The Type may be any of the following:
Type | Code | Description | |
---|---|---|---|
0x0000 | SA | SISAPP | Contains an application (the default) |
0x0001 | SY | SISSYSTEM | Contains a shared/system component such as a DLL or OPX (EPOC release 6) |
0x0002 | SO | SISOPTION | Contains an optional component, independently selectable by the user (EPOC release 6) |
0x0003 | SC | SISCONFIG | Configures an existing application or service (EPOC release 6) |
0x0004 | SP | SISPATCH | Patches an existing component (EPOC release 6) |
0x0005 | SU | SISUPGRADE | Upgrades an existing component (EPOC release 6) |
The Major version and Minor version fields specify the version number of the application. The Minor version number is padded to two digits with leading zeros for display.
The Variant field is used when the component is a requisite for other components. If more than one variant of the requisite component exists for different machines then this field ensures that the correct variant is present. This is usually set to 0x00000000
.
The Certificates pointer specifies the offset to the certificates record.
The Component name pointer field specifies the offset to the component name record.
The Signature pointer field specifies the offset to the signature block.
The Number of capabilities and Capabilities pointer fields specify the number of capabilities specified in the SIS file and the offset to the capabilities record respectively.
The Installed space field is initially 0x00000000
. When the SIS file is installed, this is modified with the space used by the installed files.
The Maximum installed space field specifies the maximum space required for installation. This is usually the total size of all the files when uncompressed. If the SIS file contains alternates then the size of the larger alternate is used.
The Reserved field is for use by future revisions of the file format.
The standard x16 + x12 + x5 + 1 polynomial is used with an initial remainder of zero to generate a 16 bit CRC. This is the CRC-16-CCITT algorithm (also known as CRC-CCITT), as used by the XMODEM, X.25, V.41, Bluetooth, PPP and IrDA protocols.
The following C code calculates a lookup table to allow efficient calculation of this CRC:
const unsigned int polynomial = 0x1021; |
The following line can then be used to add a byte (value
) to a 16 bit CRC (old_crc
) to give the new 16 bit CRC (new_crc
):
new_crc = (old_crc << 8) ^ table[((old_crc >> 8) ^ value) & 0xff]; |
The CRC value should be initialised to 0 before any bytes are processed. It may be necessary to use unsigned values to prevent implementation dependant problems on systems with 16 bit integers.
The Languages pointer field in the header points to the language records that specify which languages are supported by the SIS file. The Number of languages field in the header specifies the number of records. Each record consists of a 2 byte value from the following table:
Language | Code | Description | |
---|---|---|---|
0x0000 | 0 | Test | |
0x0001 | 1 | EN | UK English |
0x0002 | 2 | FR | French |
0x0003 | 3 | GE | German |
0x0004 | 4 | SP | Spanish |
0x0005 | 5 | IT | Italian |
0x0006 | 6 | SW | Swedish |
0x0007 | 7 | DA | Danish |
0x0008 | 8 | NO | Norwegian |
0x0009 | 9 | FI | Finnish |
0x000A | 10 | AM | American English |
0x000B | 11 | SF | Swiss French |
0x000C | 12 | SG | Swiss German |
0x000D | 13 | PO | Portuguese |
0x000E | 14 | TU | Turkish |
0x000F | 15 | IC | Icelandic |
0x0010 | 16 | RU | Russian |
0x0011 | 17 | HU | Hungarian |
0x0012 | 18 | DU | Dutch |
0x0013 | 19 | BL | Belgian Flemish |
0x0014 | 20 | AU | Australian English |
0x0015 | 21 | BG | Belgian French |
0x0016 | 22 | AS | Austrian German |
0x0017 | 23 | NZ | New Zealand English |
0x0018 | 24 | IF | International French |
0x0019 | 25 | CS | Czech |
0x001A | 26 | SK | Slovak |
0x001B | 27 | PL | Polish |
0x001C | 28 | SL | Slovenian |
0x001D | 29 | TC | Taiwan Chinese |
0x001E | 30 | HK | Hong Kong Chinese |
0x001F | 31 | ZH | PRC Chinese |
0x0020 | 32 | JA | Japanese |
0x0021 | 33 | TH | Thai |
0x0022 | 34 | AF | Afrikaans |
0x0023 | 35 | SQ | Albanian |
0x0024 | 36 | AH | Amharic |
0x0025 | 37 | AR | Arabic |
0x0026 | 38 | HY | Armenian |
0x0027 | 39 | TL | Tagalog |
0x0028 | 40 | BE | Belarussian |
0x0029 | 41 | BN | Bengali |
0x002A | 42 | BG | Bulgarian |
0x002B | 43 | MY | Burmese |
0x002C | 44 | CA | Catalan |
0x002D | 45 | HR | Croatian |
0x002E | 46 | CE | Canadian English |
0x002F | 47 | IE | International English |
0x0030 | 48 | SF | South African English |
0x0031 | 49 | ET | Estonian |
0x0032 | 50 | FA | Farsi |
0x0033 | 51 | CF | Canadian French |
0x0034 | 52 | GD | Scots Gaelic |
0x0035 | 53 | KA | Georgian |
0x0036 | 54 | EL | Greek |
0x0037 | 55 | CG | Cyprus Greek |
0x0038 | 56 | GU | Gujarati |
0x0039 | 57 | HE | Hebrew |
0x003A | 58 | HI | Hindi |
0x003B | 59 | IN | Indonesian |
0x003C | 60 | GA | Irish |
0x003D | 61 | SZ | Swiss Italian |
0x003E | 62 | KN | Kannada |
0x003F | 63 | KK | Kazakh |
0x0040 | 64 | KM | Khmer |
0x0041 | 65 | KO | Korean |
0x0042 | 66 | LO | Laothian |
0x0043 | 67 | LV | Latvian |
0x0044 | 68 | LT | Lithuanian |
0x0045 | 69 | MK | Macedonian |
0x0046 | 70 | MS | Malay |
0x0047 | 71 | ML | Malayalam |
0x0048 | 72 | MR | Marathi |
0x0049 | 73 | MO | Moldavian |
0x004A | 74 | MN | Mongolian |
0x004B | 75 | NN | Norwegian-Nynorsk |
0x004C | 76 | BP | Brazilian Portuguese |
0x004D | 77 | PA | Punjabi |
0x004E | 78 | RO | Romanian |
0x004F | 79 | SR | Serbian |
0x0050 | 80 | SI | Sinhalese |
0x0051 | 81 | SO | Somali |
0x0052 | 82 | OS | International Spanish |
0x0053 | 83 | LS | Latin American Spanish |
0x0054 | 84 | SH | Swahili |
0x0055 | 85 | FS | Finland Swedish |
0x0057 | 87 | TA | Tamil |
0x0058 | 88 | TE | Telugu |
0x0059 | 89 | BO | Tibetan |
0x005A | 90 | TI | Tigrinya |
0x005B | 91 | CT | Cyprus Turkish |
0x005C | 92 | TK | Turkmen |
0x005D | 93 | UK | Ukrainian |
0x005E | 94 | UR | Urdu |
0x0060 | 96 | VI | Vietnamese |
0x0061 | 97 | CY | Welsh |
0x0062 | 98 | ZU | Zulu |
Note that SF
is used for both Swiss French and South African English.
The Files pointer field in the header points to the file records that specify the details of the files to be installed. The Number of Files field in the header specifies the number of records. These are stored contiguously, in the reverse of the order required for installation. Each record starts with a 4 byte File record type field specifying the type of record that follows:
Type | Description |
---|---|
0x00000000 | Simple file line |
0x00000001 | Multiple language files line |
0x00000002 | Options line |
0x00000003 | If line |
0x00000004 | ElseIf line |
0x00000005 | Else line |
0x00000006 | EndIf line |
If the File record type field at the start of the record is 0x00000000
or 0x00000001
then the record specifies a single file to be installed. It is in the following format:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | File record type |
0x04 | 4 | 4 | File type |
0x08 | 8 | 4 | File details |
0x0c | 12 | 4 | Source name length |
0x10 | 16 | 4 | Source name pointer |
0x14 | 20 | 4 | Destination name length |
0x18 | 24 | 4 | Destination name pointer |
0x1c | 28 | 4n | File length(s) |
0x1c + 4n | 28 + 4n | 4n | File pointer(s) |
The file records of EPOC release 6 format SIS files are extended:
Offset | Bytes | Description | |
---|---|---|---|
0x1c + 8n | 28 + 8n | 4n | Original file length(s) |
0x1c + 12n | 28 + 12n | 4 | MIME type length |
0x20 + 12n | 32 + 12n | 4 | MIME type pointer |
The File type consists of one of the following types:
File type | Code | Description | ||
---|---|---|---|---|
0x00 | 0 | FF | FILE | Standard file (the default) |
0x01 | 1 | FT | FILETEXT | Text file to display during installation |
0x02 | 2 | SIS component file | ||
0x03 | 3 | FR | FILERUN | File to be run during installation and/or removal |
0x04 | 4 | FN | FILENULL | File does not yet exist, but will be created when the application is run |
0x05 | 5 | FM | FILEMIME | Open file |
The File details give extra information for the specified File type.
If the File type identifies a standard file (FF
) then the file is installed on the target machine and File details is always 0x00000000
.
If the File type identifies a text file (FT
) then the file is not installed; it is just displayed during installation. The buttons to use are specified by the File details field:
File details | Code | Description | ||
---|---|---|---|---|
0x0000 | 0 | TC | TEXTCONTINUE | Continue (continue installation) |
0x0001 | 1 | TS | TEXTSKIP | Yes (continue installation), No (skip next file) |
0x0002 | 2 | TA | TEXTABORT | Yes (continue installation), No (abort installation) |
0x0003 | 3 | TE | TEXTEXIT | Yes (continue installation), No (abort and undo installation) |
If the File type identifies a SIS component file then the SIS component is installed, and File details is set to the UID of the application that the SIS file installs. Pointers within component SIS files are specified as offsets from the start of that file. Component SIS files are usually used for components that may be shared between multiple applications; they ensure that existing installations are not overwritten by earlier versions.
If the File type identifies a file to be run (FR
) then it is installed on the target machine, and the File details field specifies when it should be run:
File details | Code | Description | ||
---|---|---|---|---|
0x0000 | 0 | RI | RUNINSTALL | Run during installation only |
0x0001 | 1 | RR | RUNREMOVE | Run during removal only |
0x0002 | 2 | RB | RUNBOTH | Run during both installation and removal |
0x0100 | 256 | RE | RUNSENDEND | Close when installation complete |
0x0200 | 512 | RW | Wait until closed before continuing |
If the File type field identifies a file that does not yet exist (FN
) then the file will be created by the running application, and will be deleted when the application is removed. Note that the file will not be deleted when upgrading to a later version, ensuring that application preferences are not lost in an upgrade. The File details are always 0x00000000
.
If the File type field identifies a file to open (FM
) then the file will be opened during installation using the application associated with the MIME type, and the File details field specifies when it should be run:
File details | Code | Description | |
---|---|---|---|
0x0100 | 256 | OC | Close when installation complete |
0x0200 | 512 | OW | Wait until closed before continuing |
The Source name length and Source name pointer specify the length and offset of the source filename respectively. This is the path of the original file on the machine used to construct the SIS file; it does not affect the installation or removal process. The name is usually blank if the File type field identifies a file that does not yet exist (FN
).
The Destination name length and Destination name pointer specify the length and offset of the target filename respectively. The drive letter may be specified as an exclamation mark ("!
") to allow a choice of drive during installation. The name is usually blank if the File type field identifies a text file (FT
).
The File length and File pointer specify the length and offset of the file contents respectively. The Original file length specifies the size of the file when uncompressed. If the File record type field specifies that there are multiple language versions, then the File length, File pointer and Original file length fields are individually repeated for each language version supported by the SIS file. These are specified in the same order as the language records.
Unless the NC
option is set in the header, file data in EPOC release 6 format files is compressed using zlib's compress
method.
The MIME type length and MIME type pointer fields specify the length and offset of the file's MIME type. If the file does not have a MIME type then the MIME type length field is set to 0x00000000
and the MIME type pointer field specifies the offset to the first byte after the end of the source and target filenames.
If the File record type field at the start of the record is 0x00000002
then the record specifies selectable installation options. It has the following format:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | File record type |
0x04 | 4 | 4 | Number of options |
0x08 | 8 | 8mn | Option strings |
0x08 | 8 + 8mn | 16 | Selected options |
The Number of options field specifies the number of options defined by the Options strings field. Each option consists of a record in the following form:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4n | Option string length(s) |
4n | 4n | 4n | Option string pointer(s) |
The Option string length and Option string pointer specify the length and offset of the option description respectively. The Option string length and Option string pointer fields are individually repeated for each language version supported by the SIS file. These are specified in the same order as the language records.
The Selected options field is a bitmap with one bit for each of up to 128 options. Initially all bits are set, but when the SIS file is installed this is modified to record the selected options.
Options are displayed to the user at the stage of the installation at which they appear within the SIS file. They behave as global attributes (affecting embedded SIS files) and are tested within If and ElseIf line records. The attributes corresponding to option n is identified by 0x2000
+n.
If the File record type field at the start of the record is 0x00000003
or 0x00000004
then the record specifies a conditional record in the following format:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | File record type |
0x04 | 4 | 4 | Size of conditional expression |
0x08 | 8 | n | Conditional expression |
The Size of conditional expression field specifies the size of the following Conditional expression.
The Conditional expression if recursively constructed from records that start with a Conditional type field:
Type | Description |
---|---|
0x00000000 | (Attribute) = (Value) |
0x00000001 | (Attribute) <> (Value) |
0x00000002 | (Attribute) > (Value) |
0x00000003 | (Attribute) < (Value) |
0x00000004 | (Attribute) >= (Value) |
0x00000005 | (Attribute) <= (Value) |
0x00000006 | (Conditional expression) AND (Conditional expression) |
0x00000007 | (Conditional expression) OR (Conditional expression) |
0x00000008 | exists (Filename) |
0x00000009 | devcap (Capability) |
0x0000000a | appcap (UID, Capability) |
0x0000000b | NOT (Conditional expression) |
0x0000000c | String |
0x0000000d | Attribute |
0x0000000e | Number |
If the Conditional type is 0x00000000
to 0x00000007
or 0x0000000a
then it specifies a binary operator applied to two sub-expressions (each recursively constructed as for Conditional expression):
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | Conditional type |
0x04 | 4 | n | Left-hand side conditional sub-expression |
0x04 | 4 + n | m | Right-hand side conditional sub-expression |
The two sub-expressions for Conditional type 0x0000000a
are always numbers (Conditional type 0x0000000e
).
If the Conditional type is 0x00000008
, 0x00000009
or 0x0000000b
then it specifies a unary operator applied to a sub-expression (recursively constructed as for Conditional expression):
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | Conditional type |
0x04 | 4 | n | Conditional sub-expression |
The sub-expression for Conditional type 0x00000008
is always a string (Conditional type 0x0000000c
), and the sub-expression for Conditional type 0x00000009
is always a number (Conditional type 0x0000000e
).
If the Conditional type is 0x0000000c
then it specifies a string:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | Conditional type |
0x04 | 4 | 4 | String length |
0x08 | 8 | 4 | String pointer |
0x0000000d
then it specifies an attribute:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | Conditional type |
0x04 | 4 | 4 | Attribute |
0x08 | 8 | 4 | Unused |
The Attribute may be one of the following:
Flag | Code | Description |
---|---|---|
0x00000000 | Manufacturer | 0 =Ericsson, 1 =Motorola, 2 =Nokia, 3 =Panasonic, 4 =Psion, 5 =Intel, 6 =Cogent, 7 =Cirrus, etc |
0x00000001 | ManufacturerHardwareRev | 0x0100 = 1.00 (manufacturer specific) |
0x00000002 | ManufacturerSoftwareRev | 0x0100 = 1.00 (manufacturer specific) |
0x00000003 | ManufacturerSoftwareBuild | (manufacturer specific) |
0x00000004 | Model | |
0x00000005 | MachineUid | Device specific values for products as defined in epoc32/include/hal_data.h |
0x00000006 | DeviceFamily | 0 =Crystal, 1 =Pearl, 2 =Quartz |
0x00000007 | DeviceFamilyRev | 0x0100 = 1.00 |
0x00000008 | CPU | 0 =ARM, 1 =MCORE, 2 =x86 |
0x00000009 | CPUArch | 0x400 =ARM4, 0x410 =ARM4T, 0x500 =ARM5, 0x300 =M340 |
0x0000000a | CPUABI | 0 =ARM4, 1 =ARMI, 2 =THUMB, 3 =MCORE, 4 =MSVC |
0x0000000b | CPUSpeed | CPU clock speed / 1024, e.g. 36864 =36MHz |
0x0000000e | SystemTickPeriod | Tick period in microseconds |
SystemSpeed | Approximate speed relative to Psion Series 5 = 100 | |
0x0000000f | MemoryRAM | Total RAM size in bytes |
0x00000010 | MemoryRAMFree | Free RAM size in bytes |
0x00000011 | MemoryROM | Total ROM size |
0x00000012 | MemoryPageSize | Size of memory management unit pages |
0x00000015 | PowerBackup | 0 =none, 1 =supported |
0x00000018 | Keyboard | 0 =none, 1 =keypad, 2 =full, 3 =both |
0x00000019 | KeyboardDeviceKeys | Number of device specific keys |
0x0000001a | KeyboardAppKeys | Number of application keys |
0x0000001b | KeyboardClick | 0 =none, 1 =supported |
0x0000001e | KeyboardClickVolumeMax | |
0x0000001f | DisplayXPixels | Screen width in pixels |
0x00000020 | DisplayYPixels | Screen height in pixels |
0x00000021 | DisplayXTwips | Screen width in twips (1/1440 inch) |
0x00000022 | DisplayYTwips | Screen height in twips (1/1440 inch) |
0x00000023 | DisplayColors | 2 , 4 , 16 , 256 , 65536 , etc |
0x00000026 | DisplayContrastMax | |
0x00000027 | Backlight | 0 =none, 1 =supported |
0x00000029 | Pen | 0 =none, 1 =supported |
0x0000002a | PenX | Pen horizontal resolution |
0x0000002b | PenY | Pen vertical resolution |
0x0000002c | PenDisplayOn | 0 =no 1 =yes |
0x0000002d | PenClick | 0 =none, 1 =supported |
0x00000030 | PenClickVolumeMax | |
0x00000031 | Mouse | 0 =none, 1 =supported |
0x00000032 | MouseX | Mouse horizontal resolution |
0x00000033 | MouseY | Mouse vertical resolution |
0x00000037 | MouseButtons | Number of mouse buttons |
0x0000003a | CaseSwitch | 0 =none, 1 =supported |
0x0000003d | LEDs | Number of LEDs |
0x0000003f | IntegratedPhone | 0 =none, 1 =supported |
0x00000041 | DisplayBrightnessMax | |
0x00000042 | KeyboardBacklightState | |
0x00000043 | AccessoryPower | |
0x00000059 | NumHalAttributes | Number of supported HAL attributes |
0x00001000 | Language | Machine language |
0x00001001 | RemoteInstall | 0 =Symbian OS based install, 1 =installation via a PC |
0x00002000 + n | Option <n> | 0 =option not selected, 1 =option selected |
If the Conditional type is 0x0000000e
then it specifies a number:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | Conditional type |
0x04 | 4 | 4 | Number |
0x08 | 8 | 4 | Unused |
If the File record type field at the start of the record is 0x00000005
or 0x00000006
then the record consists of just the type field:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | File record type |
The Requisites pointer field in the header points to the requisites records that specify the files that are required by the component being installed. The Number of requisites field in the header specifies the number of records. These are stored contiguously in the following format:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4 | UID |
0x04 | 4 | 2 | Major version |
0x06 | 6 | 2 | Minor version |
0x08 | 8 | 4 | Variant |
0x0c | 12 | 4n | Requisite name length(s) |
0x0c + 4n | 12 + 4n | 4n | Requisite name pointer(s) |
The UID field specifies the UID of the component that is required, i.e. the first word of its residual SIS file.
The Major version and Minor version fields specify the minimum version number of the component required. The Minor version number is padded to two digits with leading zeros for display. This is not checked by the control panel Add/remove
program.
The Variant field specifies the variant of the component that is required. This is usually set to 0x00000000
, and is not checked by the control panel Add/remove
program.
The Requisite name length and Requisite name pointer specify the length and offset of the requite name respectively. The Requisite name length and Requisite name pointer fields are individually repeated for each language version supported by the SIS file. These are specified in the same order as the language records.
The requisite name is only used for display during installation; it does not need to match for the requisite to be satisfied.
The Component name pointer field in the header points to the component name record that specifies the name of the component to be installed. This is used both during installation and for the list of installed applications in the control panel Add/remove
program. The record is in the following format:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4n | Name length(s) |
4n | 4n | 4n | Name pointer(s) |
The Name length and Name pointer specify the length and offset of the component name respectively. The Name length and Name pointer fields are individually repeated for each language version supported by the SIS file. These are specified in the same order as the language records.
The Capabilities pointer field in the header points to the capabilities record. The record is in the following format:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 4n | Key |
4n | 4n | 4n | Value |
The Certificates pointer field in the header points to the certificates records. The record is in the following format:
Offset | Bytes | Description | |
---|---|---|---|
0x00 | 0 | 2 | Year |
0x02 | 2 | 2 | Month |
0x04 | 4 | 2 | Day |
0x06 | 6 | 2 | Hour |
0x08 | 8 | 2 | Minute |
0x0A | 10 | 2 | Second |
0x0C | 12 | 4 | Number of certificates |
The Year, Month, Day, Hour, Minute and Second fields form a timestamp.
The Number of certificates field specifies the number of certificates.
The remainder of the SIS file consists of the data referenced from the other sections. This is stored uncompressed and unpadded, usually in the following order:
Section |
---|
String Block, containing:
|
Code Block |
Signature Block |
If, for some reason, the resource data is arranged with the code block (containing the file data) before the component name, then the residual SIS file will be larger than necessary.
Installation of an SIS file requires several steps to be performed. These are described in the following sections.
These operations need to be repeated for any embedded component SIS files.
SIS files may support more than one language, as indicated by the Number of languages field in the header and the language records. The control panel Add/remove
program attempts to use the current language of the machine, but EPOC Connect prompts the user to choose from the available options.
The requisite records specify a list of other components that need to be installed. The residual SIS files on the target machine should be searched to verify that a suitable version of the required component has been installed.
The residual SIS files on the target machine are used to check for any previous versions of the application being installed. Any previous installation needs to be removed before installing the new version.
If the previous version is older than the version being installed then it is replaced without warning. However, if the previous version is newer then the behaviour depends on the installation program; the control panel Add/remove
program requires the user to first uninstall the more recent version, but EPOC Connect displays a confirmation prompt to allow the existing application to be removed and replaced.
The file records should be processed in the reverse of the order that they are stored in the SIS file. Text files should be displayed and component SIS files installed as they are encountered.
SIS files sometimes allow the user to select the installation drive. This is indicated by the destination file names having an exclamation mark ("!
") specified as the drive letter. In this case the user should be prompted to select from the available drives.
Directories should be created automatically to accommodate files being copied.
A residual SIS file is created in the C:/System/Install/
directory on the target machine. This allows the control panel to display a list of installed programs, and provides the dependency information required for removing the component or installing other applications.
The main modification is that the file is truncated after the file name and component name strings. This usually means that the file data is omitted, but this relies upon the SIS file contents being in a sensible order.
Finally, three fields in the header are modified with the settings used for the installation. The Installation language field is set to the language selected for the installation, the Installation files field is set to the number of files installed, and the Installation drive field is set to the drive letter where the files were installed.
Removing an application consists of deleting all the files listed within the residual SIS file. This includes any component SIS files and the residual SIS file itself.
Before a component is removed, all other residual SIS files need to be checked to verify that it is not required by another application. When uninstallation of a component involves the removal of another component's requisite files, the user is warned that continuing may prevent other programs from working.
If the application is being removed to allow a newer version to be installed then files with a File type field indicating a file created by the application (FN
) should not be removed.
If an installation or removal is aborted, the Installation files field is set to the number of files that are left installed. The control panel Add/remove
program marks any such installations as "Partial
" in the list of installed applications, and offers options to either resume the installation or to uninstall the application.