8215574: Investigate and document usage of --category, --copyright, --vendor and --description JDK-8200758-branch
authorherrick
Mon, 11 Mar 2019 13:31:48 -0400
branchJDK-8200758-branch
changeset 57255 f686bda3b831
parent 57254 c1b92a014e89
child 57256 d7c27451f759
8215574: Investigate and document usage of --category, --copyright, --vendor and --description Submitten-by: almatvee Reviewed-by: herrick
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.control
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.desktop
src/jdk.jpackage/share/classes/jdk/jpackage/internal/BundleParams.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.iss
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.wxs
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.wxs
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxDebBundler.java	Mon Mar 11 13:31:48 2019 -0400
@@ -143,7 +143,7 @@
             new StandardBundlerParam<> (
             I18N.getString("param.maintainer-email.name"),
             I18N.getString("param.maintainer-email.description"),
-            BundleParams.PARAM_EMAIL,
+            Arguments.CLIOptions.LINUX_DEB_MAINTAINER.getId(),
             String.class,
             params -> "Unknown",
             (s, p) -> s);
@@ -152,7 +152,7 @@
             new StandardBundlerParam<> (
             I18N.getString("param.maintainer-name.name"),
             I18N.getString("param.maintainer-name.description"),
-            Arguments.CLIOptions.LINUX_DEB_MAINTAINER.getId(),
+            BundleParams.PARAM_MAINTAINER,
             String.class,
             params -> VENDOR.fetchFrom(params) + " <"
                     + EMAIL.fetchFrom(params) + ">",
@@ -747,7 +747,6 @@
         data.put("XDG_PREFIX", XDG_FILE_PREFIX.fetchFrom(params));
         data.put("DEPLOY_BUNDLE_CATEGORY", CATEGORY.fetchFrom(params));
         data.put("APPLICATION_DESCRIPTION", DESCRIPTION.fetchFrom(params));
-        data.put("APPLICATION_SUMMARY", TITLE.fetchFrom(params));
         data.put("APPLICATION_COPYRIGHT", COPYRIGHT.fetchFrom(params));
         data.put("APPLICATION_LICENSE_TEXT", LICENSE_TEXT.fetchFrom(params));
         data.put("APPLICATION_ARCH", getArch());
@@ -862,7 +861,6 @@
                 EMAIL,
                 ICON_PNG,
                 LICENSE_FILE,
-                TITLE,
                 VENDOR
         );
     }
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxRpmBundler.java	Mon Mar 11 13:31:48 2019 -0400
@@ -588,7 +588,7 @@
         data.put("DEPLOY_BUNDLE_CATEGORY", CATEGORY.fetchFrom(params));
         // TODO rpm categories
         data.put("APPLICATION_DESCRIPTION", DESCRIPTION.fetchFrom(params));
-        data.put("APPLICATION_SUMMARY", TITLE.fetchFrom(params));
+        data.put("APPLICATION_SUMMARY", APP_NAME.fetchFrom(params));
         data.put("APPLICATION_LICENSE_TYPE", LICENSE_TYPE.fetchFrom(params));
         data.put("APPLICATION_LICENSE_FILE", getLicenseFileString(params));
         String deps = LINUX_PACKAGE_DEPENDENCIES.fetchFrom(params);
@@ -696,7 +696,6 @@
                 LinuxAppBundler.ICON_PNG,
                 LICENSE_FILE,
                 LICENSE_TYPE,
-                TITLE,
                 VENDOR
         );
     }
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.control	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.control	Mon Mar 11 13:31:48 2019 -0400
@@ -5,6 +5,6 @@
 Priority: optional
 Architecture: APPLICATION_ARCH
 Provides: APPLICATION_PACKAGE
-Description: APPLICATION_SUMMARY
+Description: APPLICATION_DESCRIPTION
 Installed-Size: APPLICATION_INSTALLED_SIZE
 PACKAGE_DEPENDENCIES
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.desktop	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.desktop	Mon Mar 11 13:31:48 2019 -0400
@@ -1,6 +1,6 @@
 [Desktop Entry]
 Name=APPLICATION_NAME
-Comment=APPLICATION_SUMMARY
+Comment=APPLICATION_DESCRIPTION
 Exec=INSTALLATION_DIRECTORY/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME
 Icon=INSTALLATION_DIRECTORY/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.png
 Terminal=false
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BundleParams.java	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/BundleParams.java	Mon Mar 11 13:31:48 2019 -0400
@@ -58,6 +58,9 @@
     // String - email name and email, only used for debian */
     public static final String PARAM_EMAIL              = "email";
 
+    // String - vendor <email>, only used for debian */
+    public static final String PARAM_MAINTAINER         = "maintainer";
+
     /* String - Copyright. Used on Mac */
     public static final String PARAM_COPYRIGHT          = "copyright";
 
@@ -78,9 +81,6 @@
     // Value is platform specific
     public static final String PARAM_CATEGORY       = "applicationCategory";
 
-    // String - Optional short application
-    public static final String PARAM_TITLE              = "title";
-
     // String - Optional application description. Used by MSI and on Linux
     public static final String PARAM_DESCRIPTION        = "description";
 
@@ -190,14 +190,6 @@
         return fetchParam(PREFERENCES_ID);
     }
 
-    public String getTitle() {
-        return fetchParam(TITLE);
-    }
-
-    public void setTitle(String title) {
-        putUnlessNull(PARAM_TITLE, title);
-    }
-
     public String getApplicationClass() {
         return fetchParam(MAIN_CLASS);
     }
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java	Mon Mar 11 13:31:48 2019 -0400
@@ -53,7 +53,6 @@
     final List<RelativeFileSet> resources = new ArrayList<>();
 
     String id;
-    String title;
     String vendor;
     String email;
     String description;
@@ -184,10 +183,6 @@
         this.params = params;
     }
 
-    void setTitle(String title) {
-        this.title = title;
-    }
-
     void setVendor(String vendor) {
         this.vendor = vendor;
     }
@@ -289,10 +284,10 @@
 
     static void validateName(String s, boolean forApp)
             throws PackagerException {
-        
+
         String exceptionKey = forApp ?
             "ERR_InvalidAppName" : "ERR_InvalidSLName";
-        
+
         if (s == null) {
             if (forApp) {
                 return;
@@ -529,7 +524,6 @@
         bundleParams.setCopyright(copyright);
         bundleParams.setApplicationCategory(category);
         bundleParams.setDescription(description);
-        bundleParams.setTitle(title);
 
         bundleParams.setJvmargs(jvmargs);
         bundleParams.setArguments(arguments);
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java	Mon Mar 11 13:31:48 2019 -0400
@@ -289,16 +289,6 @@
                     (s, p) -> Arrays.asList(s.split("\n\n"))
             );
 
-    static final StandardBundlerParam<String> TITLE =
-            new StandardBundlerParam<>(
-                    I18N.getString("param.title.name"),
-                    I18N.getString("param.title.description"),
-                    BundleParams.PARAM_TITLE,
-                    String.class,
-                    APP_NAME::fetchFrom,
-                    (s, p) -> s
-            );
-
     // note that each bundler is likely to replace this one with
     // their own converter
     static final StandardBundlerParam<String> VERSION =
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java	Mon Mar 11 13:31:48 2019 -0400
@@ -183,7 +183,6 @@
                 MENU_HINT,
                 SHORTCUT_HINT,
                 EXE_SYSTEM_WIDE,
-                TITLE,
                 VENDOR,
                 INSTALLDIR_CHOOSER
         );
@@ -241,7 +240,6 @@
                     COPYRIGHT,
                     DESCRIPTION,
                     MENU_GROUP,
-                    TITLE,
                     VENDOR,
                     VERSION)
             ) {
@@ -501,7 +499,6 @@
         data.put("APPLICATION_MENU_SHORTCUT",
                 MENU_HINT.fetchFrom(p) ? "returnTrue" : "returnFalse");
         validateValueAndPut(data, "APPLICATION_GROUP", MENU_GROUP, p);
-        validateValueAndPut(data, "APPLICATION_COMMENTS", TITLE, p);
         validateValueAndPut(data, "APPLICATION_COPYRIGHT", COPYRIGHT, p);
 
         data.put("APPLICATION_LICENSE_FILE",
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.iss	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.iss	Mon Mar 11 13:31:48 2019 -0400
@@ -6,8 +6,10 @@
 AppVersion=APPLICATION_VERSION
 AppVerName=INSTALLER_NAME APPLICATION_VERSION
 AppPublisher=APPLICATION_VENDOR
-AppComments=APPLICATION_COMMENTS
+AppComments=APPLICATION_DESCRIPTION
 AppCopyright=APPLICATION_COPYRIGHT
+VersionInfoVersion=APPLICATION_VERSION
+VersionInfoDescription=APPLICATION_DESCRIPTION
 DefaultDirName=APPLICATION_INSTALL_ROOT\INSTALLER_NAME
 DisableStartupPrompt=Yes
 DisableDirPage=DISABLE_DIR_PAGE
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.iss	Mon Mar 11 13:31:48 2019 -0400
@@ -6,8 +6,10 @@
 AppVersion=APPLICATION_VERSION
 AppVerName=INSTALLER_NAME APPLICATION_VERSION
 AppPublisher=APPLICATION_VENDOR
-AppComments=APPLICATION_COMMENTS
+AppComments=APPLICATION_DESCRIPTION
 AppCopyright=APPLICATION_COPYRIGHT
+VersionInfoVersion=APPLICATION_VERSION
+VersionInfoDescription=APPLICATION_DESCRIPTION
 DefaultDirName=APPLICATION_INSTALL_ROOT\INSTALLER_NAME
 DisableStartupPrompt=Yes
 DisableDirPage=DISABLE_DIR_PAGE
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.wxs	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.jre.wxs	Mon Mar 11 13:31:48 2019 -0400
@@ -5,7 +5,8 @@
              Language="1033" Version="APPLICATION_VERSION"
              Manufacturer="APPLICATION_VENDOR"
              UpgradeCode="PRODUCT_UPGRADE_GUID">
-        <Package Description="APPLICATION_DESCRIPTION" Comments="None"
+        <Package Description="APPLICATION_DESCRIPTION"
+                 Manufacturer="APPLICATION_VENDOR"
                  InstallerVersion="200" Compressed="yes"
                  InstallScope="INSTALL_SCOPE" Platform="PLATFORM"/>
         <Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.wxs	Mon Mar 11 13:24:47 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.wxs	Mon Mar 11 13:31:48 2019 -0400
@@ -5,7 +5,8 @@
              Language="1033" Version="APPLICATION_VERSION"
              Manufacturer="APPLICATION_VENDOR"
              UpgradeCode="PRODUCT_UPGRADE_GUID">
-        <Package Description="APPLICATION_DESCRIPTION" Comments="None"
+        <Package Description="APPLICATION_DESCRIPTION"
+                 Manufacturer="APPLICATION_VENDOR"
                  InstallerVersion="200" Compressed="yes"
                  InstallScope="INSTALL_SCOPE" Platform="PLATFORM"/>
         <Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />