Some advanced options for PKG files .... ZZ from wiki.forum.nokia.com

Source: Internet
Author: User
Text notice

During installation, you can specify a file to be displayed to the user. The file itself will not be copied to the target device, which is used to display basic self-report information or protocol. To do this, add the following downstream to the PKG file:

"license.txt" - " ", FILETEXT, TEXTCONTINUE

FiletextIndicates that the file is displayed during installation.TextcontinueWill provide a button to close the text file and then continue the installation. ReplaceTextcontinue, You can specify it as one of the following:

TextskipDisplay a yes/no option. If yes, the installation continues. If no, skip the next section and the installation continues normally.

TextexitDisplay a yes/no option. If yes, the installation continues. If you select no, the installation is stopped and any installed files are deleted.

TextabortDisplay a yes/no option. If you select no, the installation is stopped and no installed files are deleted. Remove the file generated during running.

Multilingual text notice

The language of the text notice can be customized depending on the default language of the device. For example:

If (Language = 2); if the language is French, mytext is displayed. t02 "mytext. t02 "-" ", filetext, textabortelseif (Language = 3); if the language is German, mytext is displayed. t03 "mytext. t03 "-" ", filetext, textabortelse; otherwise, mytext is displayed. t01 "mytext. t01 "-" ", filetext, textabortendif

The preceding example is displayed when the default language on the device is French.Mytext. t02; GermanMytext. t03; In any other languageMytext. t01.

By the way, you must also define the language in PKG:

;Language - standard language definitions&EN,GE,FR

Remove the file generated at runtime

When the program is uninstalled through the sisfile of the program, the uninstallation program will remove all files copied to the phone by the installation program according to the file instructions in the PKG file. But what about the file generated at runtime?

If the file names created by the application are known during installation, they must be added to the. PKG file as 'null files. The file name in the. PKG file (Language-neutral file) format is as follows:

"" - "C/system/data/my_runtime_generated_file", FILENULL

Here my_runtime_generated_file is a data file created by the application. The FN (filenull) parameter indicates that the file does not exist, so it is not included in the sisfile. It is created by the running application and will be deleted when the application is removed. Note: The specified source file name is unimportant and should be blank (""). Note: These will not be deleted when you upgrade to a later version. This ensures that files such as. ini Store application preferences and are not lost during the upgrade.

The filenull option is not supported in Symbian OS v9.x. It is recommended that developers create files in the Data cage of their applications. The files here will be automatically (and completely) deleted during uninstallation.

If the number of files (or their exact names) created by the application is unknown, the situation is a little complicated. As a solution, the. Sis package can contain a special uninstallation program, which is responsible for finding and removing the appropriate files during uninstallation. Such a program can be automatically run upon uninstallation, as shown below:

"/epoc32/release/armi/urel/uninst.app"  - "!:/system/apps/myapp/uninst.app", RR, RW

The RR (runremove) parameter is used to remove (detach) the file to run. RW (runwaitend) indicates that the (system) removal tool should start the program and wait until the installation is complete.

Embed an sisfile

The following code can contain another sisfile in your sisfile:

@”sis file name”,(UID)

For example, @ "prog1.sis", (0x12341234) prog1.sis, with UID 0x12341234, is installed in this line. Note: During uninstallation, this embedded sis will be used until the system determines that no other currently installed part is used (that is, no other installed part is included in its PKG file) will be uninstalled.

Run executable files during installation or uninstallation

You can specify the executable file to run by addingFilerun (FR)AndRuninstall (RI)Keyword.

For example:

"/Symbian/6.1/Series60/Epoc32/release/armi/urel/myprogram.exe"-"!:system/programs/myprogram.exe",FR,RI

Myprogram.exe will be installed and executed during installation. The runinstall keyword can be replaced by any of the following:

Runremove (RR)So that it is executed only during the uninstallation.

Runremove (RR)So that the executable files are executed during installation and uninstallation.

Any of the three options can be further used with the keyword runwaitend (RW). runwaitend (RW) allows the installation to continue until the execution is complete. If not specified, the installation will continue immediately after the executable file is started.

Dependent line (requisite lines)

You can use the dependency line to indicate that the current installation must be installed for a specific part to continue. Use the following format:

{UID}, Major_Version_#,Minor_Version_#,Build_#,{“Product Name”}

This means that a part with the specified UID and product name and not earlier than the specified version number must be installed before it can continue.

For example:

{0x10000123},1,0,0,{"MyDll"}

It indicates that a part named mydll has uid 0x0000123 and a version number of at least 1.0.0, which must exist before the installation can continue. Dependent rows should look familiar-because this is also the implementation method of the Target Platform line. Example of the Target Platform line:

(0x101F6F88), 0, 0, 0, {"Series60ProductID"}

It is a necessary Declaration: the part named series60productid. Its uid is 0x101f6f88, the version number is 0.0.0 or higher, and must exist before it can continue.

From the third version of s60, The s60 product ID must be written in square brackets. Example:

[0x101F7961], 0, 0, 0, {"S60ProductID"}

Language Support

Multiple translation versions of the application can be stored in a single sisfile. When you install the sisfile, they are prompted to select the language to install. To specify multiple languages that you want to include, add the Language Line at the top of the PKG file. The Language Line starts with '&' and contains a list of comma-separated language codes from the following list (incomplete:

  • 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

Example of a language line:

&EN, FR, FI

It indicates that this sisfile contains a selection of English, French, and Finnish languages. If no language line exists, it is considered as & en.

Restrict supported devices

It is possible to restrict package files to some devices only. For example, WiFi applications can only be installed on WiFi devices. If the package file is installed on a non-WiFi device, the installer displays a warning message: this application is not compatible.

The following example demonstrates an example of a package file that can only be installed on Nokia N80, n93, n93, and N95:

[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"}

The device ID list can be found inS60 platform and device identification codes.

Install Device Files

It is possible to install files that depend on your device. For example, game developers can create a special DLL for devices that support 3D accelerators. For devices without 3D accelerators, standard dll should be installed in the package. This can be completed using the following code:

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 device ID list can be found inS60 platform and device identification codes.

Installation Platform files

It is possible to install files that depend on the operating system. For example, 3rd fp2 removes some Bluetooth libraries, so different files must be installed. You can obtain the phone platform by checking the files 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.