< prev index next >

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java

Print this page

        

*** 116,129 **** String.class, params -> "-MacAppStore", (s, p) -> s); //@Override ! public File bundle(Map<String, ? super Object> p, File outdir) throws PackagerException { Log.verbose(MessageFormat.format(I18N.getString( ! "message.building-bundle"), APP_NAME.fetchFrom(p))); if (!outdir.isDirectory() && !outdir.mkdirs()) { throw new PackagerException( "error.cannot-create-output-dir", outdir.getAbsolutePath()); } --- 116,129 ---- String.class, params -> "-MacAppStore", (s, p) -> s); //@Override ! public File bundle(Map<String, ? super Object> params, File outdir) throws PackagerException { Log.verbose(MessageFormat.format(I18N.getString( ! "message.building-bundle"), APP_NAME.fetchFrom(params))); if (!outdir.isDirectory() && !outdir.mkdirs()) { throw new PackagerException( "error.cannot-create-output-dir", outdir.getAbsolutePath()); }
*** 133,192 **** outdir.getAbsolutePath()); } // first, load in some overrides // icns needs @2 versions, so load in the @2 default ! p.put(DEFAULT_ICNS_ICON.getID(), TEMPLATE_BUNDLE_ICON_HIDPI); // now we create the app ! File appImageDir = APP_IMAGE_TEMP_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, false); ! prepareEntitlements(p); ! String signingIdentity = MAC_APP_STORE_APP_SIGNING_KEY.fetchFrom(p); ! 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) + ".pkg"); outdir.mkdirs(); String installIdentify = ! MAC_APP_STORE_PKG_SIGNING_KEY.fetchFrom(p); List<String> buildOptions = new ArrayList<>(); buildOptions.add("productbuild"); buildOptions.add("--component"); buildOptions.add(appLocation.toString()); buildOptions.add("/Applications"); buildOptions.add("--sign"); buildOptions.add(installIdentify); buildOptions.add("--product"); buildOptions.add(appLocation + "/Contents/Info.plist"); ! String keychainName = SIGNING_KEYCHAIN.fetchFrom(p); if (keychainName != null && !keychainName.isEmpty()) { buildOptions.add("--keychain"); buildOptions.add(keychainName); } buildOptions.add(finalPKG.getAbsolutePath()); --- 133,195 ---- outdir.getAbsolutePath()); } // first, load in some overrides // icns needs @2 versions, so load in the @2 default ! params.put(DEFAULT_ICNS_ICON.getID(), TEMPLATE_BUNDLE_ICON_HIDPI); // now we create the app ! File appImageDir = APP_IMAGE_TEMP_ROOT.fetchFrom(params); try { appImageDir.mkdirs(); try { ! MacAppImageBuilder.addNewKeychain(params); } catch (InterruptedException e) { Log.error(e.getMessage()); } // first, make sure we don't use the local signing key ! params.put(DEVELOPER_ID_APP_SIGNING_KEY.getID(), null); ! File appLocation = prepareAppBundle(params, false); ! 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.signAppBundle(params, appLocation.toPath(), signingIdentity, identifierPrefix, entitlementsFile, inheritEntitlements); ! MacAppImageBuilder.restoreKeychainList(params); ProcessBuilder pb; // create the final pkg file ! File finalPKG = new File(outdir, INSTALLER_NAME.fetchFrom(params) ! + INSTALLER_SUFFIX.fetchFrom(params) + ".pkg"); outdir.mkdirs(); String installIdentify = ! MAC_APP_STORE_PKG_SIGNING_KEY.fetchFrom(params); List<String> buildOptions = new ArrayList<>(); buildOptions.add("productbuild"); buildOptions.add("--component"); buildOptions.add(appLocation.toString()); buildOptions.add("/Applications"); buildOptions.add("--sign"); buildOptions.add(installIdentify); buildOptions.add("--product"); buildOptions.add(appLocation + "/Contents/Info.plist"); ! String keychainName = SIGNING_KEYCHAIN.fetchFrom(params); if (keychainName != null && !keychainName.isEmpty()) { buildOptions.add("--keychain"); buildOptions.add(keychainName); } buildOptions.add(finalPKG.getAbsolutePath());
< prev index next >