|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE reference |
|
11 PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd"> |
|
12 <reference id="GUID-FF82B80D-18CA-5333-83EB-3AB94F696016" xml:lang="en"><title>Options-List</title><prolog><metadata><keywords/></metadata></prolog><refbody> |
|
13 <section><p>Options-List can be specified within a PKG file to display a list |
|
14 of options to the Symbian device user during installation. The options that |
|
15 are selected, control the installation of optional components. </p> </section> |
|
16 <section><title>Syntax</title><codeblock id="GUID-8E47AFB4-B035-599F-8B9F-1B7729228BA4" xml:space="preserve">!({"Option string language 1",...},...) |
|
17 </codeblock> <p>For example, </p> <codeblock id="GUID-4DFE5803-1442-51E8-BC6B-B7CE84586B03" xml:space="preserve"> |
|
18 |
|
19 !({"Add-on 1 (20KB)"},{"Add-on 2 (75KB)"}, |
|
20 {"Add-on 3 (80KB)"},{"Add-on 4 (20KB)"}) |
|
21 </codeblock> <p>Each string corresponds to a PKG file variable called <codeph>option1</codeph>, <codeph>option2</codeph> and |
|
22 so on. The following are the values of these options: </p> <ul> |
|
23 <li id="GUID-36EAB6F5-6019-56B0-B63A-3D31FF2EADF1"><p>Value <codeph>0</codeph> signifies |
|
24 that the option is not selected. </p> </li> |
|
25 <li id="GUID-8364E286-AF83-5528-8DFC-553C7B4AC18E"><p>Value <codeph>1</codeph> signifies |
|
26 that the option is selected. </p> </li> |
|
27 </ul> <p>The selection affects the values of option attributes (<codeph>option1, |
|
28 option2, option3, ...</codeph>). In the preceding example, if option1 (<codeph>Add-on |
|
29 1 (20KB)</codeph>) is selected, then the value of the <codeph>option1</codeph> attribute |
|
30 changes from <codeph>0</codeph> to <codeph>1</codeph>. </p> <p>You can test |
|
31 these values by specifying the optional components within conditional blocks |
|
32 as shown in the following example: </p> <codeblock id="GUID-75DAA0F6-48CE-5274-9762-4481CDB26FFA" xml:space="preserve">If option1 = 1 |
|
33 ; install optional file 1 to the private directory |
|
34 "sample.txt"-"!:\private\E800005A\sample.txt"; |
|
35 endif |
|
36 |
|
37 If option2 = 1 |
|
38 ; install optional file 2 to the private directory |
|
39 "sample2.txt"-"!:\private\E800005A\sample2.txt"; |
|
40 endif</codeblock> </section> |
|
41 <section><p> <b>Note:</b> The<codeph> option<n></codeph> attributes behave |
|
42 as global variables. </p> </section> |
|
43 <example id="GUID-4A2F5CA7-6571-5B53-86B7-FB77F3AB6CDA-GENID-1-7-1-4-1-1-5-1-6-1-6-1-8-1-3-1-8-1-5-1-2-4"><title>Examples</title> <ul> |
|
44 <li id="GUID-D326F784-0D83-59DC-B30B-9AFDB0B009B2"><p>The following example |
|
45 package file illustrates the usage of a basic options list. </p> <codeblock id="GUID-BDBD6AD9-C795-5448-87D5-B9B4E6CE9011" xml:space="preserve">;Languages |
|
46 &EN |
|
47 |
|
48 %{"Nokia Corporation"} |
|
49 |
|
50 :"Nokia Corporation" |
|
51 |
|
52 ;Header |
|
53 #{"Options"}, (0x81111107), 1, 2, 3,TYPE=SA |
|
54 |
|
55 ;Display 3 options to the user |
|
56 !({"Install document (1KB)"},{"Install document2 (1KB)"},{"Install document3 (1KB)"}) |
|
57 |
|
58 if option1 = 1 |
|
59 "files\option1.txt"-"!:\private\81111108\option1.txt"; |
|
60 endif |
|
61 |
|
62 if option2 = 1 |
|
63 "files\option2.txt"-"!:\private\81111108\option2.txt"; |
|
64 endif |
|
65 |
|
66 if option3 = 1 |
|
67 "files\option3.txt"-"!:\private\81111108\option3.txt"; |
|
68 endif</codeblock> </li> |
|
69 <li id="GUID-ABF7F8B9-2788-505D-B276-CF75368CD497"><p>The following example |
|
70 package file demonstrates an option list that supports multiple languages. </p> <codeblock id="GUID-08E54984-A832-533B-AB6E-7107874F19E0" xml:space="preserve">;Languages |
|
71 &EN,FR |
|
72 |
|
73 ;Header |
|
74 #{"MultiLanguageOption-EN", "MultiLanguageOption-FR"}, (0x81111107), 1, 2, 3 |
|
75 |
|
76 %{"Vendor","Vendeur"} |
|
77 :"Vendor" |
|
78 |
|
79 !({"ENOption1", "FROption1"},{"ENOption2","FROption2"},{"ENOption3","FROption3"}) |
|
80 |
|
81 if option1 = 1 |
|
82 {"text\englishfile1.txt" "text\frenchfile1.txt"}-"!:\private\81111108\import\file1.txt"; |
|
83 endif |
|
84 |
|
85 if option2 = 1 |
|
86 {"text\englishfile2.txt" "text\frenchfile2.txt"}-"!:\private\81111108\import\file2.txt"; |
|
87 endif |
|
88 |
|
89 if option3 = 1 |
|
90 {"text\englishfile3.txt" "text\frenchfile3.txt"}-"!:\private\81111108\import\file3.txt"; |
|
91 endif |
|
92 </codeblock> </li> |
|
93 </ul> </example> |
|
94 </refbody></reference> |