modules/jdk.packager/src/main/java/com/sun/javafx/tools/packager/Main.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


 279                         } else if (arg.equalsIgnoreCase("-vendor")) {
 280                             deployParams.setVendor(nextArg(args, i++));
 281                         } else if (arg.equalsIgnoreCase("-native")) {
 282                             bundleType = BundleType.NATIVE;
 283                             String format = null; //null means ANY
 284                             if (i+1 < args.length && !args[i+1].startsWith("-")) {
 285                                 String v = args[++i];
 286                                 com.sun.javafx.tools.packager.bundlers.Bundler.Bundle bundle =
 287                                         com.sun.javafx.tools.packager.bundlers.Bundler.stringToBundle(v);
 288                                 bundleType = bundle.type;
 289                                 format = bundle.format;
 290                             }
 291                             deployParams.setBundleType(bundleType);
 292                             deployParams.setTargetFormat(format);
 293                         } else if (arg.equalsIgnoreCase("-description")) {
 294                             deployParams.setDescription(nextArg(args, i++));
 295                         } else if(arg.equalsIgnoreCase("-appclass")) {
 296                             deployParams.setApplicationClass(nextArg(args, i++));
 297                         } else if(arg.equalsIgnoreCase("-daemon")) {
 298                             deployParams.setServiceHint(true);


 299                         } else if(arg.equalsIgnoreCase("-installdirChooser")) {
 300                             deployParams.setInstalldirChooser(true);
 301                         } else if (arg.equalsIgnoreCase("-preloader")) {
 302                             deployParams.setPreloader(nextArg(args, i++));
 303                         } else if (arg.equalsIgnoreCase("-paramFile")) {
 304                             deployParams.setParams(parseParams(nextArg(args, i++)));
 305                         } else if (arg.equalsIgnoreCase("-htmlParamFile")) {
 306                             deployParams.setHtmlParams(parseHtmlParams(nextArg(args, i++)));
 307                         } else if (arg.equalsIgnoreCase("-width")) {
 308                             deployParams.setWidth(Integer.parseInt(nextArg(args, i++)));
 309                         } else if (arg.equalsIgnoreCase("-height")) {
 310                             deployParams.setHeight(Integer.parseInt(nextArg(args, i++)));
 311                         } else if (arg.equalsIgnoreCase("-name")) {
 312                             deployParams.setAppName(nextArg(args, i++));
 313                         } else if (arg.equalsIgnoreCase("-embedJNLP")) {
 314                             deployParams.setEmbedJNLP(true);
 315                         } else if (arg.equalsIgnoreCase("-embedCertificates")) {
 316                             System.err.println("-embedCertificates is deprecated");
 317                         } else if (arg.equalsIgnoreCase("-allpermissions")) {
 318                             deployParams.setAllPermissions(true);


   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


 279                         } else if (arg.equalsIgnoreCase("-vendor")) {
 280                             deployParams.setVendor(nextArg(args, i++));
 281                         } else if (arg.equalsIgnoreCase("-native")) {
 282                             bundleType = BundleType.NATIVE;
 283                             String format = null; //null means ANY
 284                             if (i+1 < args.length && !args[i+1].startsWith("-")) {
 285                                 String v = args[++i];
 286                                 com.sun.javafx.tools.packager.bundlers.Bundler.Bundle bundle =
 287                                         com.sun.javafx.tools.packager.bundlers.Bundler.stringToBundle(v);
 288                                 bundleType = bundle.type;
 289                                 format = bundle.format;
 290                             }
 291                             deployParams.setBundleType(bundleType);
 292                             deployParams.setTargetFormat(format);
 293                         } else if (arg.equalsIgnoreCase("-description")) {
 294                             deployParams.setDescription(nextArg(args, i++));
 295                         } else if(arg.equalsIgnoreCase("-appclass")) {
 296                             deployParams.setApplicationClass(nextArg(args, i++));
 297                         } else if(arg.equalsIgnoreCase("-daemon")) {
 298                             deployParams.setServiceHint(true);
 299                         } else if(arg.equalsIgnoreCase("-singleton")) {
 300                             deployParams.setSingleton(true);
 301                         } else if(arg.equalsIgnoreCase("-installdirChooser")) {
 302                             deployParams.setInstalldirChooser(true);
 303                         } else if (arg.equalsIgnoreCase("-preloader")) {
 304                             deployParams.setPreloader(nextArg(args, i++));
 305                         } else if (arg.equalsIgnoreCase("-paramFile")) {
 306                             deployParams.setParams(parseParams(nextArg(args, i++)));
 307                         } else if (arg.equalsIgnoreCase("-htmlParamFile")) {
 308                             deployParams.setHtmlParams(parseHtmlParams(nextArg(args, i++)));
 309                         } else if (arg.equalsIgnoreCase("-width")) {
 310                             deployParams.setWidth(Integer.parseInt(nextArg(args, i++)));
 311                         } else if (arg.equalsIgnoreCase("-height")) {
 312                             deployParams.setHeight(Integer.parseInt(nextArg(args, i++)));
 313                         } else if (arg.equalsIgnoreCase("-name")) {
 314                             deployParams.setAppName(nextArg(args, i++));
 315                         } else if (arg.equalsIgnoreCase("-embedJNLP")) {
 316                             deployParams.setEmbedJNLP(true);
 317                         } else if (arg.equalsIgnoreCase("-embedCertificates")) {
 318                             System.err.println("-embedCertificates is deprecated");
 319                         } else if (arg.equalsIgnoreCase("-allpermissions")) {
 320                             deployParams.setAllPermissions(true);