modules/jdk.packager/src/main/java/com/oracle/tools/packager/mac/MacAppStoreBundler.java

Print this page

        

@@ -142,10 +142,15 @@
         // now we create the app
         File appImageDir = APP_IMAGE_BUILD_ROOT.fetchFrom(p);
         try {
             appImageDir.mkdirs();
 
+            try {
+                MacAppImageBuilder.addNewKeychain(p);
+            } catch (InterruptedException e) {
+                Log.error(e.getMessage());
+            }
             // first, make sure we don't use the local signing key
             p.put(DEVELOPER_ID_APP_SIGNING_KEY.getID(), null);
             File appLocation = prepareAppBundle(p);
 
             prepareEntitlements(p);

@@ -154,10 +159,12 @@
             String identifierPrefix = BUNDLE_ID_SIGNING_PREFIX.fetchFrom(p);
             String entitlementsFile = getConfig_Entitlements(p).toString();
             String inheritEntitlements = getConfig_Inherit_Entitlements(p).toString();
 
             MacAppImageBuilder.signAppBundle(p, appLocation.toPath(), signingIdentity, identifierPrefix, entitlementsFile, inheritEntitlements);
+            MacAppImageBuilder.restoreKeychainList(p);
+            
             ProcessBuilder pb;
 
             // create the final pkg file
             File finalPKG = new File(outdir, INSTALLER_NAME.fetchFrom(p)
                     + INSTALLER_SUFFIX.fetchFrom(p)