< prev index next >
src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java
Print this page
@@ -55,11 +55,10 @@
String id;
String title;
String vendor;
String email;
String description;
- String category;
String licenseType;
String copyright;
String version;
Boolean systemWide;
Boolean serviceHint;
@@ -72,11 +71,10 @@
List<String> arguments; //unnamed arguments
// Java 9 modules support
String addModules = null;
String limitModules = null;
- Boolean stripNativeCommands = null;
String modulePath = null;
String module = null;
String debugPort = null;
File outdir = null;
@@ -88,14 +86,10 @@
List<String> jvmargs = new LinkedList<>();
// raw arguments to the bundler
Map<String, ? super Object> bundlerArguments = new LinkedHashMap<>();
- void setCategory(String category) {
- this.category = category;
- }
-
void setLicenseType(String licenseType) {
this.licenseType = licenseType;
}
void setCopyright(String copyright) {
@@ -166,14 +160,10 @@
void setDebug(String value) {
this.debugPort = value;
}
- void setStripNativeCommands(boolean value) {
- this.stripNativeCommands = value;
- }
-
void setDescription(String description) {
this.description = description;
}
public void setAppId(String id) {
@@ -337,11 +327,11 @@
throw new PackagerException("ERR_MissingArgument", "--output");
}
boolean hasModule = (bundlerArguments.get(
Arguments.CLIOptions.MODULE.getId()) != null);
- boolean hasImage = (bundlerArguments.get(
+ boolean hasAppImage = (bundlerArguments.get(
Arguments.CLIOptions.PREDEFINED_APP_IMAGE.getId()) != null);
boolean hasClass = (bundlerArguments.get(
Arguments.CLIOptions.APPCLASS.getId()) != null);
boolean hasMain = (bundlerArguments.get(
Arguments.CLIOptions.MAIN_JAR.getId()) != null);
@@ -349,14 +339,12 @@
Arguments.CLIOptions.PREDEFINED_RUNTIME_IMAGE.getId()) != null);
boolean hasInput = (bundlerArguments.get(
Arguments.CLIOptions.INPUT.getId()) != null);
boolean hasModulePath = (bundlerArguments.get(
Arguments.CLIOptions.MODULE_PATH.getId()) != null);
- boolean hasAppImage = (bundlerArguments.get(
- Arguments.CLIOptions.PREDEFINED_APP_IMAGE.getId()) != null);
- boolean runtimeInstaller = (bundlerArguments.get(
- Arguments.CLIOptions.RUNTIME_INSTALLER.getId()) != null);
+ boolean runtimeInstaller = (BundlerType.INSTALLER == getBundleType()) &&
+ !hasAppImage && !hasModule && !hasMain && hasRuntimeImage;
if (getBundleType() == BundlerType.IMAGE) {
// Module application requires --runtime-image or --module-path
if (hasModule) {
if (!hasModulePath && !hasRuntimeImage) {
@@ -385,11 +373,11 @@
}
}
// if bundling non-modular image, or installer without app-image
// then we need some resources and a main class
- if (!hasModule && !hasImage && !runtimeInstaller) {
+ if (!hasModule && !hasAppImage && !runtimeInstaller) {
if (resources.isEmpty()) {
throw new PackagerException("ERR_MissingAppResources");
}
if (!hasClass) {
throw new PackagerException("ERR_MissingArgument",
@@ -413,13 +401,13 @@
if (!appImageDir.exists() || appImageDir.list().length == 0) {
throw new PackagerException("ERR_AppImageNotExist", appImage);
}
}
- // Validate build-root
+ // Validate temp-root
String root = (String)bundlerArguments.get(
- Arguments.CLIOptions.BUILD_ROOT.getId());
+ Arguments.CLIOptions.TEMP_ROOT.getId());
if (root != null) {
String [] contents = (new File(root)).list();
if (contents != null && contents.length > 0) {
throw new PackagerException("ERR_BuildRootInvalid", root);
@@ -525,11 +513,10 @@
bundleParams.setBundleFormat(targetFormat);
bundleParams.setVendor(vendor);
bundleParams.setEmail(email);
bundleParams.setInstalldirChooser(installdirChooser);
bundleParams.setCopyright(copyright);
- bundleParams.setApplicationCategory(category);
bundleParams.setDescription(description);
bundleParams.setTitle(title);
bundleParams.setJvmargs(jvmargs);
bundleParams.setArguments(arguments);
@@ -540,14 +527,10 @@
if (limitModules != null && !limitModules.isEmpty()) {
bundleParams.setLimitModules(limitModules);
}
- if (stripNativeCommands != null) {
- bundleParams.setStripNativeCommands(stripNativeCommands);
- }
-
if (modulePath != null && !modulePath.isEmpty()) {
bundleParams.setModulePath(modulePath);
}
if (module != null && !module.isEmpty()) {
< prev index next >