8221256: Fix create-installer specific options on MAC JDK-8200758-branch
authorherrick
Tue, 26 Mar 2019 19:03:24 -0400
branchJDK-8200758-branch
changeset 57286 2ee6dedec44f
parent 57285 c7f237482015
child 57287 90fa9a095959
8221256: Fix create-installer specific options on MAC Reviewed-by: almatvee
src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java	Tue Mar 26 15:25:13 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java	Tue Mar 26 19:03:24 2019 -0400
@@ -55,8 +55,8 @@
             switch (platform) {
                 case MAC:
                     types = "{\"pkg\", \"dmg\"}";
-		    pLaunchOptions = "";
-                    pInstallOptions = I18N.getString("MSG_Help_mac_install");
+		    pLaunchOptions = I18N.getString("MSG_Help_mac_launcher");
+                    pInstallOptions = "";
                     pInstallDir
                             = I18N.getString("MSG_Help_mac_linux_install_dir");
                     break;
@@ -77,9 +77,9 @@
                 default:
                     types =
                       "{\"exe\", \"msi\", \"rpm\", \"deb\", \"pkg\", \"dmg\"}";
-		    pLaunchOptions = I18N.getString("MSG_Help_win_launcher");
+		    pLaunchOptions = I18N.getString("MSG_Help_win_launcher")
+		            + I18N.getString("MSG_Help_mac_launcher");
                     pInstallOptions = I18N.getString("MSG_Help_win_install")
-                            + I18N.getString("MSG_Help_mac_install")
                             + I18N.getString("MSG_Help_linux_install");
                     pInstallDir
                             = I18N.getString("MSG_Help_default_install_dir");
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java	Tue Mar 26 15:25:13 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java	Tue Mar 26 19:03:24 2019 -0400
@@ -86,10 +86,11 @@
 
         options.put(CLIOptions.INSTALLER_TYPE.getId(), USE.INSTALL);
         options.put(CLIOptions.LICENSE_FILE.getId(), USE.INSTALL);
-        options.put(CLIOptions.FILE_ASSOCIATIONS.getId(), USE.INSTALL);
         options.put(CLIOptions.INSTALL_DIR.getId(), USE.INSTALL);
         options.put(CLIOptions.PREDEFINED_APP_IMAGE.getId(), USE.INSTALL);
-        options.put(CLIOptions.INSTALLER_TYPE.getId(), USE.INSTALL);
+
+        options.put(CLIOptions.FILE_ASSOCIATIONS.getId(), 
+            (Platform.getPlatform() == Platform.MAC) ?  USE.ALL : USE.INSTALL);
 
         if (Platform.getPlatform() == Platform.WINDOWS) {
             options.put(CLIOptions.WIN_CONSOLE_HINT.getId(), USE.LAUNCHER);
@@ -105,16 +106,16 @@
         }
 
         if (Platform.getPlatform() == Platform.MAC) {
-            options.put(CLIOptions.MAC_SIGN.getId(), USE.INSTALL);
-            options.put(CLIOptions.MAC_BUNDLE_NAME.getId(), USE.INSTALL);
-            options.put(CLIOptions.MAC_BUNDLE_IDENTIFIER.getId(), USE.INSTALL);
+            options.put(CLIOptions.MAC_SIGN.getId(), USE.ALL);
+            options.put(CLIOptions.MAC_BUNDLE_NAME.getId(), USE.ALL);
+            options.put(CLIOptions.MAC_BUNDLE_IDENTIFIER.getId(), USE.ALL);
             options.put(CLIOptions.MAC_BUNDLE_SIGNING_PREFIX.getId(),
-                        USE.INSTALL);
-            options.put(CLIOptions.MAC_SIGNING_KEY_NAME.getId(), USE.INSTALL);
-            options.put(CLIOptions.MAC_SIGNING_KEYCHAIN.getId(), USE.INSTALL);
-            options.put(CLIOptions.MAC_APP_STORE_CATEGORY.getId(), USE.INSTALL);
+                        USE.ALL);
+            options.put(CLIOptions.MAC_SIGNING_KEY_NAME.getId(), USE.ALL);
+            options.put(CLIOptions.MAC_SIGNING_KEYCHAIN.getId(), USE.ALL);
+            options.put(CLIOptions.MAC_APP_STORE_CATEGORY.getId(), USE.ALL);
             options.put(CLIOptions.MAC_APP_STORE_ENTITLEMENTS.getId(),
-                        USE.INSTALL);
+                        USE.ALL);
         }
 
         if (Platform.getPlatform() == Platform.LINUX) {
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties	Tue Mar 26 15:25:13 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties	Tue Mar 26 19:03:24 2019 -0400
@@ -218,7 +218,7 @@
 MSG_Help_win_install_dir=\
 \Relative sub-path under the default installation location\n\
 
-MSG_Help_mac_install=\
+MSG_Help_mac_launcher=\
 \  --mac-bundle-identifier <ID string>\n\
 \          An identifier that uniquely identifies the application for MacOSX\n\
 \          (and on the Mac App Store)\n\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties	Tue Mar 26 15:25:13 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties	Tue Mar 26 19:03:24 2019 -0400
@@ -218,7 +218,7 @@
 MSG_Help_win_install_dir=\
 \Relative sub-path under the default installation location\n\
 
-MSG_Help_mac_install=\
+MSG_Help_mac_launcher=\
 \  --mac-bundle-identifier <ID string>\n\
 \          An identifier that uniquely identifies the application for MacOSX\n\
 \          (and on the Mac App Store)\n\
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties	Tue Mar 26 15:25:13 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties	Tue Mar 26 19:03:24 2019 -0400
@@ -218,7 +218,7 @@
 MSG_Help_win_install_dir=\
 \Relative sub-path under the default installation location\n\
 
-MSG_Help_mac_install=\
+MSG_Help_mac_launcher=\
 \  --mac-bundle-identifier <ID string>\n\
 \          An identifier that uniquely identifies the application for MacOSX\n\
 \          (and on the Mac App Store)\n\