Text warning
During installation, you can specify a text display. This text will not be copied to your mobile phone, but will only display the required information or related protocols during installation. Add the following code to PKG:
"license.txt" - "", FILETEXT, TEXTCONTINUE
FiletextIt indicates that this file is displayed during installation. textcontinue provides a "continue" button to close the text content and continue to install the program.
You can alsoTextcontinueReplace it with the following options:
•TextskipThe "yes/no" option is displayed. If yes is selected, the installation will continue. If no is selected, the subsequent text will be skipped, but the installation will continue normally.
•TextexitThe "yes/no" option is displayed. If yes is selected, the installation will continue. Otherwise, the installation will be terminated and any installed files will be removed.
•TextabortThe "yes/no" option is displayed. If you select "no", the installation will be terminated, but the installed files will not be deleted.
The language of the multi-language text prompt can be adapted according to the default language of the mobile phone, for example:IF (LANGUAGE=2) ; If the language is French, then display mytext.t02
"mytext.t02"-"", FILETEXT, TEXTABORT
ELSEIF (LANGUAGE=3) ; If the language is German, then display mytext.t03
"mytext.t03"-"", FILETEXT, TEXTABORT
ELSE ; Otherwise display mytext.t01
"mytext.t01"-"", FILETEXT, TEXTABORT
ENDIF
The preceding example is displayed when the default language of the mobile phone is French.Mytext. t02When it is in GermanMytext. t03In other languagesMytext. t01
In addition, you need to define the language in PKG
;Language - standard language definitions
&EN,FR,GE
Delete the file generated at runtimeWhen you want to uninstall an sisfile, the uninstallation program will remove all files that have been copied to your mobile phone during installation. But what about the files generated during the runtime?
If you need to know the file name generated by the program during installation, you need to add 'null files' to the PKG file. The format of these files in PKG (language-independent) is as follows:
"" - "C/system/data/my_runtime_generated_file", FILENULL
Here my_runtime_generated_file is a file generated by the program. The FN (filenull) parameter indicates that this file does not exist and is not included in the sisfile. It is generated only when the program is running, and will be deleted when the program is uninstalled. Note that the source file is not important, as long as it is null (""). Note that this file will not be deleted when it is upgraded to the new version. This ensures that files with parameters such as ini will not be lost during the upgrade.
The filenull option is not supported in Symbian OS v9.x. It is recommended that the developer generate a file in the Data cage of the program, so that the file can be completely deleted during uninstallation.
If the number (or file name) of files generated by the program is unknown, this situation is complicated. There is a solution. Sis can contain an uninstallation program that can be used to find and delete related files. In this way, the program needs to run automatically when it is uninstalled:
"/epoc32/release/armi/urel/uninst.app" - "!:/system/apps/myapp/uninst.app", RR, RW
The RR (runremove) parameter sets the file to automatically run. RW (runwaitend) during uninstallation, indicating that the system will continue the uninstallation process after the program is completed.
Embedded sisfileYou can include another sisfile and set it according to the following code:
@”sis file name”,(UID)
For example, @ "prog1.sis" (0x12341234) indicates that prog1.sis is installed and Its uid is 0x12341234. Note that during uninstallation, the embedded sis will be deleted only when the system determines that no other program uses it (that is, no other installation components include the embedded sis in their PKG file)
Run the execution file during installation or uninstallationYou can addFilerun (FR)AndRuninstall (RI)Make it run during installation
For example:
"/Symbian/9.1/S60_3rd_MR/Epoc32/release/gcce/urel/myprogram.exe"-"!:/sys/bin/myprogram.exe",FR,RI
Myprogram.exe will be installed and executed during the installation process. Here, the runinstall keyword can be replaced by the following options:
•Runremove (RR)Specifies that the program runs only when it is uninstalled;
•Runboth (RB)Run this program during installation and uninstallation.
The preceding three options should be configured with the runwaitend (RW) keyword, indicating that the installer will wait until the program is executed. If this keyword is not specified, the installation will continue after the program is started.
- The filerun (FR) runinstall (RI) option cannot work with self-signed software.It requires a trusted signature (Open signed online or open signed offline during R & D stage and Symbian signed when
Released). Otherwise, the required capabilities of the program cannot be installed.
Required Program Options
You can specify a required program option, which indicates that the system must install it before continuing the following installation. Its format is as follows:
{UID}, Major_Version_#,Minor_Version_#,Build_#,{“Product Name”}
Indicates that the component name is mydll, uid is 0x10000123, and the minimum version is 1.0.0. This indicates that the system must install this version at least. The required program options can also be as follows:
(0x101F6F88), 0, 0, 0, {"Series60ProductID"}
The required component is series60productid, and the version number must be at least 0.0.0 or higher, which is required for installation.
From the third edition, the s60 platform logo will be displayed in square brackets as follows:
[0x101F7961], 0, 0, 0, {"S60ProductID"}
Language SupportThe program can have multiple language versions, but only one sis package is required. When you install the sisfile, you will be prompted to select the installation language. To add a language, add the language support line to your PKG file. It starts with & and contains one of the following languages:
- Am-US English
- As-Austrian German
- Au-w.alian English
- BF-Belgian French
- Bl-Belgian Flemish
- CS-Czech
- Da-Danish
- Du-Dutch
- En-UK English
- Fi-Finnish
- Fr-French
- Ge-German
- HK-Hong Kong Chinese
- Hu-Hungarian
- IC-Icelandic
- If-International French
- It-Italian
- Ja-Japan
- No-Norwegian
- NZ-New Zealand
- Pl-Polish
- Po-Portuguese
- Ro-Romanian
- Ru-Russian
- SF-Swiss French
- SG-Swiss German
- SK-Slovak
- SL-Slovenian
- SP-Spanish
- Sw-Swedish
- TC-Taiwan Chinese
- Th-Thai
- Tu-Turkish
- Zh-PRC Chinese
The following is an example:
&EN, FR, FI
It indicates that SIS contains English, French, and Finnish. If no language item exists, & en is the default.
Mobile phone supportWe may need to specify that the installer is only supported by some mobile phones. For example, if a program requires WiFi, it can only be installed on a mobile phone with WiFi. If you are on a non-WiFi phone, a warning is displayed, indicating that the program is not compatible.
The following code demonstrates that the program can only be installed on Nokia N80, n93, n93, and N95 mobile phones.
[0x200005F9], 0, 0, 0, {"Nokia N80 ID"}
[0x20000600], 0, 0, 0, {"Nokia N93 ID"}
[0x20000605], 0, 0, 0, {"Nokia N93i ID"}
[0x2000060B], 0, 0, 0, {"Nokia N95 ID"}
For the mobile phone model identification, refer to s60 platform and device identification codes.
Files required to install a specific mobile phoneSome of our installation files may depend on users' mobile phones. For example, a game developer may need to generate a specified DLL to support 3D acceleration. For mobile phones without 3D acceleration,
Only standard dll can be installed. The sample code is as follows:
IF (MachineUID=0x20000600) OR (MachineUID=0x2000060B)
; If the device is Nokia N93 or N95, then install files in this block.
"/epoc32/release/armv5/urel/mydll_3d" -"!:/sys/bin/mydll.dll"
ELSE
; Otherwise install any files in this block.
"/epoc32/release/armv5/urel/mydll" -"!:/sys/bin/mydll.dll"
ENDIF
The mobile phone identification code can be found here: s60 platform and device identification codes.
Install files on the specified PlatformSome of our installation files may depend on the operating system of the mobile phone. For example, fp2, the third edition, removes some Bluetooth connection libraries. This is different, so we also need to treat them differently during installation, you can find the mobile platform in the Z:/system/Install Folder:
if exists("z:/system/install/Series60v3.2.sis")
"/Epoc32/release/gcce/UREL/Common_0x123123123_fp2.dll"-"C:/sys/bin/common_0x123123123.dll"
else
"/Epoc32/release/gcce/UREL/Common_0x123123123.dll"-"C:/sys/bin/common_0x123123123.dll"
endif
Installation conditions
The following functions can also be used in PKG:
- Package ()Used to test whether an installation package exists;
- Exists ()Used to test whether a specified file exists.
- Appprop ()Obtain the relevant attributes in the registry.
- Devprop ()The function is used to query the mobile phone capability value. Note that the name attribute is not directly provided.
Package (): If it is specified that the uidhas been installed, the truewill be returned, and the negative will be returned to false, the following code will be installed. If the uidis 0x11223344, the foo.txt file will be installed.
IF package(0x11223344)
"foo.txt"-"c:/foo.txt"
ENDIF
Exists (): If test.txt exists, true is returned, and the new
if exists("c:/test.txt")
"text/exists.txt"-"!:/private/0x01234567/exists.txt"
Appprop (): The first parameter of this function is package UID. The second parameter is the obtained propid (property ID). The following code tests the capabilities of other packages.
;Dependencies
(0x10000003), 1, 2, 3, {"Depend-EN"}
if (appprop(0x10000003,0) = 1)
"text/appprop1.txt"-"!:/Documents/appprop1.txt"
elseif (appprop(0x10000003,0) = 2)
"text/appprop2.txt"-"!:/Documents/appprop2.txt"
endif
Devprop (): The Mobile Phone supports the capability function, which provides the ability to directly access the Hal API, namely the HAL: Get () function. This function can be used as a condition to ask about the mobile phone's ability. Note that this capability is not a name attribute.
+(0=1,1=2,3=-1)
if DevProp(1)
"text/appprop1.txt"-"", FT, TC
endif
http://wiki.forum.nokia.com/index.php/PKG%E9%AB%98%E7%BA%A7%E9%80%89%E9%A1%B9