< prev index next >

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

Print this page

        

@@ -95,12 +95,10 @@
         return map;
     }
 
     public static final EnumeratedBundlerParam<String> MAC_CATEGORY =
             new EnumeratedBundlerParam<>(
-                    I18N.getString("param.category-name"),
-                    I18N.getString("param.category-name.description"),
                     Arguments.CLIOptions.MAC_APP_STORE_CATEGORY.getId(),
                     String.class,
                     params -> params.containsKey(CATEGORY.getID())
                             ? CATEGORY.fetchFrom(params)
                             : "Unknown",

@@ -109,30 +107,24 @@
                     false //strict - for MacStoreBundler this should be strict
             );
 
     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_NAME =
             new StandardBundlerParam<>(
-                    I18N.getString("param.cfbundle-name.name"),
-                    I18N.getString("param.cfbundle-name.description"),
                     Arguments.CLIOptions.MAC_BUNDLE_NAME.getId(),
                     String.class,
                     params -> null,
                     (s, p) -> s);
 
     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_IDENTIFIER =
             new StandardBundlerParam<>(
-                    I18N.getString("param.cfbundle-identifier.name"),
-                    I18N.getString("param.cfbundle-identifier.description"),
                     Arguments.CLIOptions.MAC_BUNDLE_IDENTIFIER.getId(),
                     String.class,
                     IDENTIFIER::fetchFrom,
                     (s, p) -> s);
 
     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_VERSION =
             new StandardBundlerParam<>(
-                    I18N.getString("param.cfbundle-version.name"),
-                    I18N.getString("param.cfbundle-version.description"),
                     "mac.CFBundleVersion",
                     String.class,
                     p -> {
                         String s = VERSION.fetchFrom(p);
                         if (validCFBundleVersion(s)) {

@@ -143,21 +135,17 @@
                     },
                     (s, p) -> s);
 
     public static final BundlerParamInfo<String> DEFAULT_ICNS_ICON =
             new StandardBundlerParam<>(
-            I18N.getString("param.default-icon-icns"),
-            I18N.getString("param.default-icon-icns.description"),
             ".mac.default.icns",
             String.class,
             params -> TEMPLATE_BUNDLE_ICON,
             (s, p) -> s);
 
     public static final BundlerParamInfo<String> DEVELOPER_ID_APP_SIGNING_KEY =
             new StandardBundlerParam<>(
-            I18N.getString("param.signing-key-developer-id-app.name"),
-            I18N.getString("param.signing-key-developer-id-app.description"),
             "mac.signing-key-developer-id-app",
             String.class,
             params -> {
                     String result = MacBaseInstallerBundler.findKey(
                             "Developer ID Application: "

@@ -178,21 +166,17 @@
                 },
             (s, p) -> s);
 
     public static final BundlerParamInfo<String> BUNDLE_ID_SIGNING_PREFIX =
             new StandardBundlerParam<>(
-            I18N.getString("param.bundle-id-signing-prefix.name"),
-            I18N.getString("param.bundle-id-signing-prefix.description"),
             Arguments.CLIOptions.MAC_BUNDLE_SIGNING_PREFIX.getId(),
             String.class,
             params -> IDENTIFIER.fetchFrom(params) + ".",
             (s, p) -> s);
 
     public static final BundlerParamInfo<File> ICON_ICNS =
             new StandardBundlerParam<>(
-            I18N.getString("param.icon-icns.name"),
-            I18N.getString("param.icon-icns.description"),
             "icon.icns",
             File.class,
             params -> {
                 File f = ICON.fetchFrom(params);
                 if (f != null && !f.getName().toLowerCase().endsWith(".icns")) {

@@ -304,44 +288,22 @@
         return true;
     }
 
     File doBundle(Map<String, ? super Object> p, File outputDirectory,
             boolean dependentTask) throws PackagerException {
-        if (RUNTIME_INSTALLER.fetchFrom(p)) {
-            return doJreBundle(p, outputDirectory, dependentTask);
+        if (StandardBundlerParam.isRuntimeInstaller(p)) {
+            return PREDEFINED_RUNTIME_IMAGE.fetchFrom(p);
         } else {
             return doAppBundle(p, outputDirectory, dependentTask);
         }
     }
 
-    File doJreBundle(Map<String, ? super Object> p, File outputDirectory,
-            boolean dependentTask) throws PackagerException {
-        try {
-            File rootDirectory = createRoot(p, outputDirectory, dependentTask,
-                    APP_NAME.fetchFrom(p), "macapp-image-builder");
-            AbstractAppImageBuilder appBuilder = new MacAppImageBuilder(p,
-                    APP_NAME.fetchFrom(p), outputDirectory.toPath());
-            File predefined = PREDEFINED_RUNTIME_IMAGE.fetchFrom(p);
-            if (predefined == null ) {
-                JLinkBundlerHelper.generateJre(p, appBuilder);
-            } else {
-                return predefined;
-            }
-            return rootDirectory;
-        } catch (PackagerException pe) {
-            throw pe;
-        } catch (Exception ex) {
-            Log.verbose(ex);
-            throw new PackagerException(ex);
-        }
-    }
-
     File doAppBundle(Map<String, ? super Object> p, File outputDirectory,
             boolean dependentTask) throws PackagerException {
         try {
             File rootDirectory = createRoot(p, outputDirectory, dependentTask,
-                    APP_NAME.fetchFrom(p) + ".app", "macapp-image-builder");
+                    APP_NAME.fetchFrom(p) + ".app");
             AbstractAppImageBuilder appBuilder =
                     new MacAppImageBuilder(p, outputDirectory.toPath());
             if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ) {
                 JLinkBundlerHelper.execute(p, appBuilder);
             } else {
< prev index next >