200 try {
201 ProcessBuilder pb = new ProcessBuilder("xcrun", "--help");
202 Process p = pb.start();
203 int code = p.waitFor();
204 if (code != 0) {
205 throw new ConfigException(
206 I18N.getString("error.no.xcode.signing"),
207 I18N.getString("error.no.xcode.signing.advice"));
208 }
209 } catch (IOException | InterruptedException ex) {
210 throw new ConfigException(ex);
211 }
212 }
213
214 return true;
215 }
216
217 File doBundle(Map<String, ? super Object> params, File outputDirectory,
218 boolean dependentTask) throws PackagerException {
219 if (StandardBundlerParam.isRuntimeInstaller(params)) {
220 return PREDEFINED_RUNTIME_IMAGE.fetchFrom(params);
221 } else {
222 return doAppBundle(params, outputDirectory, dependentTask);
223 }
224 }
225
226 File doAppBundle(Map<String, ? super Object> params, File outputDirectory,
227 boolean dependentTask) throws PackagerException {
228 try {
229 File rootDirectory = createRoot(params, outputDirectory,
230 dependentTask, APP_NAME.fetchFrom(params) + ".app");
231 AbstractAppImageBuilder appBuilder =
232 new MacAppImageBuilder(params, outputDirectory.toPath());
233 if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(params) == null ) {
234 JLinkBundlerHelper.execute(params, appBuilder);
235 } else {
236 StandardBundlerParam.copyPredefinedRuntimeImage(
237 params, appBuilder);
238 }
239 return rootDirectory;
240 } catch (PackagerException pe) {
|
200 try {
201 ProcessBuilder pb = new ProcessBuilder("xcrun", "--help");
202 Process p = pb.start();
203 int code = p.waitFor();
204 if (code != 0) {
205 throw new ConfigException(
206 I18N.getString("error.no.xcode.signing"),
207 I18N.getString("error.no.xcode.signing.advice"));
208 }
209 } catch (IOException | InterruptedException ex) {
210 throw new ConfigException(ex);
211 }
212 }
213
214 return true;
215 }
216
217 File doBundle(Map<String, ? super Object> params, File outputDirectory,
218 boolean dependentTask) throws PackagerException {
219 if (StandardBundlerParam.isRuntimeInstaller(params)) {
220 return StandardBundlerParam.getPredefinedRuntime(params);
221 } else {
222 return doAppBundle(params, outputDirectory, dependentTask);
223 }
224 }
225
226 File doAppBundle(Map<String, ? super Object> params, File outputDirectory,
227 boolean dependentTask) throws PackagerException {
228 try {
229 File rootDirectory = createRoot(params, outputDirectory,
230 dependentTask, APP_NAME.fetchFrom(params) + ".app");
231 AbstractAppImageBuilder appBuilder =
232 new MacAppImageBuilder(params, outputDirectory.toPath());
233 if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(params) == null ) {
234 JLinkBundlerHelper.execute(params, appBuilder);
235 } else {
236 StandardBundlerParam.copyPredefinedRuntimeImage(
237 params, appBuilder);
238 }
239 return rootDirectory;
240 } catch (PackagerException pe) {
|