< prev index next >

modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/bundlers/BundleParams.java

Print this page
rev 9619 : imported patch 9-jake-fxpackager.patch

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -24,23 +24,21 @@
  */
 
 package com.sun.javafx.tools.packager.bundlers;
 
 import com.oracle.tools.packager.*;
-import com.oracle.tools.packager.linux.LinuxAppBundler;
-import com.oracle.tools.packager.mac.MacAppBundler;
-import com.oracle.tools.packager.windows.WindowsBundlerParam;
 import com.sun.javafx.tools.packager.bundlers.Bundler.BundleType;
 
 import java.io.File;
 import java.io.IOException;
 import java.util.*;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 
 import static com.oracle.tools.packager.StandardBundlerParam.*;
+import static com.oracle.tools.packager.JLinkBundlerHelper.*;
 
 public class BundleParams {
 
     final protected Map<String, ? super Object> params;
 

@@ -168,10 +166,35 @@
 
     public void setArguments(List<String> arguments) {
         putUnlessNullOrEmpty(ARGUMENTS.getID(), arguments);
     }
 
+    public void setAddModules(Set<String> addModules) {
+        putUnlessNullOrEmpty(ADD_MODULES.getID(), addModules);
+    }
+
+    public void setLimitModules(Set<String> limitModules)  {
+        putUnlessNullOrEmpty(LIMIT_MODULES.getID(), limitModules);
+    }
+
+    public void setDetectModules(Boolean detectModules) {
+        putUnlessNull(DETECT_MODULES.getID(), detectModules);
+    }
+
+    public void setStripExecutables(Boolean value) {
+        putUnlessNull(STRIP_NATIVE_COMMANDS.getID(), value);
+    }
+
+    public void setAppModulePath(String appModulePath) {
+        putUnlessNull(JDK_MODULE_PATH.getID(), appModulePath);
+    }
+
+    public void setLinkModulePath(String linkModulePath) {
+        putUnlessNull(MODULE_PATH.getID(), linkModulePath);
+    }
+
+
     public String getApplicationID() {
         return fetchParam(IDENTIFIER);
     }
 
     public String getPreferencesID() {

@@ -248,27 +271,10 @@
         putUnlessNull(PARAM_INSTALLDIR_CHOOSER, b);
     }
 
     public void setSignBundle(Boolean b) { putUnlessNull(SIGN_BUNDLE.getID(), b); }
 
-    public com.oracle.tools.packager.RelativeFileSet getRuntime() {
-        return getRuntime(params);
-    }
-
-    public static com.oracle.tools.packager.RelativeFileSet getRuntime(Map<String, ? super Object> params) {
-        String os = System.getProperty("os.name").toLowerCase();
-        if (os.startsWith("linux")) {
-            return LinuxAppBundler.LINUX_RUNTIME.fetchFrom(params);
-        } else if (os.contains("os x")) {
-            return MacAppBundler.MAC_RUNTIME.fetchFrom(params);
-        } else if (os.startsWith("win")) {
-            return WindowsBundlerParam.WIN_RUNTIME.fetchFrom(params);
-        } else {
-            return null;
-        }
-    }
-
     public boolean isShortcutHint() {
         return fetchParam(SHORTCUT_HINT);
     }
 
     public void setShortcutHint(Boolean v) {
< prev index next >