|
1 # |
|
2 # Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the License "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: This script generate various SIS package files depeding on the |
|
15 # depending on the variant selection. for example variant 01 will create |
|
16 # a package support English, French, Germany and Portuguese. |
|
17 # |
|
18 use Getopt::Long; |
|
19 use File::Copy; |
|
20 use File::Basename; |
|
21 use strict; |
|
22 use warnings; |
|
23 use Cwd; |
|
24 use FindBin qw($Bin); |
|
25 use Data::Dumper; |
|
26 use fcntl; |
|
27 |
|
28 my $usage = q{ |
|
29 Description: This script generate browser SISx package file automatically. |
|
30 This script usually is called by buildIADsis.pl. However it can be used separately as well. |
|
31 |
|
32 Example: create_package.pl -v 01 -p armv5 -r urel -bmajor 7 -bminor 1 -bnumber 32 |
|
33 |
|
34 Mandatory arguments: |
|
35 -v: S60 language variant number |
|
36 -p: Build target platform. Valid values are: armv5 or winscw, only armv5 supported right now |
|
37 -r: Release build. Valid values are: urel or udeb, only urel supported right now |
|
38 -bmajor: build major number. In term of Browser version 7.1.1234, 7 is the major number |
|
39 -bminor: build minor number. In term of Browser version 7.1.1234, 1 is the minor number |
|
40 -bnumber: build number. In term of Browser version 7.1.1234, 1234 is the build number |
|
41 |
|
42 Optional arguments: |
|
43 - None |
|
44 |
|
45 Limitations |
|
46 - This script is currently valid only for 'armv5 urel' builds on S60 3.2.3 platform. |
|
47 |
|
48 }; |
|
49 |
|
50 my %num_lang = ( |
|
51 "01" => ["western", "01", "02", "03", "14"], |
|
52 "02" => ["western", "01", "09", "06", "16"], |
|
53 "03" => ["western", "01", "37", "57", "50"], |
|
54 "04" => ["western", "01", "05", "27", "17"], |
|
55 "05" => ["western", "01", "04", "18", "13"], |
|
56 "06" => ["western", "01", "51", "76", "83"], |
|
57 "07" => ["western", "01", "67", "54", "49"], |
|
58 "08" => ["western", "01", "68", "78", "93"], |
|
59 "09" => ["western", "01", "42", "45", "79"], |
|
60 "10" => ["western", "01", "59", "70", "39"], |
|
61 "11" => ["western", "01", "15", "07", "08"], |
|
62 "12" => ["western", "01", "58", "94"], |
|
63 "13" => ["western", "01", "25", "26", "28"], |
|
64 "14" => ["china", "29", "30", "157"], |
|
65 "15" => ["china", "31", "159"], |
|
66 "16" => ["japan", "32", "160"], |
|
67 "17" => ["thai", "33", "161"], |
|
68 "18" => ["western", "01", "96"], |
|
69 "19" => ["china", "31", "326", "159"], |
|
70 "20" => ["western", "05", "44", "401", "402"], |
|
71 "50" => ["western", "01", "02", "03", "14", "09", "06", "16", "37", "57", "33", "50", "05", "27", |
|
72 "17", "04", "18", "13", "51", "76", "83", "67", "54", "49", "68", "78", "93", |
|
73 "42", "45", "79", "59", "70", "39", "15", "07", "08", "58", "94", "25", "26", "28", |
|
74 "96", "05", "44"], |
|
75 "51" => ["china", "29", "30", "157", "31", "159"] |
|
76 ); |
|
77 # To support western-all IAD delivery we need to remove Lang 401, 402 of variant 50 |
|
78 |
|
79 die $usage unless @ARGV; |
|
80 |
|
81 print @ARGV; |
|
82 print "\n"; |
|
83 |
|
84 my ($variant_num,$platform,$release,$bmajor,$bminor,$bnumber); |
|
85 #my ($test1, $test2, $test3); |
|
86 GetOptions("v=s", => \$variant_num, "p=s",=> \$platform, "r=s",=> \$release, |
|
87 "bmajor=s", => \$bmajor, "bminor=s",=> \$bminor, "bnumber=s",=> \$bnumber) or die $usage; |
|
88 print "variant $variant_num \n"; |
|
89 print "platform $platform \n"; |
|
90 print "release $release \n"; |
|
91 print "bmajor, $bmajor \n"; |
|
92 print "bminor, $bminor \n"; |
|
93 print "bnumber, $bnumber \n"; |
|
94 |
|
95 print "... package variant $variant_num\n"; |
|
96 print "... package platform $platform \n"; |
|
97 print "... release $release \n"; |
|
98 # print "... major mini build $bmajor $bminor $bnumber \n"); |
|
99 # exit; |
|
100 |
|
101 # print $release; print "\n"; |
|
102 |
|
103 |
|
104 # Create BrowserNG_Cenrep.pkg file |
|
105 open (CENPKGFILE, '>.\\pkg\\BrowserNG_cenrep.pkg'); |
|
106 print CENPKGFILE "\;Languages\n"; |
|
107 print CENPKGFILE "\&EN\n\n"; |
|
108 print CENPKGFILE "\;Header\n"; |
|
109 print CENPKGFILE "\#\{\"Browser CenRep INI file\"\}\, \(0x10202BE9\)\,$bmajor,$bminor,$bnumber, TYPE=SP \n\n"; |
|
110 print CENPKGFILE <<ENDHEADER0; |
|
111 ;Localised Vendor name |
|
112 %{"Nokia"} |
|
113 |
|
114 ;Unique Vendor name |
|
115 :"Nokia" |
|
116 |
|
117 ;Supports S60 3rd Edition |
|
118 [0x102032BE], 0, 0, 0, {"Series60ProductID"} |
|
119 |
|
120 ENDHEADER0 |
|
121 print CENPKGFILE "\; CenRep ini file\n"; |
|
122 my $SrcDir = "\\epoc32\\data\\z\\private\\10202be9\\"; |
|
123 my $TargetDir = "c:\\private\\10202be9\\"; |
|
124 print CENPKGFILE "\n"; |
|
125 my @install_files = ( |
|
126 "10008d39.txt", |
|
127 "101f8731.txt" |
|
128 ); |
|
129 for my$install_file (@install_files) { |
|
130 print CENPKGFILE "\"$SrcDir$install_file\"\n - \"$TargetDir$install_file\" \n"; |
|
131 } |
|
132 close (CENPKGFILE); |
|
133 |
|
134 ######################################################################## |
|
135 # create BrowserNG.pkg file |
|
136 open (PKGFILE, '>.\\pkg\\BrowserNG.pkg'); |
|
137 #print PKGFILE <<ENDHEADER; |
|
138 #;Languages |
|
139 print PKGFILE "\;Languages\n"; |
|
140 #&EN |
|
141 print PKGFILE "\&EN\n\n"; |
|
142 # |
|
143 #;Header |
|
144 #{"Web Browser Update"},(0x10008D39),7,1,0, TYPE=SA,RU |
|
145 print PKGFILE "\;Header\n"; |
|
146 print PKGFILE "\#\{\"Web Browser Update\"\}\, \(0x10008D39\)\,$bmajor,$bminor,$bnumber, TYPE=SA,RU \n\n"; |
|
147 |
|
148 print PKGFILE <<ENDHEADER; |
|
149 ;Localised Vendor name |
|
150 %{"Nokia"} |
|
151 |
|
152 ;Unique Vendor name |
|
153 :"Nokia" |
|
154 |
|
155 ;Supports S60 3rd Edition |
|
156 [0x102032BE], 0, 0, 0, {"Series60ProductID"} |
|
157 |
|
158 ENDHEADER |
|
159 |
|
160 # MIF resource files ot install |
|
161 $SrcDir = "\\epoc32\\data\\Z\\resource\\apps\\"; |
|
162 $TargetDir = "!:\\resource\\apps\\"; |
|
163 print PKGFILE "\n"; |
|
164 # print PKGFILE $SrcDir; |
|
165 # print PKGFILE $TargetDir; |
|
166 @install_files = ( |
|
167 "BrowserAudioVideoPlugin_aif.mif", |
|
168 "schemeapp_aif.mif", |
|
169 "VideoServices_AIF.MIF", |
|
170 "browser.mif", |
|
171 "browserng_aif.mif", |
|
172 "connman.mif", |
|
173 "downloadmgruilib.mif", |
|
174 "operatormenu_aif.mif", |
|
175 "pushmtm.mif", |
|
176 "webkiticons.mif", |
|
177 "webkitutilsicons.mif" |
|
178 ); |
|
179 for my $install_file (@install_files) { |
|
180 print PKGFILE "\"$SrcDir$install_file\"\n - \"$TargetDir$install_file\" \n"; |
|
181 } |
|
182 |
|
183 # SRC resource files ot install |
|
184 $SrcDir = "\\epoc32\\data\\z\\private\\10003a3f\\apps\\"; |
|
185 $TargetDir = "!:\\private\\10003a3f\\import\\apps\\"; |
|
186 print PKGFILE "\n"; |
|
187 @install_files = ( |
|
188 "BrowserNG_reg.rsc", |
|
189 "CodViewer_reg.rsc", |
|
190 "DdViewer_reg.rsc", |
|
191 "Operatormenu_reg.rsc", |
|
192 "PushViewer_reg.rsc", |
|
193 "RoapApp_reg.rsc", |
|
194 "SchemeApp_reg.rsc", |
|
195 "VideoServices_reg.rsc", |
|
196 "WidgetUi_reg.rsc" |
|
197 ); |
|
198 for my$install_file (@install_files) { |
|
199 print PKGFILE "\"$SrcDir$install_file\"\n - \"$TargetDir$install_file\" \n"; |
|
200 } |
|
201 |
|
202 # SRC resource files ot install |
|
203 $SrcDir = "\\epoc32\\data\\Z\\resource\\"; |
|
204 $TargetDir = "!:\\resource\\"; |
|
205 print PKGFILE "\n"; |
|
206 @install_files = ( |
|
207 "AiwBrowserProvider.rsc" |
|
208 ); |
|
209 for my $install_file (@install_files) { |
|
210 print PKGFILE "\"$SrcDir$install_file\"\n - \"$TargetDir$install_file\" \n\n"; |
|
211 } |
|
212 |
|
213 # Get the languages of the variant |
|
214 my $variant_lang = $num_lang{$variant_num}; |
|
215 my @variant_lang = @$variant_lang; |
|
216 shift @variant_lang; |
|
217 |
|
218 # generate the lang dependent files |
|
219 for my$lang (@variant_lang) { |
|
220 print PKGFILE "IF exists\( \"z:\\resource\\avkon.r$lang\" ) \n"; |
|
221 |
|
222 $SrcDir = "\\epoc32\\data\\z\\resource\\"; |
|
223 $TargetDir = "!:\\resource\\"; |
|
224 print PKGFILE "\n"; |
|
225 @install_files = ( |
|
226 "webkit", |
|
227 "BrowserAudioVideoPlugin", |
|
228 "BrowserDialogsProvider", |
|
229 "browsertelservice", |
|
230 "CodUi", |
|
231 "ConnectionManager", |
|
232 "DownloadMgrUiLib", |
|
233 "WidgetInstallerUI", |
|
234 "WidgetMenu" |
|
235 ); |
|
236 for my$install_file (@install_files) { |
|
237 print PKGFILE "\"$SrcDir$install_file.r$lang\"\n - \"$TargetDir$install_file.r$lang\" \n"; |
|
238 } |
|
239 # generate more lang dependent files |
|
240 $SrcDir = "\\epoc32\\data\\z\\resource\\"; |
|
241 $TargetDir = "!:\\resource\\"; |
|
242 print PKGFILE "\n"; |
|
243 @install_files = ( |
|
244 "webkitutils" |
|
245 ); |
|
246 for my$install_file (@install_files) { |
|
247 print PKGFILE "\"$SrcDir$install_file.r$lang\"\n - \"$TargetDir$install_file.r$lang\" \n"; |
|
248 } |
|
249 # generate more lang dependent files |
|
250 $SrcDir = "\\epoc32\\data\\z\\resource\\apps\\"; |
|
251 $TargetDir = "!:\\resource\\apps\\"; |
|
252 print PKGFILE "\n"; |
|
253 @install_files = ( |
|
254 "BrowserNG", |
|
255 "CodViewer", |
|
256 "DdViewer", |
|
257 "Operatormenu", |
|
258 "PushViewer", |
|
259 "RoapApp", |
|
260 "SchemeApp", |
|
261 "VideoServices", |
|
262 "WidgetUi" |
|
263 ); |
|
264 for my$install_file (@install_files) { |
|
265 print PKGFILE "\"$SrcDir$install_file.r$lang\"\n - \"$TargetDir$install_file.r$lang\" \n"; |
|
266 } |
|
267 # generate more lang dependent files |
|
268 $SrcDir = "\\epoc32\\data\\z\\resource\\messaging\\mtm\\"; |
|
269 $TargetDir = "!:\\resource\\messaging\\mtm\\"; |
|
270 print PKGFILE "\n"; |
|
271 @install_files = ( |
|
272 "PushRegistry" |
|
273 ); |
|
274 for my$install_file (@install_files) { |
|
275 print PKGFILE "\"$SrcDir$install_file.r$lang\"\n - \"$TargetDir$install_file.r$lang\" \n"; |
|
276 } |
|
277 # generate more lang dependent files |
|
278 $SrcDir = "\\epoc32\\data\\z\\resource\\messaging\\"; |
|
279 $TargetDir = "!:\\resource\\messaging\\"; |
|
280 print PKGFILE "\n"; |
|
281 @install_files = ( |
|
282 "PushMtmUi" |
|
283 ); |
|
284 for my$install_file (@install_files) { |
|
285 print PKGFILE "\"$SrcDir$install_file.r$lang\"\n - \"$TargetDir$install_file.r$lang\" \n"; |
|
286 } |
|
287 print PKGFILE "ENDIF \n"; |
|
288 } |
|
289 # end of generate the lang dependent files |
|
290 |
|
291 # Non lang dependent rsc files |
|
292 $SrcDir = "\\epoc32\\data\\z\\resource\\plugins\\"; |
|
293 $TargetDir = "!:\\resource\\plugins\\"; |
|
294 print PKGFILE "\n"; |
|
295 @install_files = ( |
|
296 "AiwBrowserProvider", |
|
297 "BrowserRec", |
|
298 "CodRecog", |
|
299 "CookieFilter", |
|
300 "DdRecog", |
|
301 "DeflateFilter", |
|
302 "HttpFilterAcceptHeader", |
|
303 "HttpFilterAuthentication", |
|
304 "HttpFilterCache", |
|
305 "HttpFilterPipeliningConfig", |
|
306 "PushMtmPushContentHandler", |
|
307 "PushMtmWhiteListAdapter", |
|
308 "SchemeDispatcher", |
|
309 "WidgetInstallerUI", |
|
310 "widgetRecognizer", |
|
311 "httpfilterIop", |
|
312 "httpfilterconnhandler", |
|
313 "httpfilterproxy", |
|
314 "memoryplugin", |
|
315 "npBrowserAudioVideoPlugin", |
|
316 "npGpsPlugin", |
|
317 "npSystemInfoPlugin", |
|
318 "uaproffilter", |
|
319 "widgetmemoryplugin" |
|
320 ); |
|
321 print PKGFILE "\n"; |
|
322 for my$install_file (@install_files) { |
|
323 print PKGFILE "\"$SrcDir$install_file.rsc\"\n - \"$TargetDir$install_file.rsc\" \n"; |
|
324 } |
|
325 |
|
326 # Files to install (binaries - DLL) |
|
327 $SrcDir = "\\epoc32\\release\\armv5\\urel\\"; |
|
328 $TargetDir = "!:\\sys\\bin\\"; |
|
329 print PKGFILE "\n"; |
|
330 @install_files = ( |
|
331 "AiwBrowserProvider", |
|
332 "BrowserCache", |
|
333 "BrowserLauncher", |
|
334 "BrowserRec", |
|
335 "BrowserTelService", |
|
336 "CodDownload", |
|
337 "CodEng", |
|
338 "CodRecog", |
|
339 "CodUi", |
|
340 "ConnectionManager", |
|
341 "DdRecog", |
|
342 "DeflateFilter", |
|
343 "DownloadMgr", |
|
344 "DownloadMgrUiLib", |
|
345 "FavouritesEngine", |
|
346 "FeedsServerApi", |
|
347 "FeedsServerClient", |
|
348 "HttpCacheManager", |
|
349 "HttpDMServEng", |
|
350 "HttpFilterAcceptHeader", |
|
351 "HttpFilterAuthentication", |
|
352 "HttpFilterCache", |
|
353 "HttpFilterCommon", |
|
354 "HttpFilterPipeliningConfig", |
|
355 "JavaScriptCore", |
|
356 "MemMan", |
|
357 "Multipartparser", |
|
358 "PushMtmCliSrv", |
|
359 "PushMtmPushContentHandler", |
|
360 "PushMtmUi", |
|
361 "PushMtmUtil", |
|
362 "PushMtmWhiteListAdapter", |
|
363 "RECENTURLSTORE", |
|
364 "SchemeDispatcher", |
|
365 "WidgetInstallerUI", |
|
366 "WidgetRecognizer", |
|
367 "WidgetRegistryClient", |
|
368 "browserdialogsprovider", |
|
369 "browserengine", |
|
370 "cXmlParser", |
|
371 "cookiefilter", |
|
372 "cookiemanager", |
|
373 "httpfilterIop", |
|
374 "httpfilterconnhandler", |
|
375 "httpfilterproxy", |
|
376 "memoryplugin", |
|
377 "npBrowserAudioVideoPlugin", |
|
378 "npGpsPlugin", |
|
379 "npSystemInfoPlugin", |
|
380 "pagescaler", |
|
381 "uaproffilter", |
|
382 "webkitutils", |
|
383 "webutils", |
|
384 "widgetengine", |
|
385 "WidgetInstaller", |
|
386 "widgetmemoryplugin", |
|
387 "wmlEngine" |
|
388 ); |
|
389 for my$install_file (@install_files) { |
|
390 print PKGFILE "\"$SrcDir$install_file.dll\"\n - \"$TargetDir$install_file.dll\" \n"; |
|
391 } |
|
392 |
|
393 # Files to install (binaries - EXE) |
|
394 $SrcDir = "\\epoc32\\release\\armv5\\urel\\"; |
|
395 $TargetDir = "!:\\sys\\bin\\"; |
|
396 print PKGFILE "\n"; |
|
397 @install_files = ( |
|
398 "BrowserNG", |
|
399 "CodViewer", |
|
400 "CookieServer", |
|
401 "DdViewer", |
|
402 "DownloadMgrServer", |
|
403 "FavouritesSrv", |
|
404 "FeedsServer", |
|
405 "OperatorMenu", |
|
406 "PushViewer", |
|
407 "RoapApp", |
|
408 "SchemeApp", |
|
409 "VideoServices", |
|
410 "WidgetBackupRestore", |
|
411 "widgetlauncher", |
|
412 "WidgetRegistry", |
|
413 "WidgetUi" |
|
414 ); |
|
415 for my$install_file (@install_files) { |
|
416 print PKGFILE "\"$SrcDir$install_file.exe\"\n - \"$TargetDir$install_file.exe\" \n"; |
|
417 } |
|
418 |
|
419 # add the cenrep file |
|
420 print PKGFILE "\n\n"; |
|
421 print PKGFILE "\@\"BrowserNG_Cenrep.sisx\", (0x10202BE9)\n"; |
|
422 |
|
423 close (PKGFILE); |
|
424 |
|
425 print "end of the package" |