changeset 5641:58064c5894fa

RT-34080: Backout Multiple package types - cause issue with SceneBuilder [mhowe]
author mhowe
date Tue, 05 Nov 2013 13:09:28 -0800
parents 3828bec01c12
children 170a4c3af374
files modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/BundleParams.java modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/Bundler.java modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/LinuxDebBundler.java modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/LinuxRPMBundler.java modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/MacDMGBundler.java modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/WinExeBundler.java modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/WinMsiBundler.java
diffstat 7 files changed, 8 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/BundleParams.java	Tue Nov 05 13:07:00 2013 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/BundleParams.java	Tue Nov 05 13:09:28 2013 -0800
@@ -35,7 +35,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.TreeSet;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
@@ -45,7 +44,7 @@
     RelativeFileSet runtime;
     RelativeFileSet appResources;
     Bundler.BundleType type;
-    Set<String> bundleFormat = new TreeSet<String>();
+    String bundleFormat;
     File icon;
 
     /* Name of bundle file and native launcher.
@@ -195,16 +194,7 @@
     }
 
     public void setBundleFormat(String t) {
-        bundleFormat.clear();
-        if (t != null) {
-            if (t.startsWith("[") && t.endsWith("]")) {
-                t = t.substring(1, t.length() - 1);
-            }
-            for (String s : t.split(",")) {
-                if (s.isEmpty()) continue;
-                bundleFormat.add(s.trim());
-            }
-        }
+        bundleFormat = t;
     }
 
     private boolean shouldExclude(File baseDir, File f, Rule ruleset[]) {
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/Bundler.java	Tue Nov 05 13:07:00 2013 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/Bundler.java	Tue Nov 05 13:09:28 2013 -0800
@@ -106,7 +106,7 @@
         } catch (IOException ioe) {}
 
         Log.verbose("Looking for bundlers for type=" + p.type.toString()
-                + " format=" + (p.bundleFormat.isEmpty() ? "any" : p.bundleFormat.toString()));
+                + " format=" + (p.bundleFormat != null ? p.bundleFormat : "any"));
         for (Bundler b: knownBundlers) {
             if (verbose) {
                 b.setVerbose(true);
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/LinuxDebBundler.java	Tue Nov 05 13:07:00 2013 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/LinuxDebBundler.java	Tue Nov 05 13:09:28 2013 -0800
@@ -91,7 +91,7 @@
     @Override
     boolean validate(BundleParams p) throws Bundler.UnsupportedPlatformException, Bundler.ConfigException {
         if (!(p.type == Bundler.BundleType.ALL || p.type == Bundler.BundleType.INSTALLER)
-                 || !(p.bundleFormat.isEmpty() || p.bundleFormat.contains("deb"))) {
+                 || !(p.bundleFormat == null || "deb".equals(p.bundleFormat))) {
             return false;
         }
         //run basic validation to ensure requirements are met
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/LinuxRPMBundler.java	Tue Nov 05 13:07:00 2013 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/LinuxRPMBundler.java	Tue Nov 05 13:09:28 2013 -0800
@@ -86,7 +86,7 @@
     @Override
     boolean validate(BundleParams p) throws Bundler.UnsupportedPlatformException, Bundler.ConfigException {
         if (!(p.type == Bundler.BundleType.ALL || p.type == Bundler.BundleType.INSTALLER)
-                 || !(p.bundleFormat.isEmpty() || p.bundleFormat.contains("rpm"))) {
+                 || !(p.bundleFormat == null || "rpm".equals(p.bundleFormat))) {
             return false;
         }
         //run basic validation to ensure requirements are met
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/MacDMGBundler.java	Tue Nov 05 13:07:00 2013 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/MacDMGBundler.java	Tue Nov 05 13:09:28 2013 -0800
@@ -62,7 +62,7 @@
     boolean validate(BundleParams p)
             throws UnsupportedPlatformException, ConfigException {
         if (!(p.type == Bundler.BundleType.ALL || p.type == Bundler.BundleType.INSTALLER)
-                 || !(p.bundleFormat.isEmpty() || p.bundleFormat.contains("dmg"))) {
+                 || !(p.bundleFormat == null || "dmg".equals(p.bundleFormat))) {
             return false;
         }
         //run basic validation to ensure requirements are met
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/WinExeBundler.java	Tue Nov 05 13:07:00 2013 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/WinExeBundler.java	Tue Nov 05 13:09:28 2013 -0800
@@ -104,7 +104,7 @@
     @Override
     boolean validate(BundleParams p) throws Bundler.UnsupportedPlatformException, Bundler.ConfigException {
         if (!(p.type == Bundler.BundleType.ALL || p.type == Bundler.BundleType.INSTALLER)
-                 || !(p.bundleFormat.isEmpty() || p.bundleFormat.contains("exe"))) {
+                 || !(p.bundleFormat == null || "exe".equals(p.bundleFormat))) {
             return false;
         }
         //run basic validation to ensure requirements are met
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/WinMsiBundler.java	Tue Nov 05 13:07:00 2013 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/WinMsiBundler.java	Tue Nov 05 13:09:28 2013 -0800
@@ -104,7 +104,7 @@
     @Override
     boolean validate(BundleParams p) throws UnsupportedPlatformException, ConfigException {
         if (!(p.type == Bundler.BundleType.ALL || p.type == Bundler.BundleType.INSTALLER)
-                 || !(p.bundleFormat.isEmpty() || p.bundleFormat.contains("msi"))) {
+                 || !(p.bundleFormat == null || "msi".equals(p.bundleFormat))) {
             return false;
         }
         //run basic validation to ensure requirements are met