38 |
38 |
39 my $platform = lc($ARGV[0]); |
39 my $platform = lc($ARGV[0]); |
40 my $configuration = lc($ARGV[1]); |
40 my $configuration = lc($ARGV[1]); |
41 my $packagedir = "packages"; |
41 my $packagedir = "packages"; |
42 my $non_iby_packagedir = "non_iby_packages"; |
42 my $non_iby_packagedir = "non_iby_packages"; |
|
43 my $packages_interpretsis_testcase = "packages_interpretsis_testcase"; |
43 my $builddir = "buildsis_${platform}_${configuration}"; |
44 my $builddir = "buildsis_${platform}_${configuration}"; |
44 |
45 |
45 usage() if $opt{h}; |
46 usage() if $opt{h}; |
46 clean() if $opt{c}; |
47 clean() if $opt{c}; |
47 usage() if !defined($ARGV[0]) || !defined($ARGV[1]); |
48 usage() if !defined($ARGV[0]) || !defined($ARGV[1]); |
119 # Replace a file with a string |
120 # Replace a file with a string |
120 sub WriteFile ($$) { |
121 sub WriteFile ($$) { |
121 my ($file, $data) = @_; |
122 my ($file, $data) = @_; |
122 |
123 |
123 # Ensure directory exists |
124 # Ensure directory exists |
124 if ($file =~ basename($1) && ! -e $1) { |
125 if ($1 && $file =~ basename($1) && ! -e $1) { |
125 mkdir($1); |
126 mkdir($1); |
126 } |
127 } |
127 |
128 |
128 system("attrib -r $file"); |
129 system("attrib -r $file"); |
129 open FILE, ">$file" or die "Can't write to $file: $!"; |
130 open FILE, ">$file" or die "Can't write to $file: $!"; |
147 |
148 |
148 |
149 |
149 print "Processing files in directory: $builddir\n\n"; |
150 print "Processing files in directory: $builddir\n\n"; |
150 MakeSISFiles($packagedir,"yes"); |
151 MakeSISFiles($packagedir,"yes"); |
151 MakeSISFiles($non_iby_packagedir,"no"); |
152 MakeSISFiles($non_iby_packagedir,"no"); |
|
153 MakeSISFiles($packages_interpretsis_testcase,"yes"); |
|
154 |
152 |
155 |
153 # Copy emulator version of preinstalled exes to location script expects. |
156 # Copy emulator version of preinstalled exes to location script expects. |
154 # They will be moved by the test script to the e: drive. |
157 # They will be moved by the test script to the e: drive. |
155 if ($platform =~/winscw/i) |
158 if ($platform =~/winscw/i) |
156 { |
159 { |
789 SignFileWithSpecifiedCert("tpropagation_spsu_armv5.sis", "tpropagation_spsu_armv5_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
792 SignFileWithSpecifiedCert("tpropagation_spsu_armv5.sis", "tpropagation_spsu_armv5_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
790 SignFileWithSpecifiedCert("tpropagation_spsu_winscw.sis", "tpropagation_spsu_winscw_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
793 SignFileWithSpecifiedCert("tpropagation_spsu_winscw.sis", "tpropagation_spsu_winscw_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
791 |
794 |
792 # non-removable test |
795 # non-removable test |
793 SignFileWithSpecifiedCert("nonremovablebase.sis", "nonremovablebase_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
796 SignFileWithSpecifiedCert("nonremovablebase.sis", "nonremovablebase_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
|
797 SignFileWithSpecifiedCert("int_nr_option_04.sis", "int_nr_option_04_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
|
798 SignFileWithSpecifiedCert("int_nr_option_05.sis", "int_nr_option_05_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
|
799 SignFileWithSpecifiedCert("sp_int_nr_option_06.sis", "sp_int_nr_option_06_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby); |
794 |
800 |
795 SignFile("romupgrademorecapsthansucert_sucert.sis", "romupgrademorecapsthansucert_sucert_root5.sis", "root5ca", \*iby); |
801 SignFile("romupgrademorecapsthansucert_sucert.sis", "romupgrademorecapsthansucert_sucert_root5.sis", "root5ca", \*iby); |
796 |
802 |
797 SignFile("romupgradenonrucertsa.sis", "romupgradenonrucertsa_root5.sis", "root5ca", \*iby); |
803 SignFile("romupgradenonrucertsa.sis", "romupgradenonrucertsa_root5.sis", "root5ca", \*iby); |
798 SignFile("romupgradenonrucertsp.sis", "romupgradenonrucertsp_root5.sis", "root5ca", \*iby); |
804 SignFile("romupgradenonrucertsp.sis", "romupgradenonrucertsp_root5.sis", "root5ca", \*iby); |