13 rem Contributors: |
13 rem Contributors: |
14 rem |
14 rem |
15 rem Description: |
15 rem Description: |
16 rem |
16 rem |
17 @echo on |
17 @echo on |
|
18 |
|
19 @if not exist "%1" md "%1" |
|
20 @if not exist "%1" goto :InvalidFolder |
|
21 @if not exist "%2" goto :MissingCert |
|
22 @if not exist "%3" goto :MissingKey |
|
23 |
18 rem The stub.. |
24 rem The stub.. |
19 makesis -s centrepswiteststub.pkg |
25 makesis -s centrepswiteststub.pkg |
20 |
26 |
21 rem Make and sign the KS12 package. This modifies the KS1.2 keyspace, which |
27 rem Make and sign the KS12 package. This modifies the KS1.2 keyspace, which |
22 rem is a user mod on the ROM keyspace K1. |
28 rem is a user mod on the ROM keyspace K1. |
23 makesis KS12.pkg |
29 makesis KS12.pkg KS12.sis |
24 signsis -S KS12.sis KS12s.sis certstore\centreproot.pem certstore\centreproot.key |
30 signsis -S KS12.sis KS12s.sis %2 %3 |
25 |
31 |
26 rem Make and sign the KS14 package. |
32 rem Make and sign the KS14 package. |
27 makesis KS14.pkg |
33 makesis KS14.pkg KS14.sis |
28 signsis -S KS14.sis KS14s.sis certstore\centreproot.pem certstore\centreproot.key |
34 signsis -S KS14.sis KS14s.sis %2 %3 |
29 |
35 |
30 rem Make and sign the KS2 package. This creates the KS2 keyspace, which |
36 rem Make and sign the KS2 package. This creates the KS2 keyspace, which |
31 rem is new. |
37 rem is new. |
32 makesis KS2.pkg |
38 makesis KS2.pkg KS2.sis |
33 signsis -S KS2.sis KS2s.sis certstore\centreproot.pem certstore\centreproot.key |
39 signsis -S KS2.sis KS2s.sis %2 %3 |
34 |
40 |
35 rem Make and sign the KS22 package. This creates the KS22 keyspace, which |
41 rem Make and sign the KS22 package. This creates the KS22 keyspace, which |
36 rem upgrades KS21 (user modified KS2). |
42 rem upgrades KS21 (user modified KS2). |
37 makesis KS22.pkg |
43 makesis KS22.pkg KS22.sis |
38 signsis -S KS22.sis KS22s.sis certstore\centreproot.pem certstore\centreproot.key |
44 signsis -S KS22.sis KS22s.sis %2 %3 |
39 |
45 |
40 rem Make and sign the KS3 package. This package will fail to install |
46 rem Make and sign the KS3 package. This package will fail to install |
41 rem because the referenced keyspace file is not in the ROM stub. |
47 rem because the referenced keyspace file is not in the ROM stub. |
42 makesis KS3.pkg |
48 makesis KS3.pkg KS3.sis |
43 signsis -S KS3.sis KS3s.sis certstore\centreproot.pem certstore\centreproot.key |
49 signsis -S KS3.sis KS3s.sis %2 %3 |
44 |
50 |
45 rem Make and sign the KS4 package. This keyspace contains various capabilities |
51 rem Make and sign the KS4 package. This keyspace contains various capabilities |
46 rem which we'll test don't change on a further install. |
52 rem which we'll test don't change on a further install. |
47 makesis KS4.pkg |
53 makesis KS4.pkg KS4.sis |
48 signsis -S KS4.sis KS4s.sis certstore\centreproot.pem certstore\centreproot.key |
54 signsis -S KS4.sis KS4s.sis %2 %3 |
49 |
55 |
50 rem Installs on top of the above, you might think the capabilities in the |
56 rem Installs on top of the above, you might think the capabilities in the |
51 rem above would be lost, but no - they are persisted before the caps in this |
57 rem above would be lost, but no - they are persisted before the caps in this |
52 rem package can splat them. |
58 rem package can splat them. |
53 makesis KS41.pkg |
59 makesis KS41.pkg KS41.sis |
54 signsis -S KS41.sis KS41s.sis certstore\centreproot.pem certstore\centreproot.key |
60 signsis -S KS41.sis KS41s.sis %2 %3 |
55 |
61 |
56 rem Make and sign the KP4 package. This keyspace contains various capabilities |
62 rem Make and sign the KP4 package. This keyspace contains various capabilities |
57 rem which we'll test don't change on a further install. |
63 rem which we'll test don't change on a further install. |
58 makesis KP4.pkg |
64 makesis KP4.pkg KP4.sis |
59 signsis -S KP4.sis KP4s.sis certstore\centreproot.pem certstore\centreproot.key |
65 signsis -S KP4.sis KP4s.sis %2 %3 |
60 |
66 |
61 rem Installs on top of the above, you might think the capabilities in the |
67 rem Installs on top of the above, you might think the capabilities in the |
62 rem above would be lost, but no - they are persisted before the caps in this |
68 rem above would be lost, but no - they are persisted before the caps in this |
63 rem package can splat them. |
69 rem package can splat them. |
64 makesis KP41.pkg |
70 makesis KP41.pkg KP41.sis |
65 signsis -S KP41.sis KP41s.sis certstore\centreproot.pem certstore\centreproot.key |
71 signsis -S KP41.sis KP41s.sis %2 %3 |
66 |
72 |
67 rem SP filenull for uninstalling KP4. |
73 rem SP filenull for uninstalling KP4. |
68 makesis KPS4.pkg |
74 makesis KPS4.pkg KPS4.sis |
69 signsis -S KPS4.sis KPS4s.sis certstore\centreproot.pem certstore\centreproot.key |
75 signsis -S KPS4.sis KPS4s.sis %2 %3 |
70 |
76 |
71 rem Installs on top of the ROM (51551554) |
77 rem Installs on top of the ROM (51551554) |
72 makesis KS51.pkg |
78 makesis KS51.pkg KS51.sis |
73 signsis -S KS51.sis KS51s.sis certstore\centreproot.pem certstore\centreproot.key |
79 signsis -S KS51.sis KS51s.sis %2 %3 |
74 |
80 |
75 rem Make and sign the KP2 package. This creates the KP2 keyspace, which |
81 rem Make and sign the KP2 package. This creates the KP2 keyspace, which |
76 rem is new. |
82 rem is new. |
77 makesis KP2.pkg |
83 makesis KP2.pkg KP2.sis |
78 signsis -S KP2.sis KP2s.sis certstore\centreproot.pem certstore\centreproot.key |
84 signsis -S KP2.sis KP2s.sis %2 %3 |
79 |
85 |
80 rem Make and sign the KP22 package. This creates the KP22 keyspace, which |
86 rem Make and sign the KP22 package. This creates the KP22 keyspace, which |
81 rem upgrades KP21 (user modified KP2). |
87 rem upgrades KP21 (user modified KP2). |
82 makesis KP22.pkg |
88 makesis KP22.pkg KP22.sis |
83 signsis -S KP22.sis KP22s.sis certstore\centreproot.pem certstore\centreproot.key |
89 signsis -S KP22.sis KP22s.sis %2 %3 |
84 |
90 |
85 rem Make and sign the KP23 package. |
91 rem Make and sign the KP23 package. |
86 makesis KP23.pkg |
92 makesis KP23.pkg KP23.sis |
87 signsis -S KP23.sis KP23s.sis certstore\centreproot.pem certstore\centreproot.key |
93 signsis -S KP23.sis KP23s.sis %2 %3 |
88 |
94 |
89 rem Make and sign the KP12 package. |
95 rem Make and sign the KP12 package. |
90 makesis KP12.pkg |
96 makesis KP12.pkg KP12.sis |
91 signsis -S KP12.sis KP12s.sis certstore\centreproot.pem certstore\centreproot.key |
97 signsis -S KP12.sis KP12s.sis %2 %3 |
92 |
98 |
93 rem Make and sign the KP14 package. |
99 rem Make and sign the KP14 package. |
94 makesis KP14.pkg |
100 makesis KP14.pkg KP14.sis |
95 signsis -S KP14.sis KP14s.sis certstore\centreproot.pem certstore\centreproot.key |
101 signsis -S KP14.sis KP14s.sis %2 %3 |
96 |
102 |
97 rem Make and sign the KPS14 standard patch, this SP is installed with a |
103 rem Make and sign the KPS14 standard patch, this SP is installed with a |
98 rem file-null so the 51551551 keyspace file can be removed. |
104 rem file-null so the 51551551 keyspace file can be removed. |
99 makesis KPS14.pkg |
105 makesis KPS14.pkg KPS14.sis |
100 signsis -S KPS14.sis KPS14s.sis certstore\centreproot.pem certstore\centreproot.key |
106 signsis -S KPS14.sis KPS14s.sis %2 %3 |
101 |
107 |
102 rem Make and sign the KP3 package. This package will fail to install |
108 rem Make and sign the KP3 package. This package will fail to install |
103 rem because the referenced keyspace file is not in the ROM stub. |
109 rem because the referenced keyspace file is not in the ROM stub. |
104 makesis KP3.pkg |
110 makesis KP3.pkg KP3.sis |
105 signsis -S KP3.sis KP3s.sis certstore\centreproot.pem certstore\centreproot.key |
111 signsis -S KP3.sis KP3s.sis %2 %3 |
106 |
112 |
107 rem Make and sign the KP62 package. |
113 rem Make and sign the KP62 package. |
108 makesis KP62.pkg |
114 makesis KP62.pkg KP62.sis |
109 signsis -S KP62.sis KP62s.sis certstore\centreproot.pem certstore\centreproot.key |
115 signsis -S KP62.sis KP62s.sis %2 %3 |
110 |
116 |
111 rem Make and sign the KP62 package. |
117 rem Make and sign the KP62 package. |
112 makesis KS62.pkg |
118 makesis KS62.pkg KS62.sis |
113 signsis -S KS62.sis KS62s.sis certstore\centreproot.pem certstore\centreproot.key |
119 signsis -S KS62.sis KS62s.sis %2 %3 |
114 |
120 |
115 rem Make and sign the KPS64 package. |
121 rem Make and sign the KPS64 package. |
116 makesis KPS64.pkg |
122 makesis KPS64.pkg KPS64.sis |
117 signsis -S KPS64.sis KPS64s.sis certstore\centreproot.pem certstore\centreproot.key |
123 signsis -S KPS64.sis KPS64s.sis %2 %3 |
118 |
124 |
119 rem Make and sign the KSX package. This is the embedded sis that goes in AppX.sis |
125 rem Make and sign the KSX package. This is the embedded sis that goes in AppX.sis |
120 makesis KSX.pkg |
126 makesis KSX.pkg KSX.sis |
121 signsis -S KSX.sis KSXs.sis certstore\centreproot.pem certstore\centreproot.key |
127 signsis -S KSX.sis KSXs.sis %2 %3 |
122 |
128 |
123 rem Make the AppX package for the application. This is the sis which contains the |
129 rem Make the AppX package for the application. This is the sis which contains the |
124 rem embedded sis that has the application repository as a Centrep patch. This sis |
130 rem embedded sis that has the application repository as a Centrep patch. This sis |
125 rem is self-signed and conditonally installs the exe file depending on the environment |
131 rem is self-signed and conditonally installs the exe file depending on the environment |
126 makesis APPX.pkg |
132 makesis APPX.pkg APPX.sis |
127 signsis -S APPX.sis APPXs.sis certstore\appx.cer certstore\appx.key |
133 signsis -S APPX.sis APPXs.sis certstore\appx.cer certstore\appx.key |
128 |
134 |
129 rem Make and sign the KSD package. This contains the corrupt KSD keyspace. |
135 rem Make and sign the KSD package. This contains the corrupt KSD keyspace. |
130 makesis KSD.pkg |
136 makesis KSD.pkg KSD.sis |
131 signsis -S KSD.sis KSDs.sis certstore\centreproot.pem certstore\centreproot.key |
137 signsis -S KSD.sis KSDs.sis %2 %3 |
132 |
138 |
133 rem Make the AppY,1,2 packages for the application. These sis files contain the |
139 rem Make the AppY,1,2 packages for the application. These sis files contain the |
134 rem embedded sis that has the application repository as a Centrep patch. This sis |
140 rem embedded sis that has the application repository as a Centrep patch. This sis |
135 rem is self-signed and conditonally installs the exe file depending on the environment |
141 rem is self-signed and conditonally installs the exe file depending on the environment |
136 rem These SIS files are used to test a standard installation |
142 rem These SIS files are used to test a standard installation |
137 |
143 |
138 rem The following packages are used for the APP-SP test |
144 rem The following packages are used for the APP-SP test |
139 |
145 |
140 rem Make and sign the KSY package. This is the embedded PU sis that goes in AppY.sis |
146 rem Make and sign the KSY package. This is the embedded PU sis that goes in AppY.sis |
141 makesis KSY.pkg |
147 makesis KSY.pkg KSY.sis |
142 signsis -S KSY.sis KSYs.sis certstore\centreproot.pem certstore\centreproot.key |
148 signsis -S KSY.sis KSYs.sis %2 %3 |
143 |
149 |
144 rem Make and sign the APPY package. This package will install an APP exe |
150 rem Make and sign the APPY package. This package will install an APP exe |
145 rem a keyspace in an embedded PU package and an SP package to be used for the uninstall |
151 rem a keyspace in an embedded PU package and an SP package to be used for the uninstall |
146 makesis APPY.pkg |
152 makesis APPY.pkg APPY.sis |
147 signsis -S APPY.sis APPYs.sis certstore\appx.cer certstore\appx.key |
153 signsis -S APPY.sis APPYs.sis certstore\appx.cer certstore\appx.key |
148 |
154 |
149 |
155 |
150 rem Make and sign the KSY1 package. This is the embedded PU sis that goes in AppY1.sis |
156 rem Make and sign the KSY1 package. This is the embedded PU sis that goes in AppY1.sis |
151 makesis KSY1.pkg |
157 makesis KSY1.pkg KSY1.sis |
152 signsis -S KSY1.sis KSY1s.sis certstore\centreproot.pem certstore\centreproot.key |
158 signsis -S KSY1.sis KSY1s.sis %2 %3 |
153 |
159 |
154 rem Make and sign the APPY1 package. This package will install the APP exe |
160 rem Make and sign the APPY1 package. This package will install the APP exe |
155 rem a new version of the keyspace in an embedded PU package and an SP package |
161 rem a new version of the keyspace in an embedded PU package and an SP package |
156 rem to be used for the uninstall |
162 rem to be used for the uninstall |
157 makesis APPY1.pkg |
163 makesis APPY1.pkg APPY1.sis |
158 signsis -S APPY1.sis APPY1s.sis certstore\appx.cer certstore\appx.key |
164 signsis -S APPY1.sis APPY1s.sis certstore\appx.cer certstore\appx.key |
159 |
165 |
160 |
166 |
161 rem Make and sign the KSY2 package. This is the embedded PU sis that goes in AppY2.sis |
167 rem Make and sign the KSY2 package. This is the embedded PU sis that goes in AppY2.sis |
162 makesis KSY2.pkg |
168 makesis KSY2.pkg KSY2.sis |
163 signsis -S KSY2.sis KSY2s.sis certstore\centreproot.pem certstore\centreproot.key |
169 signsis -S KSY2.sis KSY2s.sis %2 %3 |
164 |
170 |
165 rem Make and sign the APPY2 package. This package will install the APP exe |
171 rem Make and sign the APPY2 package. This package will install the APP exe |
166 rem a new version of the keyspace in an embedded PU package and an SP package |
172 rem a new version of the keyspace in an embedded PU package and an SP package |
167 rem to be used for the uninstall |
173 rem to be used for the uninstall |
168 makesis APPY2.pkg |
174 makesis APPY2.pkg APPY2.sis |
169 signsis -S APPY2.sis APPY2s.sis certstore\appx.cer certstore\appx.key |
175 signsis -S APPY2.sis APPY2s.sis certstore\appx.cer certstore\appx.key |
170 |
176 |
|
177 echo f | XCOPY /fry *.sis %1\ |
|
178 del /f *.sis |
|
179 @goto :EOF |
|
180 |
|
181 :InvalidFolder |
|
182 @echo ERROR: Can't create folder %1 |
|
183 @goto :EOF |
|
184 |
|
185 :MissingCert |
|
186 @echo ERROR: Missing certificate %2 |
|
187 @goto :EOF |
|
188 |
|
189 :MissingKey |
|
190 @echo ERROR: Missing certificate key %3 |
|
191 @goto :EOF |