已阅读5页,还剩20页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
用于分析SISX文件格式,解压SISX文件,压缩SISX文件,程序自动打包S60安装程序等.SIS File FormatVersion 1.18, 19-Dec-07by Alexander Thoukydides (alexthouky.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. IntroductionThe 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 /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. HistoryRevisionDateAuthorDescription1.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.DisclaimerThis 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. AcknowledgementsThe information contained within this document was collated from many different sources, including (but not restricted to): Jochen Siegenthalers document providing a partial description of the SIS file format. EPOC C+ SDK, Evaluation Edition. Neuons nSISUtil. Analysis of a large selection of existing SIS files. Andrew de Quinceys 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 Mkinen, 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. SectionsSIS files consist of the following sections: SectionFile HeaderLanguage RecordsFile RecordsRequisite RecordsComponent Name RecordCapabilities RecordCertificates RecordResource DataThe 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. ConventionsUnless 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 HeaderAll SIS files start with a standard header: OffsetBytesDescription0x0004UID 10x0444UID 20x0884UID 30x0c124UID 40x10162Checksum0x12182Number of languages0x14202Number of files0x16222Number of requisites0x18242Installation language0x1a262Installation files0x1c282Installation drive0x1e302Number of capabilities0x20324Installer version0x24362Options0x26382Type0x28402Major version0x2a422Minor version0x2c444Variant0x30484Languages pointer0x34524Files pointer0x38564Requisites pointer0x3c604Certificates pointer0x40644Component name pointerThe header of EPOC release 6 format SIS files is extended: OffsetBytesDescription0x44684Signature pointer0x48724Capabilities pointer0x4C764Installed space0x50804Maximum installed space0x548416ReservedThe 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: OptionCodeDescription0x0001IUIsUnicode (EPOC release 5)0x0002IDIsDistributable (EPOC release 5)0x0008NCNOCOMPRESSNoCompress (EPOC release 6)0x0010SHSHUTDOWNAPPSShutdownApps (EPOC release 6)The Type may be any of the following: TypeCodeDescription0x0000SASISAPPContains 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 CheckThe 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 table256, index;table0 = 0;for (index = 0; index 128; index+)unsigned int carry = tableindex & 0x8000;unsigned int temp = (tableindex 1) & 0xffff;tableindex * 2 + (carry ? 0 : 1) = temp polynomial;tableindex * 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) 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 RecordsThe 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: LanguageCodeDescription0x00000Test0x00011ENUK English0x00022FRFrench0x00033GEGerman0x00044SPSpanish0x00055ITItalian0x00066SWSwedish0x00077DADanish0x00088NONorwegian0x00099FIFinnish0x000A10AMAmerican English0x000B11SFSwiss French0x000C12SGSwiss German0x000D13POPortuguese0x000E14TUTurkish0x000F15ICIcelandic0x001016RURussian0x001117HUHungarian0x001218DUDutch0x001319BLBelgian Flemish0x001420AUAustralian English0x001521BGBelgian French0x001622ASAustrian German0x001723NZNew Zealand English0x001824IFInternational French0x001925CSCzech0x001A26SKSlovak0x001B27PLPolish0x001C28SLSlovenian0x001D29TCTaiwan Chinese0x001E30HKHong Kong Chinese0x001F31ZHPRC Chinese0x002032JAJapanese0x002133THThai0x002234AFAfrikaans0x002335SQAlbanian0x002436AHAmharic0x002537ARArabic0x002638HYArmenian0x002739TLTagalog0x002840BEBelarussian0x002941BNBengali0x002A42BGBulgarian0x002B43MYBurmese0x002C44CACatalan0x002D45HRCroatian0x002E46CECanadian English0x002F47IEInternational English0x003048SFSouth African English0x003149ETEstonian0x003250FAFarsi0x003351CFCanadian French0x003452GDScots Gaelic0x003553KAGeorgian0x003654ELGreek0x003755CGCyprus Greek0x003856GUGujarati0x003957HEHebrew0x003A58HIHindi0x003B59INIndonesian0x003C60GAIrish0x003D61SZSwiss Italian0x003E62KNKannada0x003F63KKKazakh0x004064KMKhmer0x004165KOKorean0x004266LOLaothian0x004367LVLatvian0x004468LTLithuanian0x004569MKMacedonian0x004670MSMalay0x004771MLMalayalam0x004872MRMarathi0x004973MOMoldavian0x004A74MNMongolian0x004B75NNNorwegian-Nynorsk0x004C76BPBrazilian Portuguese0x004D77PAPunjabi0x004E78RORomanian0x004F79SRSerbian0x005080SISinhalese0x005181SOSomali0x005282OSInternational Spanish0x005383LSLatin American Spanish0x005484SHSwahili0x005585FSFinland Swedish0x005787TATamil0x005888TETelugu0x005989BOTibetan0x005A90TITigrinya0x005B91CTCyprus Turkish0x005C92TKTurkmen0x005D93UKUkrainian0x005E94URUrdu0x006096VIVietnamese0x006197CYWelsh0x006298ZUZuluNote that SF is used for both Swiss French and South African English. File RecordsThe 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: TypeDescription0x00000000Simple file line0x00000001Multiple language files line0x00000002Options line0x00000003If line0x00000004ElseIf line0x00000005Else line0x00000006EndIf lineSimple File or Multiple Language Files Line RecordIf 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: OffsetBytesDescription0x0004File record type0x0444File type0x0884File details0x0c124Source name length0x10164Source name pointer0x14204Destination name length0x18244Destination name pointer0x1c284nFile length(s)0x1c+ 4n28+ 4n4nFile pointer(s)The file records of EPOC release 6 format SIS files are extended: OffsetBytesDescription0x1c+ 8n28+ 8n4nOriginal file length(s)0x1c+ 12n28+ 12n4MIME type length0x20+ 12n32+ 12n4MIME type pointerThe Filetype consists of one of the following types: File typeCodeDescription0x000FFFILEStandard file (the default)0x011FTFILETEXTText file to display during installation0x022SIS component file0x033FRFILERUNFile to be run during installation and/or removal0x044FNFILENULLFile does not yet exist, but will be created when the application is run0x055FMFILEMIMEOpen fileThe 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 detailsCodeDescription0x00000TCTEXTCONTINUEContinue (continue installation)0x00011TSTEXTSKIPYes (continue installation), No (skip next file)0x00022TATEXTABORTYes (continue installation), No (abort installation)0x00033TETEXTEXITYes (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 detailsCodeDescription0x00000RIRUNINSTALLRun during installation only0x00011RRRUNREMOVERun during removal only0x00022RBRUNBOTHRun during both installation and removal0x0100256RERUNSENDENDClose when installation complete0x0200512RWWait until closed before continuingIf the Filetype field identifies a file that does not yet exist (FN) then the file will be created by the running application, and will
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年上海中医药大学单招职业技能考试题库及答案解析(夺冠系列)
- 2026年河北石油职业技术大学单招综合素质考试题库附答案解析
- 基于神经网络的语音识别
- 房屋打包委托协议书
- 房屋提前退房协议书
- 房屋整租间合同范本
- 房屋电梯移交协议书
- 房屋竞买协议书范本
- 房屋置换居间协议书
- 房屋裂缝修补协议书
- FZ/T 54021-2009聚对苯二甲酸丙二醇酯(PTT)预取向丝
- House-Brackmann面神经功能分级标准
- 工艺安全检查表
- 运动按摩全套课件
- 中央电大护理专业本科通科实习出科考核病历
- 中新天津生态城居民信息登记表
- 保安工作标准及奖惩办法
- 上海市松江区泖港镇镇属单位招考聘用(必考题)模拟卷和答案
- 公司指定账户打款说明
- 职工安全生产教育培训记录表
- 规划放线报告样本
评论
0/150
提交评论