@@ -195,13 +195,13 @@ private File preparePrecompiledStartupStub() throws Exception {
195
195
196
196
private void codesign (String developerId , File entitlements , File appFile ) throws Exception {
197
197
198
- prepareEntitlementFile (entitlements );
198
+ entitlements = prepareEntitlementFile (entitlements );
199
199
200
200
manualDeepSign (appFile , developerId , entitlements );
201
201
202
202
}
203
203
204
- private void prepareEntitlementFile (File entitlements ) throws Exception {
204
+ private File prepareEntitlementFile (File entitlements ) throws Exception {
205
205
// if entitlements.plist file not specified, use a default one
206
206
if (entitlements == null ) {
207
207
Logger .warn ("Entitlements file not specified. Using defaults!" );
@@ -210,6 +210,7 @@ private void prepareEntitlementFile(File entitlements) throws Exception {
210
210
} else if (!entitlements .exists ()) {
211
211
throw new Exception ("Entitlements file doesn't exist: " + entitlements );
212
212
}
213
+ return entitlements ;
213
214
}
214
215
215
216
private void manualDeepSign (File appFolder , String developerCertificateName , File entitlements ) throws IOException , CommandLineException {
@@ -237,7 +238,6 @@ private void manualDeepSign(File appFolder, String developerCertificateName, Fil
237
238
238
239
// finally, sign the top level directory
239
240
codesign (entitlements , developerCertificateName , appFolder );
240
-
241
241
}
242
242
243
243
private void codesign (File entitlements , String developerCertificateName , File file ) throws IOException , CommandLineException {
@@ -248,7 +248,7 @@ private void codesign(File entitlements, String developerCertificateName, File f
248
248
arguments .add (entitlements );
249
249
arguments .add ("-s" );
250
250
arguments .add (developerCertificateName );
251
- arguments .add (appFolder );
251
+ arguments .add (file );
252
252
CommandUtils .execute ("codesign" , arguments );
253
253
}
254
254
0 commit comments