Classification: |
General |
Category: |
Installation |
Created: |
11/04/2005 |
Modified: |
12/05/2005 |
Number: |
FAQ-1330 |
Platform: |
Symbian OS v7.0, Symbian OS v7.0s, Symbian OS v8.0, Symbian OS v8.0a, Symbian OS v8.0b, Symbian OS v8.1a, Symbian OS v8.1b,
Symbian OS v9, Symbian OS v9.0 |
|
Question: What is the difference between Product ID/Platform ID and Machine ID? How does the Product ID and Platform ID dependency mechanism work? What Platform and Product ID should I use? What are the Machine ID and other attributes?
Answer: What is the difference between Product ID/Platform ID and Machine ID? Platform and product IDs are used by the installer to determine whether or not an installable package is compatible (will work) with a device/platform. They are declared in the "dependencies" section of the PKG file declaration: » Symbian OS Tools And Utilities » Installation reference » Package file format » dependencyThe machine ID is part of a separate mechanism that may be used to allow conditional installation of different components
on different devices (e.g. in order to overcome device incompatibility etc.). The ID may be used in a condition block within
the PKG file package body (or within executable code): » Symbian OS Tools And Utilities » Installation reference » Package file format » package-body.
Note that the Machine ID and Product ID may or may not have the same numerical value on a particular device. The machine ID
is guaranteed to be unique to the device, while the product ID may (contrary to its name) may be common to several devices
or even absent. The mechanisms are described in greater detail in the following sections.
How does the Product ID and Platform ID dependency mechanism work? The device contains SIS file stubs corresponding to its compatible platforms/product IDs (see z:\system\install\). When a
SIS file is run, the installer compares all the product IDs from the PKG file with every SIS file stub. If any product/platform
dependency listed in the .pkg file is present on the device then the application is compatible. If the application is not
compatible (no matching stub) the result is passed to the UI; on Series 60 the user is warned and given the opportunity to
continue installation.
UIQ phones based on Symbian OS v7.0 have a slightly different behaviour. Symbian OS v7.0 requires that only a single product
ID is declared in the PKG file; if you put more than one dependency then the installation will fail. As a result a SIS file
that declares compatibility with both UIQ2 and Nokia series60 binaries will install on series60 based phones, but not on UIQ2
based phones (see FAQ1232 "Can a single SIS file containing both S60 and UIQ versions of an application be Symbian Signed?" ). This will not be a limitation on Symbian OS v9 based UIQ phones.
The manufacturer that creates the phone make the decision about what product ID stubs will be present. Great efforts are made
to maintain compatibility for existing functionality, so the phone will usually have Product IDs for all compatible previous
platforms, the current platform, and the current device.
Notes:
- Pre-Symbian OS v9 the installer discriminates Product ID dependencies from component dependencies based on the string name
ending in text "ProductID", e.g:
(0x101F61CE), 0, 0, 0, {"SonyEricssonP9xxPlatformProductID"}
- Product and Platform IDs are the same thing - the only difference semantic; platform IDs will be present on all devices in
a platform, and on future compatible devices, while product IDs tend to be (at manufacturer descretion) on the current platform.
What Platform and Product ID should I use? You should specify the product ID of the earliest platform that includes all the functionality that you have used. From Symbian
OS v7.0s you can specify multiple product/platform IDs, however only one (the earliest) is necessary, as the manufacturer
adds all the legacy stubs for compatible platforms in a series onto future phones. If it is important (for some reason) that the application runs only on a subset of phones, then these should be specified
by specific product ID rather than platform ID.
The list of product and platform IDs is given in FAQ-1045.
There is other useful/related information in:
What are the Machine ID and other attributes? The Machine ID is one of the attributes defined HalData::TAttribute. It supplies a device specific UID that can be used in
the PKG file to conditionally install components based on the phone ID: » Developer Library » API Reference » C++ API reference » Hardware Abstraction Layer (HAL) » HALData.
There are many other attributes, including the manufacturer, device family, software revision etc. These can also be used
to conditionally install code, or to conditionally execute code. See FAQ-1122: How can my app selectively install or execute different code depending which phone it is running on?
The values for some of the common attributes are documented in FAQ1329 "What are the values of the HAL::TAttributes (including Machine ID)?". This is more extensive than the list provided in FAQ-1122.
Also see:
|