|
1 #!/usr/local/bin/perl -w |
|
2 # ============================================================================ |
|
3 # Name : buildIADsis.pl |
|
4 # Description: Creates SIS installation packages for S60 Browser that |
|
5 # meets Arrow/IAD program requirements for delivery to end-user devices. |
|
6 # Also generates R&D signed SIS packages for Nokia R&D internal use. |
1 # |
7 # |
2 # Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
8 # Copyright © 2008 Nokia. All rights reserved. |
3 # All rights reserved. |
9 # This material, including documentation and any related computer |
4 # This component and the accompanying materials are made available |
10 # programs, is protected by copyright controlled by Nokia. All |
5 # under the terms of the License "Eclipse Public License v1.0" |
11 # rights are reserved. Copying, including reproducing, storing, |
6 # which accompanies this distribution, and is available |
12 # adapting or translating, any or all of this material requires the |
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
13 # prior written consent of Nokia. This material also contains |
8 # |
14 # confidential information which may not be disclosed to others |
9 # Initial Contributors: |
15 # without the prior written consent of Nokia. |
10 # Nokia Corporation - initial contribution. |
16 # ============================================================================ |
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: Creates SIS installation packages for S60 Browser that |
|
15 # meets Arrow/IAD program requirements for delivery to end-user devices. |
|
16 # Also generates R&D signed SIS packages for Nokia R&D internal use. |
|
17 # |
|
18 |
17 |
19 # TODOs |
18 # TODOs |
20 # Baseline whatlog and build whatlog need to be processed and compared |
19 # Baseline whatlog and build whatlog need to be processed and compared |
21 |
20 |
22 # Notes for maintainers: |
21 # Notes for maintainers: |
23 # Versioning guide: |
22 # Versioning guide: |
24 # http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_versioning |
23 # http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_versioning |
25 # Eclipsing ROM files using installers |
24 # Eclipsing ROM files using installers |
38 |
37 |
39 my $usage = q{ |
38 my $usage = q{ |
40 Usage: buildIADsis.pl -opmode dev -appversion 7.1.2 -binversion 10.1 -variant 01 -nocache -verbose |
39 Usage: buildIADsis.pl -opmode dev -appversion 7.1.2 -binversion 10.1 -variant 01 -nocache -verbose |
41 |
40 |
42 Mandatory arguments: |
41 Mandatory arguments: |
43 -opmode : either dev or integration. If integration, use filelist argument below |
42 -opmode : either dev or integration. If integration, use filelist argument below |
44 -appversion: Browser version as a string e.g 7.1.420 (major.minor.build). Minor must be 1 digit. |
43 -appversion: Browser version as a string e.g 7.1.420 (major.minor.build). Minor must be 1 digit. |
45 -variant: S60 platform specific variant code. E.g for 3.23: 01->English, 22->Chinese etc. |
44 -platform: S60 platform. E.g 3.23 or 5.0 |
46 |
45 -variant: S60 platform specific variant code. E.g for 3.23: 01->English, 22->Chinese etc. |
47 Optional arguments: |
46 |
48 -filelist: A text file containing list of files to include in the PKG |
47 Optional arguments: |
49 File paths must be of the form \epoc32\dir\urel\file.ext |
48 -platform: S60 platform. Such as S60.323 or S60.50 |
50 -binversion: version to inject inside all EXEs and DLLs. Must be 10.0 or higher. |
49 -filelist: A text file containing list of files to include in the PKG |
51 -nocache: does everything cleanly, no old data used |
50 File paths must be of the form \epoc32\dir\urel\file.ext |
52 -verbose: Turns on debug statements |
51 -binversion: version to inject inside all EXEs and DLLs. Must be 10.0 or higher. |
53 -webkey: Web signing key filename |
52 -nocache: does everything cleanly, no old data used |
54 -webcert: Web signing certificate filename |
53 -verbose: Turns on debug statements |
55 -cenrepkey: Cenrep signing key filename |
54 -webkey: Web signing key filename |
56 -cenrepcert: Cenrep signing certificate filename |
55 -webcert: Web signing certificate filename |
57 |
56 -cenrepkey: Cenrep signing key filename |
|
57 -cenrepcert: Cenrep signing certificate filename |
|
58 |
|
59 For quick primer on differences between Application version and Binary version, see: |
|
60 http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_versioning |
58 }; |
61 }; |
59 |
62 |
60 my ($rawFilelist,$appVersion, $binVersion, $variant,$opmode,$lang_code); |
63 my ($s60platform, $rawFilelist,$appVersion, $binVersion, $variant,$opmode,$lang_code); |
61 my (@variants); |
64 my (@variants); |
62 my $langgroup; |
65 my $langgroup; |
63 my $type = "rnd"; |
66 my $type = "rnd"; |
64 my $brExe_UID3 = "0x10008D39"; #Unique ID for Browser application |
67 my $brExe_UID3 = "0x10008D39"; #Unique ID for Browser application |
65 my $packageTypeMajor = "RU"; # even though we use SA,RU, mention the RU in filename since it sounds more important |
68 my $packageTypeMajor = "RU"; # even though we use SA,RU, mention the RU in filename since it sounds more important |
66 #TODO: We should be able to query the S60 platform by parsing some file in epoc32. Dunno how to do this. This should NOT be hardcoded. |
69 #TODO: We should be able to query the S60 platform by parsing some file in epoc32. Dunno how to do this. This should NOT be hardcoded. |
67 my $s60platform = "S60.323"; |
70 # Inital value for s60Platform is S60.323 |
|
71 $s60platform = "S60.323"; |
68 my $cenrepPkg = ".\\pkg\\BrowserNG_Cenrep.pkg"; |
72 my $cenrepPkg = ".\\pkg\\BrowserNG_Cenrep.pkg"; |
69 my $cenrepSis = "BrowserNG_Cenrep.sis"; |
73 my $cenrepSis = "BrowserNG_Cenrep.sis"; |
70 my $finalBrowserPkg = ".\\pkg\\BrowserNG.pkg"; |
74 my $finalBrowserPkg = ".\\pkg\\BrowserNG.pkg"; |
71 my $debug_printing = 1; |
75 my $debug_printing = 1; |
72 my $nocache = 0; |
76 my $nocache = 0; |
74 # be signed separately. |
78 # be signed separately. |
75 my $webkey = ".\\cert\\RDTest_02.key"; |
79 my $webkey = ".\\cert\\RDTest_02.key"; |
76 my $webcert = ".\\cert\\RDTest_02.der"; |
80 my $webcert = ".\\cert\\RDTest_02.der"; |
77 my $cenrepkey = ".\\cert\\RDTest_02.key"; |
81 my $cenrepkey = ".\\cert\\RDTest_02.key"; |
78 my $cenrepcert = ".\\cert\\RDTest_02.der"; |
82 my $cenrepcert = ".\\cert\\RDTest_02.der"; |
|
83 my $buildType = "urel"; |
79 |
84 |
80 my @cleanupList = (); |
85 my @cleanupList = (); |
81 |
86 |
82 GetOptions( "appversion=s",\$appVersion, |
87 GetOptions( |
|
88 "platform=s", \$s60platform, |
|
89 "appversion=s",\$appVersion, |
83 "binversion=s",\$binVersion, |
90 "binversion=s",\$binVersion, |
84 "variant=s",\$variant, |
91 "variant=s",\$variant, |
85 "opmode=s",\$opmode, |
92 "opmode=s",\$opmode, |
86 "nocache",\$nocache, |
93 "nocache",\$nocache, |
87 "verbose",\$debug_printing, |
94 "verbose",\$debug_printing, |
88 "filelist=s",\$rawFilelist, |
95 "filelist=s",\$rawFilelist, |
89 "webkey=s", \$webkey, |
96 "webkey=s", \$webkey, |
90 "webcert=s", \$webcert, |
97 "webcert=s", \$webcert, |
91 "cenrepkey=s", \$cenrepkey, |
98 "cenrepkey=s", \$cenrepkey, |
92 "cenrepcert=s", \$cenrepcert |
99 "cenrepcert=s", \$cenrepcert, |
|
100 "build=s", \$buildType |
93 ); |
101 ); |
94 |
102 |
95 |
103 |
96 #### START OF ARG CHECKS |
104 #### START OF ARG CHECKS |
97 if ( !defined $appVersion ) { print STDERR "\nBad argument: missing appversion\n $usage"; exit; } |
105 if ( !defined $appVersion ) { print STDERR "\nBad argument: missing appversion\n $usage"; exit; } |
141 else { |
149 else { |
142 print STDOUT "\n build variant $variant for RnD purpose \n"; |
150 print STDOUT "\n build variant $variant for RnD purpose \n"; |
143 } |
151 } |
144 print STDOUT "\n=== SIS filename: $browserSIS \n" ; |
152 print STDOUT "\n=== SIS filename: $browserSIS \n" ; |
145 } |
153 } |
|
154 # Handle S60.50 situations |
|
155 if ( $s60platform eq "S60.50" ) |
|
156 { |
|
157 # May need special handling later |
|
158 } |
146 |
159 |
147 ### Call pkg generation perl script |
160 ### Call pkg generation perl script |
148 system("CreateIADpackages.pl -v $variant -p armv5 -r urel -bmajor $parsedAppVer[0] -bminor $parsedAppVer[1] -bnumber $parsedAppVer[2]"); |
161 system("CreateIADpackages.pl -s $s60platform -v $variant -p armv5 -r urel -bmajor $parsedAppVer[0] -bminor $parsedAppVer[1] -bnumber $parsedAppVer[2] -build $buildType"); |
149 |
162 |
150 # Pick up any files from the WHAT output that match any of these regex patterns |
163 # Pick up any files from the WHAT output that match any of these regex patterns |
151 my $filenameRegEx = join '|', qw( |
164 my $filenameRegEx = join '|', qw( |
152 [.]dll$ |
165 [.]dll$ |
153 [.]exe$ |
166 [.]exe$ |