< prev index next >

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

Print this page




  93                     I18N.getString("error.parameters-null.advice"));
  94 
  95             return doValidate(params);
  96         } catch (RuntimeException re) {
  97             if (re.getCause() instanceof ConfigException) {
  98                 throw (ConfigException) re.getCause();
  99             } else {
 100                 throw new ConfigException(re);
 101             }
 102         }
 103     }
 104 
 105     private boolean doValidate(Map<String, ? super Object> params)
 106             throws ConfigException {
 107 
 108         imageBundleValidation(params);
 109 
 110         return true;
 111     }
 112 
 113     // it is static for the sake of sharing with "installer" bundlers
 114     // that may skip calls to validate/bundle in this class!
 115     static File getRootDir(File outDir, Map<String, ? super Object> params) {
 116         return new File(outDir, APP_NAME.fetchFrom(params));
 117     }
 118 
 119     File doBundle(Map<String, ? super Object> params, File outputDirectory,
 120             boolean dependentTask) throws PackagerException {
 121         if (StandardBundlerParam.isRuntimeInstaller(params)) {
 122             return PREDEFINED_RUNTIME_IMAGE.fetchFrom(params);
 123         } else {
 124             return doAppBundle(params, outputDirectory, dependentTask);
 125         }
 126     }
 127 
 128     private File doAppBundle(Map<String, ? super Object> params,
 129             File outputDirectory, boolean dependentTask)
 130             throws PackagerException {
 131         try {
 132             File rootDirectory = createRoot(params, outputDirectory,
 133                     dependentTask, APP_NAME.fetchFrom(params));
 134             AbstractAppImageBuilder appBuilder = new LinuxAppImageBuilder(
 135                     params, outputDirectory.toPath());
 136             if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(params) == null ) {
 137                 JLinkBundlerHelper.execute(params, appBuilder);
 138             } else {




  93                     I18N.getString("error.parameters-null.advice"));
  94 
  95             return doValidate(params);
  96         } catch (RuntimeException re) {
  97             if (re.getCause() instanceof ConfigException) {
  98                 throw (ConfigException) re.getCause();
  99             } else {
 100                 throw new ConfigException(re);
 101             }
 102         }
 103     }
 104 
 105     private boolean doValidate(Map<String, ? super Object> params)
 106             throws ConfigException {
 107 
 108         imageBundleValidation(params);
 109 
 110         return true;
 111     }
 112 






 113     File doBundle(Map<String, ? super Object> params, File outputDirectory,
 114             boolean dependentTask) throws PackagerException {
 115         if (StandardBundlerParam.isRuntimeInstaller(params)) {
 116             return PREDEFINED_RUNTIME_IMAGE.fetchFrom(params);
 117         } else {
 118             return doAppBundle(params, outputDirectory, dependentTask);
 119         }
 120     }
 121 
 122     private File doAppBundle(Map<String, ? super Object> params,
 123             File outputDirectory, boolean dependentTask)
 124             throws PackagerException {
 125         try {
 126             File rootDirectory = createRoot(params, outputDirectory,
 127                     dependentTask, APP_NAME.fetchFrom(params));
 128             AbstractAppImageBuilder appBuilder = new LinuxAppImageBuilder(
 129                     params, outputDirectory.toPath());
 130             if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(params) == null ) {
 131                 JLinkBundlerHelper.execute(params, appBuilder);
 132             } else {


< prev index next >