How to check the s60 platform version during installation or running

Source: Internet
Author: User

Problem description:

All s60ProgramThe SIS installation package has a series60productid that represents the mandatory dependency.

This dependency indicates the minimum s60 platform version required to run the program, to prevent installation on the old version.

Series60productid can only be used for check during installation, and can only interrupt installation or prompt incompatibility information. We sometimes need a separate SIS package, but we can select an installation file based on different s60 platforms. The solution below describes how to handle such a situation in a PKG file. It also provides an exampleCodeDemonstrate how to determine the platform version during running:

Solution:

The Platform version judgment part of the PKG file. Even if the IF module does not have any available attributes to judge the s60 platform version, we can also process the specific file in the Rom.

Each series60productid component is stored in the Z: systeminstall directory as a separate sisfile and arranged in the following naming method:

Z: systeminstallseries60v3.0. Sis | s60 3rd edition

Z: systeminstallseries60v2.8. Sis | s60 2nd edition, Feature Pack 3

Z: systeminstallseries60v2.6. Sis | s60 2nd edition, Feature Pack 2

Z: systeminstallseries60v2.1. Sis | s60 2nd edition, Feature Pack 1

Z: systeminstallseries60v2.0. Sis | s60 2nd Edition

Z: systeminstallseries60v1.2. Sis | s60 1st edition (1.2)

Z: systeminstallseries60v1.1. Sis | (N/)

Z: systeminstallseries60v1.0. Sis | (N/)

Z: systeminstallseries60v0.9. Sis | s60 v0.9

Each mobile phone has an associated file related to the current platform version, and all supported Old Version files also exist. For example, Nokia N70 (2nd edition, fp3) contains files other than series60v3.0. Sis, while Nokia E70 (3rd edition) only contains series60v3.0. Sis.

The following file names can be used in the PKG file:

# {"Myapplication"}, (0x10000001), 0

; Lowest supported s60 platform version is 2nd Edition

(0x101f7960), 0, 0, 0, {"series60productid "}

; Install common files for all supported platforms

;...

If exists ("Z: systeminstallseries60v2.8. Sis ")

; Install 2nd ed, FP3-specific files

Elseif exists ("Z: systeminstallseries60v2.6. Sis ")

; Install 2nd ed, FP2-specific files

Elseif exists ("Z: systeminstallseries60v2.1. Sis ")

; Install 2nd ed, FP1-specific files

Else

; 2nd edition-specific files

Endif

Check the platform version at runtime

The following methods can be used to check the s60 platform version at run time. When a result is returned, the version number is obtained. Note: When the primary version number indicates s60, the secondary version number indicates the Feature Pack Version (for example, 2.6 = 2nd edition, fp2)

# Include // link against efsrv. Lib

_ Partition (ks60productidfile, "series60v *. Sis ");

_ Partition (krominstalldir, "Z:/system/install /");

Void gets60platformversionl (RFS & AFS, tuint & Amajor, tuint & aminor)

{

Tfindfile ff (AFS );

Cdir * result;

User: leaveiferror (FF. findwildbydir (ks60productidfile, krominstalldir, result ));

Cleanupstack: pushl (result );

User: leaveiferror (result-> sort (esortbyname | edescending ));

Amajor = (* result) [0]. INAME [9]-'0 ';

Aminor = (* result) [0]. INAME [11]-'0 ';

Cleanupstack: popanddestroy (); // result

}

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.