塞班(Symbian)安装文件.SISX文件格式说明

原文地址:http://homepage.ntlworld.com/thouky/software/psifs/sis.html

用于分析SISX文件格式,解压SISX文件,压缩SISX文件,程序自动打包S60安装程序等.

SIS File Format

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".

Introduction

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.

History

RevisionDateAuthorDescription
1.1819-Dec-07Alexander ThoukydidesCorrected conditional expression types.
1.1727-Nov-07Alexander ThoukydidesCorrected size of the Number of certificates field.
1.1618-Jul-07Alexander ThoukydidesAdded standard names and other uses for the CRC algorithm.
1.1503-Feb-07Alexander ThoukydidesAdded note about endianness.
1.1423-Sep-06Alexander ThoukydidesAdded link to Symbian 9.1 SIS file format documentation.
1.1307-Jun-06Alexander ThoukydidesExclude signature block from calculation of the Checksum field.
1.1204-Apr-06Alexander ThoukydidesCorrected description of Original file length field.
1.1105-May-04Alexander ThoukydidesAdded long option codes.
1.1004-May-04Alexander ThoukydidesAdded more language and type codes.
1.0914-Mar-04Alexander ThoukydidesAdded more details of EPOC release 6 format files.
1.0830-Apr-03Alexander ThoukydidesAdded more details of EPOC release 6 format files.
1.0708-Jul-01Alexander ThoukydidesSplit the flags field into options and type.
Corrected installer version field.
1.0607-Jul-01Alexander ThoukydidesCorrected description of requisites with multiple language versions.
1.0530-Jun-01Alexander ThoukydidesAdded desription of checksum field in the header.
Explained calculation of UID4 better.
1.0427-Jun-01Alexander ThoukydidesAdded flags field to the file header.
1.0309-Jun-01Alexander ThoukydidesAdded missing languages and clarified some descriptions.
1.0202-Jun-00Alexander ThoukydidesReleased under version 1.1 of the GNU Free Documentation License.
1.0121-Apr-00Alexander ThoukydidesCorrected HTML.
Added URL for latest version of this document.
1.0027-Mar-00Alexander ThoukydidesFirst draft.

Disclaimer

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.

Acknowledgements

The information contained within this document was collated from many different sources, including (but not restricted to):

  • Jochen Siegenthaler's document providing a partial description of the SIS file format.
  • EPOC C++ SDK, Evaluation Edition.
  • Neuon's nSISUtil.
  • Analysis of a large selection of existing SIS files.
  • Andrew de Quincey's xmakesis Perl script, as updated by Rudolf Koenig.
  • Trial and error while developing PsiFS for RISC OS computers.
  • Corrections supplied by Dalibor Jelinek, Eberhard Mattes, Neil Masson, Stephanie Freitag, Bruno Tiago Rodrigues, Jimmy Shah, Jordan Walters, David Berry, Ren Yantao, a1z0r, Luca Cassioli, Wellu Mäkinen, Marcio Faustino and Tero Suomela.

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.

Sections

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.

Conventions

Unless otherwise specified the following conventions apply:

  • Numeric values larger than a byte are stored with the least significant byte first.
  • Strings are not terminated; their length is explicitly specified.
  • Pointers are specified as offsets from the start of the SIS file.

File Header

All SIS files start with a standard header:

OffsetBytesDescription
0x0004UID 1
0x0444UID 2
0x0884UID 3
0x0c124UID 4
0x10162Checksum
0x12182Number of languages
0x14202Number of files
0x16222Number of requisites
0x18242Installation language
0x1a262Installation files
0x1c282Installation drive
0x1e302Number of capabilities
0x20324Installer version
0x24362Options
0x26382Type
0x28402Major version
0x2a422Minor version
0x2c444Variant
0x30484Languages pointer
0x34524Files pointer
0x38564Requisites pointer
0x3c604Certificates pointer
0x40644Component name pointer

The header of EPOC release 6 format SIS files is extended:

OffsetBytesDescription
0x44684Signature pointer
0x48724Capabilities pointer
0x4C764Installed space
0x50804Maximum installed space
0x548416Reserved

The UID1, UID2 and UID3 fields are the first three words of the file, and indicate the type of data it contains. UID1 is the UID of the application to be installed, or 0x10000000 if none. UID2 is 0x1000006D for EPOC releases 3, 4 and 5, and 0x10003A12 for EPOC release 6. UID3 is always 0x10000419.

UID4 is a checksum calculated from the preceding fields. The least significant 16bits are given by the CRC16 of the bytes at even offsets from the start of the file, and the most significant 16bits 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 Numberoflanguages and Languagespointer fields specify the number of languages supported by the SIS file and the offset to the languages records respectively.

The Numberoffiles and Filespointer fields specify the number of files included in the SIS file and the offset to the files records respectively.

The Numberofrequisites and Requisitespointer fields specify the number of requisites specified in the SIS file and the offset to the requisites records respectively.

The Installationlanguage and Installationfiles fields are both initially zero. When the SIS file is installed, these are modified with the settings used for the installation.

The Installationdrive 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 Installerversion 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:

OptionCodeDescription
0x0001IUIsUnicode (EPOC release 5)
0x0002IDIsDistributable (EPOC release 5)
0x0008NCNOCOMPRESSNoCompress (EPOC release 6)
0x0010SHSHUTDOWNAPPSShutdownApps (EPOC release 6)

The Type may be any of the following:

TypeCodeDescription
0x0000SASISAPPContains an application (the default)
0x0001SYSISSYSTEMContains a shared/system component such as a DLL or OPX (EPOC release 6)
0x0002SOSISOPTIONContains an optional component, independently selectable by the user (EPOC release 6)
0x0003SCSISCONFIGConfigures an existing application or service (EPOC release 6)
0x0004SPSISPATCHPatches an existing component (EPOC release 6)
0x0005SUSISUPGRADEUpgrades an existing component (EPOC release 6)

The Majorversion and Minorversion fields specify the version number of the application. The Minorversion 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 Certificatespointer specifies the offset to the certificates record.

The Componentnamepointer field specifies the offset to the component name record.

The Signaturepointer field specifies the offset to the signature block.

The Numberofcapabilities and Capabilitiespointer fields specify the number of capabilities specified in the SIS file and the offset to the capabilities record respectively.

The Installedspace field is initially 0x00000000. When the SIS file is installed, this is modified with the space used by the installed files.

The Maximuminstalledspace 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.

Cyclic Redundancy Check

The standard x16+x12+x5+1 polynomial is used with an initial remainder of zero to generate a 16bit 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;
unsigned int table[256], index;
table[0] = 0;
for (index = 0; index < 128; index++)
{
unsigned int carry = table[index] & 0x8000;
unsigned int temp = (table[index] << 1) & 0xffff;
table[index * 2 + (carry ? 0 : 1)] = temp ^ polynomial;
table[index * 2 + (carry ? 1 : 0)] = temp;
}

The following line can then be used to add a byte (value) to a 16bit CRC (old_crc) to give the new 16bit 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 16bit integers.

Language Records

The Languagespointer field in the header points to the language records that specify which languages are supported by the SIS file. The Numberoflanguages field in the header specifies the number of records. Each record consists of a 2 byte value from the following table:

LanguageCodeDescription
0x00000Test
0x00011ENUK English
0x00022FRFrench
0x00033GEGerman
0x00044SPSpanish
0x00055ITItalian
0x00066SWSwedish
0x00077DADanish
0x00088NONorwegian
0x00099FIFinnish
0x000A10AMAmerican English
0x000B11SFSwiss French
0x000C12SGSwiss German
0x000D13POPortuguese
0x000E14TUTurkish
0x000F15ICIcelandic
0x001016RURussian
0x001117HUHungarian
0x001218DUDutch
0x001319BLBelgian Flemish
0x001420AUAustralian English
0x001521BGBelgian French
0x001622ASAustrian German
0x001723NZNew Zealand English
0x001824IFInternational French
0x001925CSCzech
0x001A26SKSlovak
0x001B27PLPolish
0x001C28SLSlovenian
0x001D29TCTaiwan Chinese
0x001E30HKHong Kong Chinese
0x001F31ZHPRC Chinese
0x002032JAJapanese
0x002133THThai
0x002234AFAfrikaans
0x002335SQAlbanian
0x002436AHAmharic
0x002537ARArabic
0x002638HYArmenian
0x002739TLTagalog
0x002840BEBelarussian
0x002941BNBengali
0x002A42BGBulgarian
0x002B43MYBurmese
0x002C44CACatalan
0x002D45HRCroatian
0x002E46CECanadian English
0x002F47IEInternational English
0x003048SFSouth African English
0x003149ETEstonian
0x003250FAFarsi
0x003351CFCanadian French
0x003452GDScots Gaelic
0x003553KAGeorgian
0x003654ELGreek
0x003755CGCyprus Greek
0x003856GUGujarati
0x003957HEHebrew
0x003A58HIHindi
0x003B59INIndonesian
0x003C60GAIrish
0x003D61SZSwiss Italian
0x003E62KNKannada
0x003F63KKKazakh
0x004064KMKhmer
0x004165KOKorean
0x004266LOLaothian
0x004367LVLatvian
0x004468LTLithuanian
0x004569MKMacedonian
0x004670MSMalay
0x004771MLMalayalam
0x004872MRMarathi
0x004973MOMoldavian
0x004A74MNMongolian
0x004B75NNNorwegian-Nynorsk
0x004C76BPBrazilian Portuguese
0x004D77PAPunjabi
0x004E78RORomanian
0x004F79SRSerbian
0x005080SISinhalese
0x005181SOSomali
0x005282OSInternational Spanish
0x005383LSLatin American Spanish
0x005484SHSwahili
0x005585FSFinland Swedish
0x005787TATamil
0x005888TETelugu
0x005989BOTibetan
0x005A90TITigrinya
0x005B91CTCyprus Turkish
0x005C92TKTurkmen
0x005D93UKUkrainian
0x005E94URUrdu
0x006096VIVietnamese
0x006197CYWelsh
0x006298ZUZulu

Note that SF is used for both Swiss French and South African English.

File Records

The Filespointer field in the header points to the file records that specify the details of the files to be installed. The NumberofFiles 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 Filerecordtype field specifying the type of record that follows:

TypeDescription
0x00000000Simple file line
0x00000001Multiple language files line
0x00000002Options line
0x00000003If line
0x00000004ElseIf line
0x00000005Else line
0x00000006EndIf line

Simple File or Multiple Language Files Line Record

If the Filerecordtype 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:

OffsetBytesDescription
0x0004File record type
0x0444File type
0x0884File details
0x0c124Source name length
0x10164Source name pointer
0x14204Destination name length
0x18244Destination name pointer
0x1c284n File length(s)
0x1c
+ 4n
28
+ 4n
4n File pointer(s)

The file records of EPOC release 6 format SIS files are extended:

OffsetBytesDescription
0x1c
+ 8n
28
+ 8n
4n Original file length(s)
0x1c
+ 12n
28
+ 12n
4MIME type length
0x20
+ 12n
32
+ 12n
4MIME type pointer

The Filetype consists of one of the following types:

File typeCodeDescription
0x000FFFILEStandard file (the default)
0x011FTFILETEXTText file to display during installation
0x022SIS component file
0x033FRFILERUNFile to be run during installation and/or removal
0x044FNFILENULLFile does not yet exist, but will be created when the application is run
0x055FMFILEMIMEOpen file

The Filedetails give extra information for the specified Filetype.

If the Filetype identifies a standard file (FF) then the file is installed on the target machine and Filedetails is always 0x00000000.

If the Filetype 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 Filedetails field:

File detailsCodeDescription
0x00000TCTEXTCONTINUE Continue (continue installation)
0x00011TSTEXTSKIP Yes (continue installation), No (skip next file)
0x00022TATEXTABORT Yes (continue installation), No (abort installation)
0x00033TETEXTEXIT Yes (continue installation), No (abort and undo installation)

If the Filetype identifies a SIS component file then the SIS component is installed, and Filedetails 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 Filetype identifies a file to be run (FR) then it is installed on the target machine, and the Filedetails field specifies when it should be run:

File detailsCodeDescription
0x00000RIRUNINSTALLRun during installation only
0x00011RRRUNREMOVERun during removal only
0x00022RBRUNBOTHRun during both installation and removal
0x0100256RERUNSENDENDClose when installation complete
0x0200512RWWait until closed before continuing

If the Filetype 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 Filedetails are always 0x00000000.

If the Filetype 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 Filedetails field specifies when it should be run:

File detailsCodeDescription
0x0100256OCClose when installation complete
0x0200512OWWait until closed before continuing

The Sourcenamelength and Sourcenamepointer 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 Filetype field identifies a file that does not yet exist (FN).

The Destinationnamelength and Destinationnamepointer 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 Filetype field identifies a text file (FT).

The Filelength and Filepointer specify the length and offset of the file contents respectively. The Originalfilelength specifies the size of the file when uncompressed. If the Filerecordtype field specifies that there are multiple language versions, then the Filelength, Filepointer and Originalfilelength 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 MIMEtypelength and MIMEtypepointer fields specify the length and offset of the file's MIME type. If the file does not have a MIME type then the MIMEtypelength field is set to 0x00000000 and the MIMEtypepointer field specifies the offset to the first byte after the end of the source and target filenames.

Options Line Record

If the Filerecordtype field at the start of the record is 0x00000002 then the record specifies selectable installation options. It has the following format:

OffsetBytesDescription
0x0004File record type
0x0444Number of options
0x0888mn Option strings
0x08
+ 8mn
8
+ 8mn
16Selected options

The Numberofoptions field specifies the number of options defined by the Optionsstrings field. Each option consists of a record in the following form:

OffsetBytesDescription
0x0004n Option string length(s)
4n4n 4n Option string pointer(s)

The Optionstringlength and Optionstringpointer specify the length and offset of the option description respectively. The Optionstringlength and Optionstringpointer 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 Selectedoptions 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 or ElseIf Line Record

If the Filerecordtype field at the start of the record is 0x00000003 or 0x00000004 then the record specifies a conditional record in the following format:

OffsetBytesDescription
0x0004File record type
0x0444Size of conditional expression
0x088nConditional expression

The Sizeofconditionalexpression field specifies the size of the following Conditionalexpression.

The Conditionalexpression if recursively constructed from records that start with a Conditionaltype field:

TypeDescription
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)
0x0000000cString
0x0000000dAttribute
0x0000000eNumber

If the Conditionaltype is 0x00000000 to 0x00000007 or 0x0000000a then it specifies a binary operator applied to two sub-expressions (each recursively constructed as for Conditionalexpression):

OffsetBytesDescription
0x0004Conditional type
0x044nLeft-hand side conditional sub-expression
0x04
+ n
4
+ n
mRight-hand side conditional sub-expression

The two sub-expressions for Conditionaltype 0x0000000a are always numbers (Conditionaltype 0x0000000e).

If the Conditionaltype is 0x00000008, 0x00000009 or 0x0000000b then it specifies a unary operator applied to a sub-expression (recursively constructed as for Conditionalexpression):

OffsetBytesDescription
0x0004Conditional type
0x044nConditional sub-expression

The sub-expression for Conditionaltype 0x00000008 is always a string (Conditionaltype 0x0000000c), and the sub-expression for Conditionaltype 0x00000009 is always a number (Conditionaltype 0x0000000e).

If the Conditionaltype is 0x0000000c then it specifies a string:

OffsetBytesDescription
0x0004Conditional type
0x0444String length
0x0884String pointer
If the Conditionaltype is 0x0000000d then it specifies an attribute:

OffsetBytesDescription
0x0004Conditional type
0x0444Attribute
0x0884Unused

The Attribute may be one of the following:

FlagCodeDescription
0x00000000Manufacturer 0=Ericsson, 1=Motorola, 2=Nokia, 3=Panasonic, 4=Psion, 5=Intel, 6=Cogent, 7=Cirrus, etc
0x00000001ManufacturerHardwareRev 0x0100 = 1.00 (manufacturer specific)
0x00000002ManufacturerSoftwareRev 0x0100 = 1.00 (manufacturer specific)
0x00000003ManufacturerSoftwareBuild(manufacturer specific)
0x00000004Model
0x00000005MachineUidDevice specific values for products as defined in epoc32/include/hal_data.h
0x00000006DeviceFamily 0=Crystal, 1=Pearl, 2=Quartz
0x00000007DeviceFamilyRev 0x0100 = 1.00
0x00000008CPU 0=ARM, 1=MCORE, 2=x86
0x00000009CPUArch 0x400=ARM4, 0x410=ARM4T, 0x500=ARM5, 0x300=M340
0x0000000aCPUABI 0=ARM4, 1=ARMI, 2=THUMB, 3=MCORE, 4=MSVC
0x0000000bCPUSpeedCPU clock speed / 1024, e.g. 36864=36MHz
0x0000000eSystemTickPeriodTick period in microseconds
SystemSpeedApproximate speed relative to Psion Series 5 = 100
0x0000000fMemoryRAMTotal RAM size in bytes
0x00000010MemoryRAMFreeFree RAM size in bytes
0x00000011MemoryROMTotal ROM size
0x00000012MemoryPageSizeSize of memory management unit pages
0x00000015PowerBackup 0=none, 1=supported
0x00000018Keyboard 0=none, 1=keypad, 2=full, 3=both
0x00000019KeyboardDeviceKeysNumber of device specific keys
0x0000001aKeyboardAppKeysNumber of application keys
0x0000001bKeyboardClick 0=none, 1=supported
0x0000001eKeyboardClickVolumeMax
0x0000001fDisplayXPixelsScreen width in pixels
0x00000020DisplayYPixelsScreen height in pixels
0x00000021DisplayXTwipsScreen width in twips (1/1440 inch)
0x00000022DisplayYTwipsScreen height in twips (1/1440 inch)
0x00000023DisplayColors 2, 4, 16, 256, 65536, etc
0x00000026DisplayContrastMax
0x00000027Backlight 0=none, 1=supported
0x00000029Pen 0=none, 1=supported
0x0000002aPenXPen horizontal resolution
0x0000002bPenYPen vertical resolution
0x0000002cPenDisplayOn 0=no 1=yes
0x0000002dPenClick 0=none, 1=supported
0x00000030PenClickVolumeMax
0x00000031Mouse 0=none, 1=supported
0x00000032MouseXMouse horizontal resolution
0x00000033MouseYMouse vertical resolution
0x00000037MouseButtonsNumber of mouse buttons
0x0000003aCaseSwitch 0=none, 1=supported
0x0000003dLEDsNumber of LEDs
0x0000003fIntegratedPhone 0=none, 1=supported
0x00000041DisplayBrightnessMax
0x00000042KeyboardBacklightState
0x00000043AccessoryPower
0x00000059NumHalAttributesNumber of supported HAL attributes
0x00001000LanguageMachine language
0x00001001RemoteInstall 0=Symbian OS based install, 1=installation via a PC
0x00002000
+ n
Option<n> 0=option not selected, 1=option selected

If the Conditionaltype is 0x0000000e then it specifies a number:

OffsetBytesDescription
0x0004Conditional type
0x0444Number
0x0884Unused

Else or EndIf Line Record

If the Filerecordtype field at the start of the record is 0x00000005 or 0x00000006 then the record consists of just the type field:

OffsetBytesDescription
0x0004File record type

Requisite Records

The Requisitespointer field in the header points to the requisites records that specify the files that are required by the component being installed. The Numberofrequisites field in the header specifies the number of records. These are stored contiguously in the following format:

OffsetBytesDescription
0x0004UID
0x0442Major version
0x0662Minor version
0x0884Variant
0x0c124n 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 Majorversion and Minorversion fields specify the minimum version number of the component required. The Minorversion 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 Requisitenamelength and Requisitenamepointer specify the length and offset of the requite name respectively. The Requisitenamelength and Requisitenamepointer 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.

Component Name Record

The Componentnamepointer 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:

OffsetBytesDescription
0x0004n Name length(s)
4n 4n 4n Name pointer(s)

The Namelength and Namepointer specify the length and offset of the component name respectively. The Namelength and Namepointer fields are individually repeated for each language version supported by the SIS file. These are specified in the same order as the language records.

Capabilities Record

The Capabilitiespointer field in the header points to the capabilities record. The record is in the following format:

OffsetBytesDescription
0x0004n Key
4n 4n 4n Value

Certificates Record

The Certificatespointer field in the header points to the certificates records. The record is in the following format:

OffsetBytesDescription
0x0002Year
0x0222Month
0x0442Day
0x0662Hour
0x0882Minute
0x0A102Second
0x0C124Number of certificates

The Year, Month, Day, Hour, Minute and Second fields form a timestamp.

The Numberofcertificates field specifies the number of certificates.

Resource Data

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:
  • File Names
  • Requisite Name
  • Component Name
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

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.

Select Language

SIS files may support more than one language, as indicated by the Numberoflanguages 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.

Check Requisites

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.

Check Previous Version

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.

Copy Files

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.

Residual SIS File

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 Installationlanguage field is set to the language selected for the installation, the Installationfiles field is set to the number of files installed, and the Installationdrive field is set to the drive letter where the files were installed.

Removal

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 Filetype field indicating a file created by the application (FN) should not be removed.

Partial Installation

If an installation or removal is aborted, the Installationfiles 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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
最简单的安装方法:首先,读卡器或数据线“大容量存储模式”连接: 1:电脑上操作:将程序COPY到存储卡的others(其他); 2:手机上操作:应用程序---文件管理---选择存储卡---其他---找到该程序后点击它安装即可。 3:安装好的程序在这里:应用程序 JAVA游戏的安装须知:【 新手必看】  1:安装JAR程序游戏时,JAR文件名不能含有汉字,否则无法运行,请将文件名改成英文或拼音后安装。 2:将某些JAR安装到存储卡时,出现安装进度条到80%停止或死机的情况,但可以安装到手机内存。一般是存储卡兼容性不太好,建议格卡或换卡。 另外:关于JAR游戏安装出现“证书错误”时,不妨用这个方法试试: 大家知道,JAR游戏是不需要签名的,但出现“证书错误” ,应该是手机里自带的证书冲突,也就是也许你安装了某个软件在E盘,而他自带了某个证书,而机器只认C盘的证书,所以就发生系统错误了.(但JAR可以装手机里)说明可能是该JAR不支持安装这个机型,另外极有可能就是存储卡的问题, 解决方法如下: 把存储卡连上电脑后,找到存储卡的属性(鼠标右键最后一个)----工具----运行碎片整理一次(一般问题在这里就解决了)就能安装JAR软件了!如果还不行的话,进行多一步,找到存储卡的属性单击右键→属性→工具→有一个查错(选中)→然后把自动修复那项打上勾(另一个不要打!)→然后扫描等他查完 ……应该问题解决了!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值