< prev index next >

src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppBundler.java

Print this page

        

@@ -42,12 +42,10 @@
     private static final ResourceBundle I18N = ResourceBundle.getBundle(
             "jdk.jpackage.internal.resources.LinuxResources");
 
     public static final BundlerParamInfo<File> ICON_PNG =
             new StandardBundlerParam<>(
-            I18N.getString("param.icon-png.name"),
-            I18N.getString("param.icon-png.description"),
             "icon.png",
             File.class,
             params -> {
                 File f = ICON.fetchFrom(params);
                 if (f != null && !f.getName().toLowerCase().endsWith(".png")) {

@@ -59,12 +57,10 @@
             },
             (s, p) -> new File(s));
 
     public static final BundlerParamInfo<String> LINUX_INSTALL_DIR =
             new StandardBundlerParam<>(
-            I18N.getString("param.linux-install-dir.name"),
-            I18N.getString("param.linux-install-dir.description"),
             "linux-install-dir",
             String.class,
             params -> {
                  String dir = INSTALL_DIR.fetchFrom(params);
                  if (dir != null) {

@@ -78,12 +74,10 @@
             (s, p) -> s
     );
 
     public static final BundlerParamInfo<String> LINUX_PACKAGE_DEPENDENCIES =
             new StandardBundlerParam<>(
-            I18N.getString("param.linux-package-dependencies.name"),
-            I18N.getString("param.linux-package-dependencies.description"),
             Arguments.CLIOptions.LINUX_PACKAGE_DEPENDENCIES.getId(),
             String.class,
             params -> {
                  return "";
              },

@@ -129,44 +123,22 @@
         return "app/" + APP_NAME.fetchFrom(p) +".cfg";
     }
 
     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);
         }
     }
 
-    private File doJreBundle(Map<String, ? super Object> p,
-            File outputDirectory, boolean dependentTask) throws PackagerException {
-        try {
-            File rootDirectory = createRoot(p, outputDirectory, dependentTask,
-                    APP_NAME.fetchFrom(p), "linuxapp-image-builder");
-            AbstractAppImageBuilder appBuilder = new LinuxAppImageBuilder(
-                    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);
-        }
-    }
-
     private File doAppBundle(Map<String, ? super Object> p,
             File outputDirectory, boolean dependentTask) throws PackagerException {
         try {
             File rootDirectory = createRoot(p, outputDirectory, dependentTask,
-                    APP_NAME.fetchFrom(p), "linuxapp-image-builder");
+                    APP_NAME.fetchFrom(p));
             AbstractAppImageBuilder appBuilder = new LinuxAppImageBuilder(p,
                     outputDirectory.toPath());
             if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ) {
                 JLinkBundlerHelper.execute(p, appBuilder);
             } else {
< prev index next >