modules/jdk.packager/src/main/java/com/sun/javafx/tools/packager/DeployParams.java

Print this page


   1 /*
   2  * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  51 public class DeployParams extends CommonParams {
  52     public enum RunMode {
  53         WEBSTART, EMBEDDED, STANDALONE, ALL
  54     }
  55 
  56     final List<RelativeFileSet> resources = new ArrayList<>();
  57 
  58     String id;
  59     String title;
  60     String vendor;
  61     String email;
  62     String description;
  63     String category;
  64     String licenseType;
  65     String copyright;
  66     String version;
  67     Boolean systemWide;
  68     Boolean serviceHint;
  69     Boolean signBundle;
  70     Boolean installdirChooser;

  71 
  72     String applicationClass;
  73     String preloader;
  74 
  75     List<Param> params;
  76     List<HtmlParam> htmlParams;
  77     List<String> arguments; //unnamed arguments
  78 
  79     // Java 9 modules support
  80     String addModules = null;
  81     String limitModules = null;
  82     Boolean stripNativeCommands = null;
  83     Boolean detectmods = null;
  84     String modulePath = null;
  85     String module = null;
  86     String debugPort = null;
  87     String srcdir;
  88 
  89     int width;
  90     int height;


 163     public void setCopyright(String copyright) {
 164         this.copyright = copyright;
 165     }
 166 
 167     public void setVersion(String version) {
 168         this.version = version;
 169     }
 170 
 171     public void setSystemWide(Boolean systemWide) {
 172         this.systemWide = systemWide;
 173     }
 174 
 175     public void setServiceHint(Boolean serviceHint) {
 176         this.serviceHint = serviceHint;
 177     }
 178 
 179     public void setInstalldirChooser(Boolean installdirChooser) {
 180         this.installdirChooser = installdirChooser;
 181     }
 182 




 183     public void setSignBundle(Boolean signBundle) {
 184         this.signBundle = signBundle;
 185     }
 186 
 187     public void setJRE(String v) {
 188         jrePlatform = v;
 189     }
 190 
 191     public void setSwingAppWithEmbeddedJavaFX(boolean v) {
 192         isSwingApp = v;
 193     }
 194 
 195     public void setNeedInstall(boolean b) {
 196         needInstall = b;
 197     }
 198 
 199     public void setOfflineAllowed(boolean b) {
 200         offlineAllowed = b;
 201     }
 202 


 669 
 670         bundleParams.setIdentifier(id);
 671 
 672         if (javaRuntimeWasSet) {
 673             bundleParams.setRuntime(javaRuntimeToUse);
 674         }
 675         bundleParams.setApplicationClass(applicationClass);
 676         bundleParams.setPrelaoderClass(preloader);
 677         bundleParams.setName(this.appName);
 678         bundleParams.setAppVersion(version);
 679         bundleParams.setType(bundleType);
 680         bundleParams.setBundleFormat(targetFormat);
 681         bundleParams.setVendor(vendor);
 682         bundleParams.setEmail(email);
 683         bundleParams.setShortcutHint(needShortcut);
 684         bundleParams.setMenuHint(needMenu);
 685         putUnlessNull(INSTALL_HINT.getID(), needInstall);
 686         bundleParams.setSystemWide(systemWide);
 687         bundleParams.setServiceHint(serviceHint);
 688         bundleParams.setInstalldirChooser(installdirChooser);

 689         bundleParams.setSignBundle(signBundle);
 690         bundleParams.setCopyright(copyright);
 691         bundleParams.setApplicationCategory(category);
 692         bundleParams.setLicenseType(licenseType);
 693         bundleParams.setDescription(description);
 694         bundleParams.setTitle(title);
 695         if (verbose) bundleParams.setVerbose(true);
 696 
 697         bundleParams.setJvmProperties(properties);
 698         bundleParams.setJvmargs(jvmargs);
 699         bundleParams.setJvmUserArgs(jvmUserArgs);
 700         bundleParams.setArguments(arguments);
 701 
 702         if (addModules != null && !addModules.isEmpty()) {
 703             bundleParams.setAddModules(addModules);
 704         }
 705 
 706         if (limitModules != null && !limitModules.isEmpty()) {
 707             bundleParams.setLimitModules(limitModules);
 708         }


   1 /*
   2  * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  51 public class DeployParams extends CommonParams {
  52     public enum RunMode {
  53         WEBSTART, EMBEDDED, STANDALONE, ALL
  54     }
  55 
  56     final List<RelativeFileSet> resources = new ArrayList<>();
  57 
  58     String id;
  59     String title;
  60     String vendor;
  61     String email;
  62     String description;
  63     String category;
  64     String licenseType;
  65     String copyright;
  66     String version;
  67     Boolean systemWide;
  68     Boolean serviceHint;
  69     Boolean signBundle;
  70     Boolean installdirChooser;
  71     Boolean singleton;
  72 
  73     String applicationClass;
  74     String preloader;
  75 
  76     List<Param> params;
  77     List<HtmlParam> htmlParams;
  78     List<String> arguments; //unnamed arguments
  79 
  80     // Java 9 modules support
  81     String addModules = null;
  82     String limitModules = null;
  83     Boolean stripNativeCommands = null;
  84     Boolean detectmods = null;
  85     String modulePath = null;
  86     String module = null;
  87     String debugPort = null;
  88     String srcdir;
  89 
  90     int width;
  91     int height;


 164     public void setCopyright(String copyright) {
 165         this.copyright = copyright;
 166     }
 167 
 168     public void setVersion(String version) {
 169         this.version = version;
 170     }
 171 
 172     public void setSystemWide(Boolean systemWide) {
 173         this.systemWide = systemWide;
 174     }
 175 
 176     public void setServiceHint(Boolean serviceHint) {
 177         this.serviceHint = serviceHint;
 178     }
 179 
 180     public void setInstalldirChooser(Boolean installdirChooser) {
 181         this.installdirChooser = installdirChooser;
 182     }
 183 
 184     public void setSingleton(Boolean singleton) {
 185         this.singleton = singleton;
 186     }
 187 
 188     public void setSignBundle(Boolean signBundle) {
 189         this.signBundle = signBundle;
 190     }
 191 
 192     public void setJRE(String v) {
 193         jrePlatform = v;
 194     }
 195 
 196     public void setSwingAppWithEmbeddedJavaFX(boolean v) {
 197         isSwingApp = v;
 198     }
 199 
 200     public void setNeedInstall(boolean b) {
 201         needInstall = b;
 202     }
 203 
 204     public void setOfflineAllowed(boolean b) {
 205         offlineAllowed = b;
 206     }
 207 


 674 
 675         bundleParams.setIdentifier(id);
 676 
 677         if (javaRuntimeWasSet) {
 678             bundleParams.setRuntime(javaRuntimeToUse);
 679         }
 680         bundleParams.setApplicationClass(applicationClass);
 681         bundleParams.setPrelaoderClass(preloader);
 682         bundleParams.setName(this.appName);
 683         bundleParams.setAppVersion(version);
 684         bundleParams.setType(bundleType);
 685         bundleParams.setBundleFormat(targetFormat);
 686         bundleParams.setVendor(vendor);
 687         bundleParams.setEmail(email);
 688         bundleParams.setShortcutHint(needShortcut);
 689         bundleParams.setMenuHint(needMenu);
 690         putUnlessNull(INSTALL_HINT.getID(), needInstall);
 691         bundleParams.setSystemWide(systemWide);
 692         bundleParams.setServiceHint(serviceHint);
 693         bundleParams.setInstalldirChooser(installdirChooser);
 694         bundleParams.setSingleton(singleton);
 695         bundleParams.setSignBundle(signBundle);
 696         bundleParams.setCopyright(copyright);
 697         bundleParams.setApplicationCategory(category);
 698         bundleParams.setLicenseType(licenseType);
 699         bundleParams.setDescription(description);
 700         bundleParams.setTitle(title);
 701         if (verbose) bundleParams.setVerbose(true);
 702 
 703         bundleParams.setJvmProperties(properties);
 704         bundleParams.setJvmargs(jvmargs);
 705         bundleParams.setJvmUserArgs(jvmUserArgs);
 706         bundleParams.setArguments(arguments);
 707 
 708         if (addModules != null && !addModules.isEmpty()) {
 709             bundleParams.setAddModules(addModules);
 710         }
 711 
 712         if (limitModules != null && !limitModules.isEmpty()) {
 713             bundleParams.setLimitModules(limitModules);
 714         }