101 |
101 |
102 |
102 |
103 Examples |
103 Examples |
104 ''''''''' |
104 ''''''''' |
105 |
105 |
|
106 Defining layer |
|
107 ''''''''' |
|
108 .. code-block:: xml |
|
109 |
|
110 <?xml version="1.0" encoding="UTF-8"?> |
|
111 <convertprojectml xmlns="http://www.s60.com/xml/convertprojectml/1"> |
|
112 <targetProject path=""/> |
|
113 <layer path="assets/s60"> |
|
114 <folder path="implml"> |
|
115 <filter action="add" data="assets/s60/confml/*.crml"/> |
|
116 <filter action="add" data="assets/s60/confml/*.gcfml"/> |
|
117 </folder> |
|
118 <file type="layer_root" path="root.confml"> |
|
119 <filter action="include_file" data="confml/*.confml"/> |
|
120 </file> |
|
121 <file type="configuration_root" path="s60_root.confml"> |
|
122 <filter action="include_layer" data="assets/s60/root.confml"/> |
|
123 </file> |
|
124 </layer> |
|
125 </convertprojectml> |
|
126 |
|
127 Normally targetProject's **path** attribute is defined as empty. It means that the project is generated to ConE's normal output location which can be given as command line parameter (-o). |
|
128 |
|
129 Convert project ML is constructed so that the highest data structure is **layer**. Layer has attribute **path**, which defines relative location to output path. Layer can contain one or more |
|
130 **folders** and/or **files**. |
|
131 |
|
132 Folder defines folder entry inside the layer and in file system level is a directory. Folder has **path** attribute which is relative to layer's path. Folder can contain **filters** which define |
|
133 how folder's content is constructed. With action **add** data is copied to the folder from location which is defined in **data** attribute. |
|
134 **Note** that the path in data attribute is relative to configuration project's root (normally \epoc32\rom\config). Example here copies all crml and gcfml files from confml folder to impml folder. |
|
135 |
|
136 Layer can also define files. Each file has **type** which can be layer_root or configuration_root. The former one is creating layer root file to the path defined in **path** attribute, location is |
|
137 relative to layers location. Action **include_file** defines a search pattern. In the example all files from layer's confml folder with extension confml are included in the layer's root file. This can |
|
138 be used to generate layer root files automatically in the build even when the exact content in filename level is not known. Configuration root files are always generated to the root of the |
|
139 configuration project. Filter action **include_layer** defines configuration layer root files which are included to the configuration root. |
|
140 |
|
141 |
|
142 Defining metadata and configuration name |
|
143 ''''''''' |
|
144 .. code-block:: xml |
|
145 |
|
146 <?xml version="1.0" encoding="UTF-8"?> |
|
147 <convertprojectml xmlns="http://www.s60.com/xml/convertprojectml/1"> |
|
148 <targetProject path=""/> |
|
149 <layer path="assets/s60"> |
|
150 <file type="configuration_root" path="s60_root.confml" configuration_name="My S60 Config"> |
|
151 <meta xmlns:cv="http://www.nokia.com/xml/cpf-id/1"> |
|
152 <version>001</version> |
|
153 <cv:configuration-property name="sw_version" value="${convertproject.versioninfo}" /> |
|
154 </meta> |
|
155 </file> |
|
156 </layer> |
|
157 </convertprojectml> |
|
158 |
|
159 File element's **configuration_name** attribute can be used to override ConE's default configuration name. Value is written to ConfML file's configuration element to name attribute. **Meta** |
|
160 structure defines ConfML metadata which is added to configuration root file. It supports normal ConfML metadata like in this example **version** and cv namespace metadata like **sw_version**. |
|
161 Value of sw_version is fetched from ConfML setting **convertproject.versioninfo** at run time. Configuration_name and metadata are available to both layer and configuration root files. |
|
162 |
|
163 Creating loops |
|
164 ''''''''' |
|
165 .. code-block:: xml |
|
166 |
|
167 <?xml version="1.0" encoding="UTF-8"?> |
|
168 <convertprojectml xmlns="http://www.s60.com/xml/convertprojectml/1"> |
|
169 <targetProject path=""/> |
|
170 <foreach variable="{TEMPLATE}" data="/epoc32/rom/config/language_packs"> |
|
171 <layer path = language_packs/{TEMPLATE}"> |
|
172 <file type="layer_root" path="root.confml"> |
|
173 <filter action="include_file" data="confml/*.confml" remove_includes="true"/> |
|
174 </file> |
|
175 <file type="configuration_root" path="langpack_{TEMPLATE}_root.confml" configuration_name=" {TEMPLATE}"> |
|
176 <filter action="include_layer" data="assets/s60/root.confml"/> |
|
177 <filter action="include_layer" data="assets/symbianos/root.confml"/> |
|
178 <filter action="include_layer" data="language_packs/{TEMPLATE}/root.confml"/> |
|
179 </file> |
|
180 </layer> |
|
181 </foreach> |
|
182 </convertprojectml> |
|
183 |
|
184 Loops can be defined in convert project ml using **foreach** structures. Attribute **data** defines path where from all the folder names are scanned. Value of attribute **variable** is the |
|
185 name of the folder e.g. if /epoc32/rom/config/language_packs contains folders *lp1*,* lp2* and *lp3* then variable has value lp1 in the first round, lp2 in the second round and lp3 in the third round. |
|
186 Meaning that in the first round layer path will be language_packs/lp1 and configuration root file name is langpack_lp1_root.confml, which includes language_packs/lp1/root.confml as the last layer root. |
|
187 |
|
188 Extending configuration root information |
|
189 ''''''''' |
|
190 .. code-block:: xml |
|
191 |
|
192 <?xml version="1.0" encoding="UTF-8"?> |
|
193 <convertprojectml xmlns="http://www.s60.com/xml/convertprojectml/1"> |
|
194 <targetProject path=""/> |
|
195 <foreach variable="{TEMPLATE}" data="/epoc32/rom/config/language_packs"> |
|
196 <layer path = language_packs/{TEMPLATE}"> |
|
197 <file type="layer_root" path="root.confml"> |
|
198 <filter action="include_file" data="confml/*.confml" remove_includes="true"/> |
|
199 </file> |
|
200 <file type="configuration_root" path="langpack_{TEMPLATE}_root.confml" configuration_name=" {TEMPLATE}"> |
|
201 <filter action="include_layer" data="assets/s60/root.confml"/> |
|
202 <filter action="include_layer" data="assets/symbianos/root.confml"/> |
|
203 <filter action="include_layer" data="language_packs/{TEMPLATE}/root.confml"/> |
|
204 </file> |
|
205 </layer> |
|
206 <layer path=""> |
|
207 <file type="configuration_root" path="langpack_lp1_root.confml"> |
|
208 <meta xmlns:cv="http://www.nokia.com/xml/cpf-id/1"> |
|
209 <cv:configuration-property name="based_on_ctr" value="abc123" /> |
|
210 </meta> |
|
211 </file> |
|
212 </layer> |
|
213 </convertprojectml> |
|
214 |
|
215 The first part is exactly same as above. What has been added is a new layer which includes only one file generated in the example above. Example here adds extra metadata *'based_on_ctr** to |
|
216 the configuration root langpack_lp1_root.confml. Note that convert project ml works so that if there is no existing file then that is created in case file exists then it is updated. |
|
217 |
|
218 |
106 XSD |
219 XSD |
107 ''' |
220 ''' |
108 |
221 |
109 Download: :download:`projectml.xsd </xsd/projectml.xsd>` |
222 Download: :download:`projectml.xsd </xsd/projectml.xsd>` |
110 |
223 |