src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java
branchJDK-8200758-branch
changeset 57080 bd4ce7f9ea2c
parent 57078 db003bfc5bf7
child 57096 d06bec27f8c9
equal deleted inserted replaced
57079:c53a2eca0f57 57080:bd4ce7f9ea2c
    25 
    25 
    26 package jdk.jpackage.internal;
    26 package jdk.jpackage.internal;
    27 
    27 
    28 import java.io.File;
    28 import java.io.File;
    29 import java.nio.file.Files;
    29 import java.nio.file.Files;
       
    30 import java.text.MessageFormat;
    30 import java.util.ArrayList;
    31 import java.util.ArrayList;
    31 import java.util.Arrays;
    32 import java.util.Arrays;
    32 import java.util.Collection;
    33 import java.util.Collection;
    33 import java.util.LinkedHashMap;
    34 import java.util.LinkedHashMap;
    34 import java.util.LinkedHashSet;
    35 import java.util.LinkedHashSet;
   106         this.version = version;
   107         this.version = version;
   107     }
   108     }
   108 
   109 
   109     void setSystemWide(Boolean systemWide) {
   110     void setSystemWide(Boolean systemWide) {
   110         this.systemWide = systemWide;
   111         this.systemWide = systemWide;
   111     }
       
   112 
       
   113     void setServiceHint(Boolean serviceHint) {
       
   114         this.serviceHint = serviceHint;
       
   115     }
   112     }
   116 
   113 
   117     void setInstalldirChooser(Boolean installdirChooser) {
   114     void setInstalldirChooser(Boolean installdirChooser) {
   118         this.installdirChooser = installdirChooser;
   115         this.installdirChooser = installdirChooser;
   119     }
   116     }
   402                     + File.separator + "runtime");
   399                     + File.separator + "runtime");
   403             if (!appImageAppDir.exists() || !appImageRuntimeDir.exists()) {
   400             if (!appImageAppDir.exists() || !appImageRuntimeDir.exists()) {
   404                 throw new PackagerException("ERR_AppImageInvalid", appImage);
   401                 throw new PackagerException("ERR_AppImageInvalid", appImage);
   405             }
   402             }
   406         }
   403         }
       
   404 
       
   405         // Validate license file if set
       
   406         String license = (String)bundlerArguments.get(
       
   407                 Arguments.CLIOptions.LICENSE_FILE.getId());
       
   408         if (license != null) {
       
   409             File licenseFile = new File(license);
       
   410             if (!licenseFile.exists()) {
       
   411                 throw new PackagerException("ERR_LicenseFileNotExit");
       
   412             }
       
   413         }
   407     }
   414     }
   408 
   415 
   409     boolean validateForBundle() {
   416     boolean validateForBundle() {
   410         boolean result = false;
   417         boolean result = false;
   411 
   418 
   496         bundleParams.setAppVersion(version);
   503         bundleParams.setAppVersion(version);
   497         bundleParams.setType(bundleType);
   504         bundleParams.setType(bundleType);
   498         bundleParams.setBundleFormat(targetFormat);
   505         bundleParams.setBundleFormat(targetFormat);
   499         bundleParams.setVendor(vendor);
   506         bundleParams.setVendor(vendor);
   500         bundleParams.setEmail(email);
   507         bundleParams.setEmail(email);
   501         bundleParams.setServiceHint(serviceHint);
       
   502         bundleParams.setInstalldirChooser(installdirChooser);
   508         bundleParams.setInstalldirChooser(installdirChooser);
   503         bundleParams.setSingleton(singleton);
   509         bundleParams.setSingleton(singleton);
   504         bundleParams.setCopyright(copyright);
   510         bundleParams.setCopyright(copyright);
   505         bundleParams.setApplicationCategory(category);
   511         bundleParams.setApplicationCategory(category);
   506         bundleParams.setDescription(description);
   512         bundleParams.setDescription(description);