Options-List

Options-List can be specified within a PKG file to display a list of options to the Symbian device user during installation. The options that are selected, control the installation of optional components.

Syntax

!({"Option string language 1",...},...)

For example,



!({"Add-on 1 (20KB)"},{"Add-on 2 (75KB)"},
  {"Add-on 3 (80KB)"},{"Add-on 4 (20KB)"}) 

Each string corresponds to a PKG file variable called option1, option2 and so on. The following are the values of these options:

  • Value 0 signifies that the option is not selected.

  • Value 1 signifies that the option is selected.

The selection affects the values of option attributes (option1, option2, option3, ...). In the preceding example, if option1 (Add-on 1 (20KB)) is selected, then the value of the option1 attribute changes from 0 to 1.

You can test these values by specifying the optional components within conditional blocks as shown in the following example:

If option1 = 1
; install optional file 1 to the private directory
    "sample.txt"-"!:\private\E800005A\sample.txt";
endif

If option2 = 1
; install optional file 2 to the private directory
    "sample2.txt"-"!:\private\E800005A\sample2.txt";
endif

Note: The option<n> attributes behave as global variables.

Examples

  • The following example package file illustrates the usage of a basic options list.

    ;Languages
    &EN
    
    %{"Nokia Corporation"}
    
    :"Nokia Corporation"
    
    ;Header
    #{"Options"}, (0x81111107), 1, 2, 3,TYPE=SA
    
    ;Display 3 options to the user
    !({"Install document (1KB)"},{"Install document2 (1KB)"},{"Install document3 (1KB)"})
    
    if option1 = 1
        "files\option1.txt"-"!:\private\81111108\option1.txt";
    endif
    
    if option2 = 1
        "files\option2.txt"-"!:\private\81111108\option2.txt";
    endif
    
    if option3 = 1
        "files\option3.txt"-"!:\private\81111108\option3.txt";
    endif
  • The following example package file demonstrates an option list that supports multiple languages.

    ;Languages
    &EN,FR
    
    ;Header
    #{"MultiLanguageOption-EN", "MultiLanguageOption-FR"}, (0x81111107), 1, 2, 3
    
    %{"Vendor","Vendeur"}
    :"Vendor"
    
    !({"ENOption1", "FROption1"},{"ENOption2","FROption2"},{"ENOption3","FROption3"})
    
    if option1 = 1
        {"text\englishfile1.txt" "text\frenchfile1.txt"}-"!:\private\81111108\import\file1.txt";
    endif
    
    if option2 = 1
        {"text\englishfile2.txt" "text\frenchfile2.txt"}-"!:\private\81111108\import\file2.txt";
    endif
    
    if option3 = 1
        {"text\englishfile3.txt" "text\frenchfile3.txt"}-"!:\private\81111108\import\file3.txt";
    endif