--- old/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacAppStoreBundler.java 2020-03-30 12:44:47.529035300 -0400 +++ new/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacAppStoreBundler.java 2020-03-30 12:44:45.792140600 -0400 @@ -40,10 +40,6 @@ "jdk.incubator.jpackage.internal.resources.MacResources"); private static final String TEMPLATE_BUNDLE_ICON_HIDPI = "java.icns"; - private final static String DEFAULT_ENTITLEMENTS = - "MacAppStore.entitlements"; - private final static String DEFAULT_INHERIT_ENTITLEMENTS = - "MacAppStore_Inherit.entitlements"; public static final BundlerParamInfo MAC_APP_STORE_APP_SIGNING_KEY = new StandardBundlerParam<>( @@ -94,13 +90,6 @@ }, (s, p) -> s); - public static final StandardBundlerParam MAC_APP_STORE_ENTITLEMENTS = - new StandardBundlerParam<>( - Arguments.CLIOptions.MAC_APP_STORE_ENTITLEMENTS.getId(), - File.class, - params -> null, - (s, p) -> new File(s)); - public static final BundlerParamInfo INSTALLER_SUFFIX = new StandardBundlerParam<> ( "mac.app-store.installerName.suffix", @@ -133,20 +122,15 @@ params.put(DEVELOPER_ID_APP_SIGNING_KEY.getID(), null); File appLocation = prepareAppBundle(params); - prepareEntitlements(params); - String signingIdentity = MAC_APP_STORE_APP_SIGNING_KEY.fetchFrom(params); String identifierPrefix = BUNDLE_ID_SIGNING_PREFIX.fetchFrom(params); - String entitlementsFile = - getConfig_Entitlements(params).toString(); - String inheritEntitlements = - getConfig_Inherit_Entitlements(params).toString(); + MacAppImageBuilder.prepareEntitlements(params); MacAppImageBuilder.signAppBundle(params, appLocation.toPath(), signingIdentity, identifierPrefix, - entitlementsFile, inheritEntitlements); + MacAppImageBuilder.getConfig_Entitlements(params)); MacAppImageBuilder.restoreKeychainList(params); ProcessBuilder pb; @@ -188,31 +172,6 @@ } } - private File getConfig_Entitlements(Map params) { - return new File(CONFIG_ROOT.fetchFrom(params), - APP_NAME.fetchFrom(params) + ".entitlements"); - } - - private File getConfig_Inherit_Entitlements( - Map params) { - return new File(CONFIG_ROOT.fetchFrom(params), - APP_NAME.fetchFrom(params) + "_Inherit.entitlements"); - } - - private void prepareEntitlements(Map params) - throws IOException { - createResource(DEFAULT_ENTITLEMENTS, params) - .setCategory( - I18N.getString("resource.mac-app-store-entitlements")) - .setExternal(MAC_APP_STORE_ENTITLEMENTS.fetchFrom(params)) - .saveToFile(getConfig_Entitlements(params)); - - createResource(DEFAULT_INHERIT_ENTITLEMENTS, params) - .setCategory(I18N.getString( - "resource.mac-app-store-inherit-entitlements")) - .saveToFile(getConfig_Entitlements(params)); - } - /////////////////////////////////////////////////////////////////////// // Implement Bundler ///////////////////////////////////////////////////////////////////////