< prev index next >

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinAppBundler.java

Print this page

        

*** 44,55 **** private static final ResourceBundle I18N = ResourceBundle.getBundle( "jdk.jpackage.internal.resources.WinResources"); static final BundlerParamInfo<File> ICON_ICO = new StandardBundlerParam<>( - I18N.getString("param.icon-ico.name"), - I18N.getString("param.icon-ico.description"), "icon.ico", File.class, params -> { File f = ICON.fetchFrom(params); if (f != null && !f.getName().toLowerCase().endsWith(".ico")) { --- 44,53 ----
*** 169,213 **** return doBundle(p, outputDirectory, false) != null; } File doBundle(Map<String, ? super Object> p, File outputDirectory, boolean dependentTask) throws PackagerException { ! if (RUNTIME_INSTALLER.fetchFrom(p)) { ! return doJreBundle(p, outputDirectory, dependentTask); } 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), "windowsapp-image-builder"); - AbstractAppImageBuilder appBuilder = new WindowsAppImageBuilder( - 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 e) { - Log.verbose(e); - throw new PackagerException(e); - } - } - File doAppBundle(Map<String, ? super Object> p, File outputDirectory, boolean dependentTask) throws PackagerException { try { File rootDirectory = createRoot(p, outputDirectory, dependentTask, ! APP_NAME.fetchFrom(p), "windowsapp-image-builder"); AbstractAppImageBuilder appBuilder = new WindowsAppImageBuilder(p, outputDirectory.toPath()); if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ) { JLinkBundlerHelper.execute(p, appBuilder); } else { --- 167,188 ---- return doBundle(p, outputDirectory, false) != null; } File doBundle(Map<String, ? super Object> p, File outputDirectory, boolean dependentTask) throws PackagerException { ! if (StandardBundlerParam.isRuntimeInstaller(p)) { ! return PREDEFINED_RUNTIME_IMAGE.fetchFrom(p); } else { return doAppBundle(p, outputDirectory, dependentTask); } } File doAppBundle(Map<String, ? super Object> p, File outputDirectory, boolean dependentTask) throws PackagerException { try { File rootDirectory = createRoot(p, outputDirectory, dependentTask, ! APP_NAME.fetchFrom(p)); AbstractAppImageBuilder appBuilder = new WindowsAppImageBuilder(p, outputDirectory.toPath()); if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ) { JLinkBundlerHelper.execute(p, appBuilder); } else {
< prev index next >