How to determine the target system in the PKG File

Source: Internet
Author: User

Based on the experiences of many netizens, s60 3rd MR/FP1/fp2 and s60 5th have some feature files in the system, indicating the actual version of the system. In some application scenarios, the system version of the target machine is very important, so that different DLL or EXE can be deployed for different systems to adapt to more models.

Currently, the most common method is to judge the series60 file, which is described as follows:

 

Z:/system/install/series60v3.0. Sis: s60 3rd Mr

Z:/system/install/series60v3.1. Sis: s60 3rd FP1

Z:/system/install/series60v3.2. Sis: s60 3rd fp2

Z:/system/install/series60v5.0. Sis: s60 5th

 

You can check the existence of these files in the PKG file to install the corresponding DLL or EXE, for example:

 

If (exists ("Z:/system/install/series60v3.2. Sis "))
"Sys/bin/AA. dll "-"! :/Sys/bin/AA. dll"
Elseif (exists ("Z:/system/install/series60v3.1. Sis "))
"Sys/bin/AA (0-7). dll "-"! :/Sys/bin/AA. dll"
Else
"Sys/bin/AA (0-8). dll "-"! :/Sys/bin/AA. dll"
Endif

 

This section describes how to install Aa if fp2. dll library. If FP1 is used, install AA (0-7 ). dll library, Mr is installed AA (0-8 ). dll library, and so on.

 

In the program, you can use the following functions to determine the system version:

 

Void cappinfo: determinsystemver (){

Isystemver = 30;
Rfs fs;
If (kerrnone! = FS. Connect () {return ;}
Tfindfile finder (FS );
If (kerrnone = finder. findbydir (_ L ("series60v5.0. Sis"), _ L ("Z: // system // install //"))){
Isystemver = 50;
} Else if (kerrnone = finder. findbydir (_ L ("series60v3.2. Sis"), _ L ("Z: // system // install //"))){
Isystemver = 32;
} Else if (kerrnone = finder. findbydir (_ L ("series60v3.1. Sis"), _ L ("Z: // system // install //"))){
Isystemver = 31;
}
FS. Close ();
}

 

The rest is free for everyone!

 

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.