< prev index next >

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

Print this page




  52         }
  53     }
  54 
  55     // to be used by chained bundlers, e.g. by EXE bundler to avoid
  56     // skipping validation if p.type does not include "image"
  57     private boolean doValidate(Map<String, ? super Object> p)
  58             throws ConfigException {
  59 
  60         imageBundleValidation(p);
  61         return true;
  62     }
  63 
  64     public boolean bundle(Map<String, ? super Object> p, File outputDirectory)
  65             throws PackagerException {
  66         return doBundle(p, outputDirectory, false) != null;
  67     }
  68 
  69     File doBundle(Map<String, ? super Object> p, File outputDirectory,
  70             boolean dependentTask) throws PackagerException {
  71         if (StandardBundlerParam.isRuntimeInstaller(p)) {
  72             return PREDEFINED_RUNTIME_IMAGE.fetchFrom(p);
  73         } else {
  74             return doAppBundle(p, outputDirectory, dependentTask);
  75         }
  76     }
  77 
  78     File doAppBundle(Map<String, ? super Object> p, File outputDirectory,
  79             boolean dependentTask) throws PackagerException {
  80         try {
  81             File rootDirectory = createRoot(p, outputDirectory, dependentTask,
  82                     APP_NAME.fetchFrom(p));
  83             AbstractAppImageBuilder appBuilder =
  84                     new WindowsAppImageBuilder(p, outputDirectory.toPath());
  85             if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ) {
  86                 JLinkBundlerHelper.execute(p, appBuilder);
  87             } else {
  88                 StandardBundlerParam.copyPredefinedRuntimeImage(p, appBuilder);
  89             }
  90             if (!dependentTask) {
  91                 Log.verbose(MessageFormat.format(
  92                         I18N.getString("message.result-dir"),




  52         }
  53     }
  54 
  55     // to be used by chained bundlers, e.g. by EXE bundler to avoid
  56     // skipping validation if p.type does not include "image"
  57     private boolean doValidate(Map<String, ? super Object> p)
  58             throws ConfigException {
  59 
  60         imageBundleValidation(p);
  61         return true;
  62     }
  63 
  64     public boolean bundle(Map<String, ? super Object> p, File outputDirectory)
  65             throws PackagerException {
  66         return doBundle(p, outputDirectory, false) != null;
  67     }
  68 
  69     File doBundle(Map<String, ? super Object> p, File outputDirectory,
  70             boolean dependentTask) throws PackagerException {
  71         if (StandardBundlerParam.isRuntimeInstaller(p)) {
  72             return StandardBundlerParam.getPredefinedRuntime(p);
  73         } else {
  74             return doAppBundle(p, outputDirectory, dependentTask);
  75         }
  76     }
  77 
  78     File doAppBundle(Map<String, ? super Object> p, File outputDirectory,
  79             boolean dependentTask) throws PackagerException {
  80         try {
  81             File rootDirectory = createRoot(p, outputDirectory, dependentTask,
  82                     APP_NAME.fetchFrom(p));
  83             AbstractAppImageBuilder appBuilder =
  84                     new WindowsAppImageBuilder(p, outputDirectory.toPath());
  85             if (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ) {
  86                 JLinkBundlerHelper.execute(p, appBuilder);
  87             } else {
  88                 StandardBundlerParam.copyPredefinedRuntimeImage(p, appBuilder);
  89             }
  90             if (!dependentTask) {
  91                 Log.verbose(MessageFormat.format(
  92                         I18N.getString("message.result-dir"),


< prev index next >