Symbian
Symbian OS Library

FAQ-1114 Can I have a single SIS file that would install the correct version of my application depending on the device being used ?

[Index][spacer] [Previous] [Next]



 

Classification: General Category: Installation
Created: 08/19/2004 Modified: 04/29/2005
Number: FAQ-1114
Platform: Symbian OS v6.1, Symbian OS v7.0, Symbian OS v7.0s, Symbian OS v8.0, Symbian OS v8.0a, Symbian OS v8.1a, Not Applicable

Question:
I would like to run my application on different devices but install the application using a single SIS file for all the devices.

Answer:
The makesis command allows conditional compilation within a pkg file. You can use the IF/ELSE/ENDIF directive in your pkg file to install the correct version of your software depending on what device you are installing on. For the conditional directive to work, makesis requires all the referenced files (relating to different SDKs) to be available when running makesis. When you install the SIS file the installer on the device installs only the file(s) appropriate for that device and ignores files destined for other device types. There are two ways to achieve this:

    Method One
    The first approach references the files related to all the target SDKs directly. This requires all files for different SDKs to be present locally or in a particular directory before invoking makesis.
      ;Languages
      &EN

      #{"Single SIS"},(0x101F6F77),0,0,1,TYPE=SISAPP

      ;Series 60 v0.9 and 2.0 platforms
      (0x101F6F88), 0, 0, 0, {"Series60ProductID"}
      (0x101f7960), 0, 0, 0, {"Series60ProductID"}

      IF DeviceFamilyRev<0x700
        "myapp60.rsc"-"c:\System\apps\myapp\myapp.rsc"
        "myapp60.app"-"c:\System\apps\myapp\myapp.app"
        "myapp60.txt"-"c:\System\apps\myapp\myapp.txt"ELSE
          "myapp70.rsc"-"c:\System\apps\myapp\myapp.rsc"
          "myapp70.app"-"c:\System\apps\myapp\myapp.app"
          "myapp60.txt"-"c:\System\apps\myapp\myapp.txt"ENDIF
          Method Two
          The above method is inherently inefficient as it requires the availability of all the files. During development this would require manual copy of several files from all relevant SDKs. This could prove cumbersome and confusing when testing and debugging your application. You would have to also ensure that if a certain file has the same name for different SDKs it is saved into different directories. The pkg file would then have to reflect these different directories for each SDK.

          A better and more scalable solution is to compile your project for each SDK as usual and have a pkg file for each SDK type. Run makesis on each of the pkg file separately and then instead of referencing the individual files you point to different SIS files in your single pkg file. Though this method requires copying of SIS files it is more efficient and less error prone then copying and referencing several binaries and text files from different SDKs.

          Same lines as above...
            IF DeviceFamilyRev<0x700
            @"myapp60.SIS",(0x101F6F88)
            ELSE
            @"myapp70.SIS",(0x101F6F88)
            ENDIF
            Note:
            The above pkg examples explicitly define multi platform dependencies. It is advisable to do this to avoid the singular SIS file getting installed inadvertently on an untargeted platform.
            More information about Product IDs is available in FAQ-1045.