Transfer from development horizon (www.sf.org.cn)
Language Support
The first line of the PKG file specifies the applicationProgramLanguage. Each language is represented by two letters, as follows:
Code:; Ages
& En, fr
Language code:
En English Po Portuguese
Fr French SP Spanish
GE German Ru Russian
It Italian du Dutch
SW Swedish da Danish
FI Finnish no Norwegian
MoreCodeReferSDK
The Language line can be ignored. In this way, the default English is used.
Baotou
The next component of the PKG file is the header. It details the package name, the UID of the application, and the type of the version information purse:
Code:# {"Dummylc", "bet1c"}, (0x0010d003), 12, type = sisapp
The first part {"dummylc", "bet1c"} is the name of the application. The name must be specified for each language in the Language Line. dummylc is the English name of the application, while bet1c is the French name.
The following is the UID (0x0010d003) of the application ). If you plan to release your application, this value should be obtained from Symbian (refer to request uid for your application ).
The next three values represent the major, minor, build version number (we have here version 1.01, build 12 ).
The following three values describe the Primary and Secondary versions and the bulid version (this version is 1.01, build 12 ).
The last value is optional. It specifies the SIS type. The possible values are as follows:
Sisapp: Contains an application (specified if not specified ).
Sissystem: Contains a shared/system component, such as DLL or opx, which can be used by other applications. When the final application is uninstalled, the component is also uninstalled.
Sisoption: Contains an extension or optional component (dynamic loading of code, data files, etc ). You can choose whether to install or delete the component later. The component does not depend on the main program.
Sisconfig: Configure an existing application or service. This package cannot contain any new files, and can only be displayed during the installation period, or add an existing component. This package will not appear after it is installed.
Sispatch: Adds an existing component that can be uninstalled by the user.
SisupgradeUpdate an existing component. After the package is installed, it is not listed in the uninstall program. to reinstall or uninstall the package, you must change the associated program.
Product/platform compatibility
The following line specifies the target platform or product of the application:
Code:(0x101f6f88), 0, 0, 0, {"series60productid", "series60productid "}
0x101f6f88 indicates Series 60 v0.9. It supports most existing s60 devices. Of course, if you use some specific APIs, you will use the response code instead. View our general production uid page to get more codes.
0, 0, and 0 are the major version number, minor version number, and build number. You do not need to modify it.
{"Series60productid", "series60productid"} is a platform recognition string. You should use "series60productid" on the s60 device ". Note: This string will repeat the language specified by your Language Line.
Show text notifications
Some text windows are displayed during installation. It can be shown that the authorization for program use, some release notifications, and so on (features of the new version, etc)
Use of filetext:
Code:;
; Display new features
;
"Release.txt"-"", filetext, textcontinue
The content of the release.txt file is displayed during the installation process. This file is in the same directory as the PKG file (if it is not the same directory, you must specify the path). In this example, the file will not be installed on the mobile phone.
Textcontinue: The specified user can only operate "continue"
Textskip: The "yes" and "no" text dialog boxes are displayed. If "yes", the dialog box disappears and the installation program continues. If the "no" dialog box disappears, the subsequent files and components will not be installed.
Textexit: The "yes" and "no" text dialog boxes are displayed. Select "yes" to continue the installation. If you select "no", the installation will be canceled and all files will be deleted.
Textabort: The "yes" and "no" text dialog boxes are displayed. Select "yes". The dialog box is canceled and the installation continues. Select "no". The installation is canceled, which usually causes partial installation.
This part can also be integrated in the file part. The textskip option can be used to check whether a file is installed.
Language dependency File
Applications can contain language-dependent files (data files, resource files, and so on). You can specify the dependent files to be installed:
Code:;
; Install language dependent data
;
{
"" Symbian "6.1" series60 "epoc32" release "Thumb" urel "dummylc. R01"
"" Symbian "6.1" series60 "epoc32" release "Thumb" urel "dummylc. r02"
}-"! : "System" apps "dummylc" dummylc. RSC"
If you select English, dummylc. R01 will be installed as the dummylc. RSC file; if you select French dummylc. r02, it will be installed. Interestingly, only one file will be installed on the mobile phone. They are always named with the same content as the user language.
If you use a memory card ,"! : "Specifies the target location that the user can select. If you do not want to select a path, you can replace it with an absolute path (for example, C :).
In this step, you should pay attention to all the content in braces to specify language options.
Independent language files
The following part of the file will be installed no matter what language the user is using:
Code:;
; Files to install
;
"" Symbian "6.1" series60 "epoc32" release "Thumb" urel "dummylc. app "-"! : "System" apps "dummylc" dummylc. app"
"" Symbian "6.1" series60 "epoc32" release "Thumb" urel "dummylc. AIF "-"! : "System" apps "dummylc" dummylc. AIF"
Upper
The following content adds two files in the sisfile to the mobile phone. dummylc. app and dummylc. AIF are located in
C: "Symbian" 6.1 "series60" epoc32 "release" Thumb "urel"
Folder. These files will be installed in the "System" apps "dummylc directory of the drive letter installed on the mobile phone device.
Run a file during installation
It is sometimes useful to run a file when running an installation or uninstall program. Typical use:
1. Start a service after installation (recognizer registrants can also use it ).
2. Do some cleanup after uninstalling.
...
AvailableFilerunCommand to achieve:
Code:;
; Install and run an EXE
;
"" Symbian "6.1" series60 "epoc32" release "Thumb" urel "runme.exe "-"! : "System" apps "dummylc" runme.exe ", filerun, runinstall
In the example, runme.exe is automatically executed during installation.
Other commands:
Runremove: Run
Runboth: Run the command during installation and uninstallation.
Install a shared component
An sisfile that contains a component that can be shared with other applications:
Code:;
; Install shared component
;
@ "..."... "Common" DLL "Install" newlcdll. Sis ", (0x1000eb00)
This shared component will be included in the application and installed with the application unless it has been installed. When an application uses this shared component, it cannot be detached.
OurEzbootIs a good example of sharing components.
The following code can also use the specified external component
Code:(0x1000eb00), 1, 0, 12, {"newlc DLL", "newlc DLL "}
The above code will request to install an existing component whose uid is "0x1000eb00" version 1.0 Build 12. However, if the DLL does not exist on your mobile phone, you cannot install the installation package.
Files generated during running
The application may also generate a data file during running (such as parameters and high score rankings ).
To ensure that these files are also deleted when you uninstall the application, you need to use the filenull option:
Code:;
; Make sure the configuration file is removed on uninstall
;
""-"C:" system "apps" dummylc "dummylc. ini", filenull
Note: When the version is updated, dummylc. ini will not be deleted. This is done to ensure that files like INI (record some related parameters) will not be deleted when they are updated.