84 } catch (RuntimeException re) {
85 if (re.getCause() instanceof ConfigException) {
86 throw (ConfigException) re.getCause();
87 } else {
88 throw new ConfigException(re);
89 }
90 }
91 }
92
93 private boolean doValidate(Map<String, ? super Object> params)
94 throws ConfigException {
95
96 imageBundleValidation(params);
97
98 return true;
99 }
100
101 File doBundle(Map<String, ? super Object> params, File outputDirectory,
102 boolean dependentTask) throws PackagerException {
103 if (StandardBundlerParam.isRuntimeInstaller(params)) {
104 return PREDEFINED_RUNTIME_IMAGE.fetchFrom(params);
105 } else {
106 return doAppBundle(params, outputDirectory, dependentTask);
107 }
108 }
109
110 private File doAppBundle(Map<String, ? super Object> params,
111 File outputDirectory, boolean dependentTask)
112 throws PackagerException {
113 try {
114 File rootDirectory = createRoot(params, outputDirectory,
115 dependentTask, APP_NAME.fetchFrom(params));
116 AbstractAppImageBuilder appBuilder = new LinuxAppImageBuilder(
117 params, outputDirectory.toPath());
118 if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(params) == null ) {
119 JLinkBundlerHelper.execute(params, appBuilder);
120 } else {
121 StandardBundlerParam.copyPredefinedRuntimeImage(
122 params, appBuilder);
123 }
124 return rootDirectory;
|
84 } catch (RuntimeException re) {
85 if (re.getCause() instanceof ConfigException) {
86 throw (ConfigException) re.getCause();
87 } else {
88 throw new ConfigException(re);
89 }
90 }
91 }
92
93 private boolean doValidate(Map<String, ? super Object> params)
94 throws ConfigException {
95
96 imageBundleValidation(params);
97
98 return true;
99 }
100
101 File doBundle(Map<String, ? super Object> params, File outputDirectory,
102 boolean dependentTask) throws PackagerException {
103 if (StandardBundlerParam.isRuntimeInstaller(params)) {
104 return StandardBundlerParam.getPredefinedRuntime(params);
105 } else {
106 return doAppBundle(params, outputDirectory, dependentTask);
107 }
108 }
109
110 private File doAppBundle(Map<String, ? super Object> params,
111 File outputDirectory, boolean dependentTask)
112 throws PackagerException {
113 try {
114 File rootDirectory = createRoot(params, outputDirectory,
115 dependentTask, APP_NAME.fetchFrom(params));
116 AbstractAppImageBuilder appBuilder = new LinuxAppImageBuilder(
117 params, outputDirectory.toPath());
118 if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(params) == null ) {
119 JLinkBundlerHelper.execute(params, appBuilder);
120 } else {
121 StandardBundlerParam.copyPredefinedRuntimeImage(
122 params, appBuilder);
123 }
124 return rootDirectory;
|