aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Andy Herrick <herrick@openjdk.org> 2021-03-24 15:39:54 +0000
committerGravatar Andy Herrick <herrick@openjdk.org> 2021-03-24 15:39:54 +0000
commitdeda80f022792723edc6513a94333a7b04fffb9d (patch)
tree776cf72f6fa8c527edf8ebc35ef89bb714080f01
parent57c3f271d3f04873c3d1f6470c5fda6de1a759fc (diff)
downloadjdk-deda80f022792723edc6513a94333a7b04fffb9d.tar.gz
jdk-deda80f022792723edc6513a94333a7b04fffb9d.zip
8264057: [redo] JDK-8248904: Add support to jpackage for the Mac App Store.
Co-authored-by: Erwin Morrhey <erwin.morrhey@gluonhq.com> Reviewed-by: kcr, asemenyuk
-rw-r--r--src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppImageBuilder.java2
-rw-r--r--src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/JavaApp.png (renamed from src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/java32.png)bin4955 -> 4955 bytes
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java22
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java129
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java15
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java2
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java95
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template4
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/JavaApp.icns (renamed from src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/java.icns)bin378371 -> 378371 bytes
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties7
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties4
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties4
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/product-def.plist11
-rw-r--r--src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/sandbox.plist18
-rw-r--r--src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java8
-rw-r--r--src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java3
-rw-r--r--src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties14
-rw-r--r--src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties14
-rw-r--r--src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties14
-rw-r--r--src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsAppImageBuilder.java2
-rw-r--r--src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/JavaApp.ico (renamed from src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/java48.ico)bin25214 -> 25214 bytes
-rw-r--r--test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java6
22 files changed, 269 insertions, 105 deletions
diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppImageBuilder.java b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppImageBuilder.java
index 57f0c4feeff..4cd6376f786 100644
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppImageBuilder.java
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxAppImageBuilder.java
@@ -54,7 +54,7 @@ public class LinuxAppImageBuilder extends AbstractAppImageBuilder {
},
(s, p) -> Path.of(s));
- final static String DEFAULT_ICON = "java32.png";
+ final static String DEFAULT_ICON = "JavaApp.png";
LinuxAppImageBuilder(Path imageOutDir) {
super(imageOutDir);
diff --git a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/java32.png b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/JavaApp.png
index 0c41d652a3c..0c41d652a3c 100644
--- a/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/java32.png
+++ b/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/JavaApp.png
Binary files differ
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java
index d28a8bdadc7..ae10e64abde 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppBundler.java
@@ -31,6 +31,7 @@ import java.util.Map;
import java.util.Optional;
import static jdk.jpackage.internal.MacBaseInstallerBundler.SIGNING_KEYCHAIN;
import static jdk.jpackage.internal.MacBaseInstallerBundler.SIGNING_KEY_USER;
+import static jdk.jpackage.internal.MacAppImageBuilder.APP_STORE;
import static jdk.jpackage.internal.StandardBundlerParam.MAIN_CLASS;
import static jdk.jpackage.internal.StandardBundlerParam.VERBOSE;
import static jdk.jpackage.internal.StandardBundlerParam.VERSION;
@@ -41,7 +42,7 @@ public class MacAppBundler extends AppImageBundler {
setParamsValidator(MacAppBundler::doValidate);
}
- private static final String TEMPLATE_BUNDLE_ICON = "java.icns";
+ private static final String TEMPLATE_BUNDLE_ICON = "JavaApp.icns";
public static final BundlerParamInfo<String> MAC_CF_BUNDLE_NAME =
new StandardBundlerParam<>(
@@ -62,11 +63,20 @@ public class MacAppBundler extends AppImageBundler {
"mac.signing-key-developer-id-app",
String.class,
params -> {
- String result = MacBaseInstallerBundler.findKey(
- "Developer ID Application: ",
- SIGNING_KEY_USER.fetchFrom(params),
- SIGNING_KEYCHAIN.fetchFrom(params),
- VERBOSE.fetchFrom(params));
+ String user = SIGNING_KEY_USER.fetchFrom(params);
+ String keychain = SIGNING_KEYCHAIN.fetchFrom(params);
+ String result = null;
+ if (APP_STORE.fetchFrom(params)) {
+ result = MacBaseInstallerBundler.findKey(
+ "3rd Party Mac Developer Application: ",
+ user, keychain);
+ }
+ // if either not signing for app store or couldn't find
+ if (result == null) {
+ result = MacBaseInstallerBundler.findKey(
+ "Developer ID Application: ", user, keychain);
+ }
+
if (result != null) {
MacCertificate certificate = new MacCertificate(result);
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java
index 30c0f80db41..06af1ed2db0 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java
@@ -72,7 +72,7 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
private static final ResourceBundle I18N = ResourceBundle.getBundle(
"jdk.jpackage.internal.resources.MacResources");
- private static final String TEMPLATE_BUNDLE_ICON = "java.icns";
+ private static final String TEMPLATE_BUNDLE_ICON = "JavaApp.icns";
private static final String OS_TYPE_CODE = "APPL";
private static final String TEMPLATE_INFO_PLIST_LITE =
"Info-lite.plist.template";
@@ -102,6 +102,13 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
params -> null,
(s, p) -> s);
+ public static final BundlerParamInfo<String> APP_CATEGORY =
+ new StandardBundlerParam<>(
+ Arguments.CLIOptions.MAC_CATEGORY.getId(),
+ String.class,
+ params -> "utilities",
+ (s, p) -> s);
+
public static final BundlerParamInfo<String> MAC_CF_BUNDLE_IDENTIFIER =
new StandardBundlerParam<>(
Arguments.CLIOptions.MAC_BUNDLE_IDENTIFIER.getId(),
@@ -146,6 +153,38 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
null : Boolean.valueOf(s)
);
+ public static final StandardBundlerParam<Boolean> APP_STORE =
+ new StandardBundlerParam<>(
+ Arguments.CLIOptions.MAC_APP_STORE.getId(),
+ Boolean.class,
+ params -> false,
+ // valueOf(null) is false, we actually do want null in some cases
+ (s, p) -> (s == null || "null".equalsIgnoreCase(s)) ?
+ null : Boolean.valueOf(s)
+ );
+
+ public static final BundlerParamInfo<Path> ENTITLEMENTS =
+ new StandardBundlerParam<>(
+ Arguments.CLIOptions.MAC_ENTITLEMENTS.getId(),
+ Path.class,
+ params -> {
+ try {
+ Path path = CONFIG_ROOT.fetchFrom(params).resolve(
+ getLauncherName(params) + ".entitlements");
+ String defPath = (APP_STORE.fetchFrom(params) ?
+ "sandbox.plist" : "entitlements.plist");
+ createResource(defPath, params)
+ .setCategory(I18N.getString("resource.entitlements"))
+ .saveToFile(path);
+ return path;
+ } catch (IOException ioe) {
+ Log.verbose(ioe);
+ }
+ return null;
+ },
+ (s, p) -> Path.of(s)
+ );
+
private static final StandardBundlerParam<String> FA_MAC_CFBUNDLETYPEROLE =
new StandardBundlerParam<>(
Arguments.MAC_CFBUNDLETYPEROLE,
@@ -336,27 +375,14 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
String signingIdentity =
DEVELOPER_ID_APP_SIGNING_KEY.fetchFrom(params);
if (signingIdentity != null) {
- prepareEntitlements(params);
signAppBundle(params, root, signingIdentity,
BUNDLE_ID_SIGNING_PREFIX.fetchFrom(params),
- getConfig_Entitlements(params));
+ ENTITLEMENTS.fetchFrom(params));
}
restoreKeychainList(params);
}
}
- static Path getConfig_Entitlements(Map<String, ? super Object> params) {
- return CONFIG_ROOT.fetchFrom(params).resolve(
- getLauncherName(params) + ".entitlements");
- }
-
- static void prepareEntitlements(Map<String, ? super Object> params)
- throws IOException {
- createResource("entitlements.plist", params)
- .setCategory(I18N.getString("resource.entitlements"))
- .saveToFile(getConfig_Entitlements(params));
- }
-
private static String getLauncherName(Map<String, ? super Object> params) {
return APP_NAME.fetchFrom(params);
}
@@ -391,8 +417,17 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
String name = StandardBundlerParam.isRuntimeInstaller(params) ?
getBundleName(params): "Java Runtime Image";
data.put("CF_BUNDLE_NAME", name);
- data.put("CF_BUNDLE_VERSION", VERSION.fetchFrom(params));
- data.put("CF_BUNDLE_SHORT_VERSION_STRING", VERSION.fetchFrom(params));
+ String ver = VERSION.fetchFrom(params);
+ String sver = ver;
+ int index = ver.indexOf(".");
+ if (index > 0 && ((index + 1) < ver.length())) {
+ index = ver.indexOf(".", index + 1);
+ if (index > 0 ) {
+ sver = ver.substring(0, index);
+ }
+ }
+ data.put("CF_BUNDLE_VERSION", ver);
+ data.put("CF_BUNDLE_SHORT_VERSION_STRING", sver);
createResource(TEMPLATE_RUNTIME_INFO_PLIST, params)
.setPublicName("Runtime-Info.plist")
@@ -443,6 +478,8 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
data.put("DEPLOY_LAUNCHER_NAME", getLauncherName(params));
data.put("DEPLOY_BUNDLE_SHORT_VERSION", VERSION.fetchFrom(params));
data.put("DEPLOY_BUNDLE_CFBUNDLE_VERSION", VERSION.fetchFrom(params));
+ data.put("DEPLOY_APP_CATEGORY", "public.app-category." +
+ APP_CATEGORY.fetchFrom(params));
StringBuilder bundleDocumentTypes = new StringBuilder();
StringBuilder exportedTypes = new StringBuilder();
@@ -643,9 +680,8 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
}
}).filter(p -> Files.isRegularFile(p) &&
(Files.isExecutable(p) || p.toString().endsWith(".dylib"))
- && !(p.toString().endsWith(appExecutable)
- || p.toString().contains("/Contents/runtime")
- || p.toString().contains("/Contents/Frameworks"))
+ && !(p.toString().contains("dylib.dSYM/Contents"))
+ && !(p.toString().endsWith(appExecutable))
).forEach(p -> {
// noinspection ThrowableResultOfMethodCallIgnored
if (toThrow.get() != null) return;
@@ -654,12 +690,30 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
if (Files.isSymbolicLink(p)) {
Log.verbose(MessageFormat.format(I18N.getString(
"message.ignoring.symlink"), p.toString()));
- } else if (isFileSigned(p)) {
- // executable or lib already signed
- Log.verbose(MessageFormat.format(I18N.getString(
- "message.already.signed"), p.toString()));
} else {
- List<String> args = new ArrayList<>();
+ List<String> args;
+ // runtime and Framework files will be signed below
+ // but they need to be unsigned first here
+ if ((p.toString().contains("/Contents/runtime")) ||
+ (p.toString().contains("/Contents/Frameworks"))) {
+
+ args = new ArrayList<>();
+ args.addAll(Arrays.asList("/usr/bin/codesign",
+ "--remove-signature", p.toString()));
+ try {
+ Set<PosixFilePermission> oldPermissions =
+ Files.getPosixFilePermissions(p);
+ p.toFile().setWritable(true, true);
+ ProcessBuilder pb = new ProcessBuilder(args);
+ IOUtils.exec(pb);
+ Files.setPosixFilePermissions(p,oldPermissions);
+ } catch (IOException ioe) {
+ Log.verbose(ioe);
+ toThrow.set(ioe);
+ return;
+ }
+ }
+ args = new ArrayList<>();
args.addAll(Arrays.asList("/usr/bin/codesign",
"--timestamp",
"--options", "runtime",
@@ -670,25 +724,19 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
args.add("--keychain");
args.add(keyChain);
}
-
if (Files.isExecutable(p)) {
if (entitlements != null) {
args.add("--entitlements");
args.add(entitlements.toString());
}
}
-
args.add(p.toString());
-
try {
Set<PosixFilePermission> oldPermissions =
Files.getPosixFilePermissions(p);
p.toFile().setWritable(true, true);
-
ProcessBuilder pb = new ProcessBuilder(args);
-
IOUtils.exec(pb);
-
Files.setPosixFilePermissions(p, oldPermissions);
} catch (IOException ioe) {
toThrow.set(ioe);
@@ -721,6 +769,10 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
args.add("--keychain");
args.add(keyChain);
}
+ if (entitlements != null) {
+ args.add("--entitlements");
+ args.add(entitlements.toString());
+ }
args.add(path.toString());
ProcessBuilder pb = new ProcessBuilder(args);
@@ -758,6 +810,7 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
"--options", "runtime",
"--force",
"-s", signingIdentity,
+ "--prefix", identifierPrefix,
"-vvvv"));
if (keyChain != null && !keyChain.isEmpty()) {
@@ -778,20 +831,6 @@ public class MacAppImageBuilder extends AbstractAppImageBuilder {
IOUtils.exec(pb);
}
- private static boolean isFileSigned(Path file) {
- ProcessBuilder pb =
- new ProcessBuilder("/usr/bin/codesign",
- "--verify", file.toString());
-
- try {
- IOUtils.exec(pb);
- } catch (IOException ex) {
- return false;
- }
-
- return true;
- }
-
private static String extractBundleIdentifier(Map<String, Object> params) {
if (PREDEFINED_APP_IMAGE.fetchFrom(params) == null) {
return null;
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java
index d98c2c5e323..d9dfe0b65e4 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java
@@ -152,14 +152,13 @@ public abstract class MacBaseInstallerBundler extends AbstractBundler {
return "INSTALLER";
}
- public static String findKey(String keyPrefix, String teamName, String keychainName,
- boolean verbose) {
- String key = (teamName.startsWith(keyPrefix)
- || teamName.startsWith("3rd Party Mac Developer"))
- ? teamName : (keyPrefix + teamName);
- if (Platform.getPlatform() != Platform.MAC) {
- return null;
- }
+ public static String findKey(String keyPrefix, String teamName, String keychainName) {
+
+ boolean useAsIs = teamName.startsWith(keyPrefix)
+ || teamName.startsWith("Developer ID")
+ || teamName.startsWith("3rd Party Mac");
+
+ String key = (useAsIs) ? teamName : (keyPrefix + teamName);
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos)) {
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java
index 8e1afe17619..e93bc276d1b 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java
@@ -58,7 +58,7 @@ public class MacDmgBundler extends MacBaseInstallerBundler {
static final String BACKGROUND_IMAGE_FOLDER =".background";
static final String BACKGROUND_IMAGE = "background.tiff";
static final String DEFAULT_DMG_SETUP_SCRIPT = "DMGsetup.scpt";
- static final String TEMPLATE_BUNDLE_ICON = "java.icns";
+ static final String TEMPLATE_BUNDLE_ICON = "JavaApp.icns";
static final String DEFAULT_LICENSE_PLIST="lic_template.plist";
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java
index 1370bcd64af..ffce2cbbeb1 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java
@@ -48,6 +48,7 @@ import static jdk.jpackage.internal.StandardBundlerParam.LICENSE_FILE;
import static jdk.jpackage.internal.StandardBundlerParam.VERSION;
import static jdk.jpackage.internal.MacBaseInstallerBundler.SIGNING_KEYCHAIN;
import static jdk.jpackage.internal.MacBaseInstallerBundler.SIGNING_KEY_USER;
+import static jdk.jpackage.internal.MacAppImageBuilder.APP_STORE;
import static jdk.jpackage.internal.MacAppImageBuilder.MAC_CF_BUNDLE_IDENTIFIER;
import static jdk.jpackage.internal.OverridableResource.createResource;
@@ -57,6 +58,7 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
"jdk.jpackage.internal.resources.MacResources");
private static final String DEFAULT_BACKGROUND_IMAGE = "background_pkg.png";
+ private static final String DEFAULT_PDF = "product-def.plist";
private static final String TEMPLATE_PREINSTALL_SCRIPT =
"preinstall.template";
@@ -102,11 +104,20 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
"mac.signing-key-developer-id-installer",
String.class,
params -> {
- String result = MacBaseInstallerBundler.findKey(
- "Developer ID Installer: ",
- SIGNING_KEY_USER.fetchFrom(params),
- SIGNING_KEYCHAIN.fetchFrom(params),
- VERBOSE.fetchFrom(params));
+ String user = SIGNING_KEY_USER.fetchFrom(params);
+ String keychain = SIGNING_KEYCHAIN.fetchFrom(params);
+ String result = null;
+ if (APP_STORE.fetchFrom(params)) {
+ result = MacBaseInstallerBundler.findKey(
+ "3rd Party Mac Developer Installer: ",
+ user, keychain);
+ }
+ // if either not signing for app store or couldn't find
+ if (result == null) {
+ result = MacBaseInstallerBundler.findKey(
+ "Developer ID Installer: ", user, keychain);
+ }
+
if (result != null) {
MacCertificate certificate = new MacCertificate(result);
@@ -164,6 +175,10 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
return CONFIG_ROOT.fetchFrom(params).resolve("distribution.dist");
}
+ private Path getConfig_PDF(Map<String, ? super Object> params) {
+ return CONFIG_ROOT.fetchFrom(params).resolve("product-def.plist");
+ }
+
private Path getConfig_BackgroundImage(Map<String, ? super Object> params) {
return CONFIG_ROOT.fetchFrom(params).resolve(
APP_NAME.fetchFrom(params) + "-background.png");
@@ -315,6 +330,10 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
.setCategory(I18N.getString("resource.pkg-background-image"))
.saveToFile(getConfig_BackgroundImageDarkAqua(params));
+ createResource(DEFAULT_PDF, params)
+ .setCategory(I18N.getString("resource.pkg-pdf"))
+ .saveToFile(getConfig_PDF(params));
+
prepareDistributionXMLFile(params);
createResource(null, params)
@@ -430,22 +449,36 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
patchCPLFile(cpl);
- preparePackageScripts(params);
-
// build application package
- pb = new ProcessBuilder("/usr/bin/pkgbuild",
- "--root",
- root,
- "--install-location",
- getInstallDir(params),
- "--component-plist",
- cpl.toAbsolutePath().toString(),
- "--scripts",
- SCRIPTS_DIR.fetchFrom(params).toAbsolutePath().toString(),
- "--identifier",
- MAC_CF_BUNDLE_IDENTIFIER.fetchFrom(params),
- appPKG.toAbsolutePath().toString());
- IOUtils.exec(pb);
+ if (APP_STORE.fetchFrom(params)) {
+ pb = new ProcessBuilder("/usr/bin/pkgbuild",
+ "--root",
+ root,
+ "--install-location",
+ getInstallDir(params),
+ "--component-plist",
+ cpl.toAbsolutePath().toString(),
+ "--identifier",
+ MAC_CF_BUNDLE_IDENTIFIER.fetchFrom(params),
+ appPKG.toAbsolutePath().toString());
+ IOUtils.exec(pb);
+ } else {
+ preparePackageScripts(params);
+ pb = new ProcessBuilder("/usr/bin/pkgbuild",
+ "--root",
+ root,
+ "--install-location",
+ getInstallDir(params),
+ "--component-plist",
+ cpl.toAbsolutePath().toString(),
+ "--scripts",
+ SCRIPTS_DIR.fetchFrom(params)
+ .toAbsolutePath().toString(),
+ "--identifier",
+ MAC_CF_BUNDLE_IDENTIFIER.fetchFrom(params),
+ appPKG.toAbsolutePath().toString());
+ IOUtils.exec(pb);
+ }
// build final package
Path finalPKG = outdir.resolve(MAC_INSTALLER_NAME.fetchFrom(params)
@@ -483,12 +516,22 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
}
}
- commandLine.add("--distribution");
- commandLine.add(
- getConfig_DistributionXMLFile(params).toAbsolutePath().toString());
- commandLine.add("--package-path");
- commandLine.add(PACKAGES_ROOT.fetchFrom(params).toAbsolutePath().toString());
-
+ if (APP_STORE.fetchFrom(params)) {
+ commandLine.add("--product");
+ commandLine.add(getConfig_PDF(params)
+ .toAbsolutePath().toString());
+ commandLine.add("--component");
+ Path p = Path.of(root, APP_NAME.fetchFrom(params) + ".app");
+ commandLine.add(p.toAbsolutePath().toString());
+ commandLine.add(getInstallDir(params));
+ } else {
+ commandLine.add("--distribution");
+ commandLine.add(getConfig_DistributionXMLFile(params)
+ .toAbsolutePath().toString());
+ commandLine.add("--package-path");
+ commandLine.add(PACKAGES_ROOT.fetchFrom(params)
+ .toAbsolutePath().toString());
+ }
commandLine.add(finalPKG.toAbsolutePath().toString());
pb = new ProcessBuilder(commandLine);
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template
index 0ea89cd603c..632dcd31b94 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>LSMinimumSystemVersion</key>
- <string>10.9</string>
+ <string>10.11</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleAllowMixedLocalizations</key>
@@ -26,7 +26,7 @@
<string>????</string>
<!-- See https://developer.apple.com/app-store/categories/ for list of AppStore categories -->
<key>LSApplicationCategoryType</key>
- <string>Unknown</string>
+ <string>DEPLOY_APP_CATEGORY</string>
<key>CFBundleVersion</key>
<string>DEPLOY_BUNDLE_CFBUNDLE_VERSION</string>
<key>NSHumanReadableCopyright</key>
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/java.icns b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/JavaApp.icns
index 6a278782144..6a278782144 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/java.icns
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/JavaApp.icns
Binary files differ
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties
index 15eb4984d9a..a9974668023 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties
@@ -29,7 +29,7 @@ store.bundler.name=Mac App Store Ready Bundler
dmg.bundler.name=Mac DMG Package
pkg.bundler.name=Mac PKG Package
-error.invalid-cfbundle-version.advice=Set a compatible 'appVersion' or set a 'mac.CFBundleVersion'. Valid versions are one to three integers separated by dots.
+error.invalid-cfbundle-version.advice=Set a compatible 'app-version' value. Valid versions are one to three integers separated by dots.
error.explicit-sign-no-cert=Signature explicitly requested but no signing certificate found
error.explicit-sign-no-cert.advice=Specify a valid mac-signing-key-user-name and mac-signing-keychain
error.must-sign-app-store=Mac App Store apps must be signed, and signing has been disabled by bundler configuration
@@ -55,13 +55,14 @@ resource.post-install-script=script to run after application image is populated
resource.pkg-preinstall-script=PKG preinstall script
resource.pkg-postinstall-script=PKG postinstall script
resource.pkg-background-image=pkg background image
+resource.pkg-pdf=project definition file
message.bundle-name-too-long-warning={0} is set to ''{1}'', which is longer than 16 characters. For a better Mac experience consider shortening it.
message.preparing-info-plist=Preparing Info.plist: {0}.
message.icon-not-icns= The specified icon "{0}" is not an ICNS file and will not be used. The default icon will be used in it's place.
-message.version-string-too-many-components=Version sting may have between 1 and 3 numbers: 1, 1.2, 1.2.3.
-message.version-string-first-number-not-zero=The first number in a CFBundleVersion cannot be zero or negative.
+message.version-string-too-many-components='app-version' may have between 1 and 3 numbers: 1, 1.2, 1.2.3.
+message.version-string-first-number-not-zero=The first number in an app-version cannot be zero or negative.
message.creating-association-with-null-extension=Creating association with null extension.
message.ignoring.symlink=Warning: codesign is skipping the symlink {0}.
message.already.signed=File already signed: {0}.
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties
index f2e92acb237..97ac5d8c6e9 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_ja.properties
@@ -29,7 +29,7 @@ store.bundler.name=Mac App Store\u306E\u6E96\u5099\u5B8C\u4E86\u30D0\u30F3\u30C9
dmg.bundler.name=Mac DMG\u30D1\u30C3\u30B1\u30FC\u30B8
pkg.bundler.name=Mac PKG\u30D1\u30C3\u30B1\u30FC\u30B8
-error.invalid-cfbundle-version.advice=\u4E92\u63DB\u6027\u306E\u3042\u308B'appVersion'\u3092\u8A2D\u5B9A\u3059\u308B\u304B\u3001'mac.CFBundleVersion'\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u6709\u52B9\u306A\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3001\u30C9\u30C3\u30C8\u3067\u533A\u5207\u3089\u308C\u305F1\u304B\u30893\u3064\u306E\u6574\u6570\u3067\u3059\u3002
+error.invalid-cfbundle-version.advice=Set a compatible 'app-version'. Valid versions are one to three integers separated by dots.
error.explicit-sign-no-cert=\u7F72\u540D\u304C\u660E\u793A\u7684\u306B\u8981\u6C42\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u7F72\u540D\u8A3C\u660E\u66F8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
error.explicit-sign-no-cert.advice=\u6709\u52B9\u306Amac-signing-key-user-name\u304A\u3088\u3073mac-signing-keychain\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
error.must-sign-app-store=Mac App Store\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306F\u7F72\u540D\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u7F72\u540D\u306F\u30D0\u30F3\u30C9\u30E9\u69CB\u6210\u306B\u3088\u3063\u3066\u7121\u52B9\u5316\u3055\u308C\u3066\u3044\u307E\u3059
@@ -61,7 +61,7 @@ message.bundle-name-too-long-warning={0}\u304C16\u6587\u5B57\u3092\u8D85\u3048\u
message.preparing-info-plist=Info.plist\u3092\u6E96\u5099\u3057\u3066\u3044\u307E\u3059: {0}\u3002
message.icon-not-icns= \u6307\u5B9A\u3057\u305F\u30A2\u30A4\u30B3\u30F3"{0}"\u306FICNS\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u306A\u304F\u3001\u4F7F\u7528\u3055\u308C\u307E\u305B\u3093\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u304C\u305D\u306E\u4F4D\u7F6E\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002
message.version-string-too-many-components=\u30D0\u30FC\u30B8\u30E7\u30F3\u6587\u5B57\u5217\u306B\u306F\u30011\u30011.2\u30011.2.3\u306A\u30691\u304B\u30893\u306E\u6570\u5B57\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
-message.version-string-first-number-not-zero=CFBundleVersion\u306E\u6700\u521D\u306E\u6570\u5B57\u306F\u3001\u30BC\u30ED\u307E\u305F\u306F\u8CA0\u306E\u5024\u306B\u3067\u304D\u307E\u305B\u3093\u3002
+message.version-string-first-number-not-zero='app-version' \u306E\u6700\u521D\u306E\u6570\u5B57\u306F\u3001\u30BC\u30ED\u307E\u305F\u306F\u8CA0\u306E\u5024\u306B\u3067\u304D\u307E\u305B\u3093\u3002
message.creating-association-with-null-extension=null\u62E1\u5F35\u5B50\u3068\u306E\u95A2\u9023\u4ED8\u3051\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059\u3002
message.ignoring.symlink=\u8B66\u544A: codesign\u304Csymlink {0}\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u3066\u3044\u307E\u3059
message.already.signed=\u30D5\u30A1\u30A4\u30EB\u306F\u3059\u3067\u306B\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u3059: {0}\u3002
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties
index 6c1a1fa341c..daf85b3aa43 100644
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources_zh_CN.properties
@@ -29,7 +29,7 @@ store.bundler.name=\u652F\u6301 Mac App Store \u7684\u6253\u5305\u7A0B\u5E8F
dmg.bundler.name=Mac DMG \u7A0B\u5E8F\u5305
pkg.bundler.name=Mac PKG \u7A0B\u5E8F\u5305
-error.invalid-cfbundle-version.advice=\u8BBE\u7F6E\u517C\u5BB9\u7684 'appVersion' \u6216\u8005\u8BBE\u7F6E 'mac.CFBundleVersion'\u3002\u6709\u6548\u7248\u672C\u5305\u542B\u4E00\u5230\u4E09\u4E2A\u7528\u70B9\u5206\u9694\u7684\u6574\u6570\u3002
+error.invalid-cfbundle-version.advice=Set a compatible 'app-version'. Valid versions are one to three integers separated by dots.
error.explicit-sign-no-cert=\u5DF2\u660E\u786E\u8BF7\u6C42\u7B7E\u540D\uFF0C\u4F46\u627E\u4E0D\u5230\u7B7E\u540D\u8BC1\u4E66
error.explicit-sign-no-cert.advice=\u6307\u5B9A\u6709\u6548\u7684 mac-signing-key-user-name \u548C mac-signing-keychain
error.must-sign-app-store=Mac App Store \u5E94\u7528\u7A0B\u5E8F\u5FC5\u987B\u7B7E\u540D, \u800C\u6253\u5305\u7A0B\u5E8F\u914D\u7F6E\u5DF2\u7981\u7528\u7B7E\u540D
@@ -61,7 +61,7 @@ message.bundle-name-too-long-warning={0}\u5DF2\u8BBE\u7F6E\u4E3A ''{1}'', \u5176
message.preparing-info-plist=\u6B63\u5728\u51C6\u5907 Info.plist: {0}\u3002
message.icon-not-icns= \u6307\u5B9A\u7684\u56FE\u6807 "{0}" \u4E0D\u662F ICNS \u6587\u4EF6, \u4E0D\u4F1A\u4F7F\u7528\u3002\u5C06\u4F7F\u7528\u9ED8\u8BA4\u56FE\u6807\u4EE3\u66FF\u3002
message.version-string-too-many-components=\u7248\u672C\u5B57\u7B26\u4E32\u53EF\u4EE5\u5305\u542B 1 \u5230 3 \u4E2A\u6570\u5B57: 1, 1.2, 1.2.3\u3002
-message.version-string-first-number-not-zero=CFBundleVersion \u4E2D\u7684\u7B2C\u4E00\u4E2A\u6570\u5B57\u4E0D\u80FD\u4E3A\u96F6\u6216\u8D1F\u6570\u3002
+message.version-string-first-number-not-zero='app-version' \u4E2D\u7684\u7B2C\u4E00\u4E2A\u6570\u5B57\u4E0D\u80FD\u4E3A\u96F6\u6216\u8D1F\u6570\u3002
message.creating-association-with-null-extension=\u6B63\u5728\u4F7F\u7528\u7A7A\u6269\u5C55\u540D\u521B\u5EFA\u5173\u8054\u3002
message.ignoring.symlink=\u8B66\u544A: codesign \u6B63\u5728\u8DF3\u8FC7\u7B26\u53F7\u94FE\u63A5 {0}\u3002
message.already.signed=\u6587\u4EF6\u5DF2\u7B7E\u540D\uFF1A{0}\u3002
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/product-def.plist b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/product-def.plist
new file mode 100644
index 00000000000..53bd1e4d68a
--- /dev/null
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/product-def.plist
@@ -0,0 +1,11 @@
+
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>os</key>
+ <array>
+ <string>10.11</string>
+ </array>
+</dict>
+</plist>
diff --git a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/sandbox.plist b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/sandbox.plist
new file mode 100644
index 00000000000..ad48d4f9517
--- /dev/null
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/sandbox.plist
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.app-sandbox</key>
+ <true/>
+ <key>com.apple.security.cs.allow-jit</key>
+ <true/>
+ <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
+ <true/>
+ <key>com.apple.security.cs.disable-library-validation</key>
+ <true/>
+ <key>com.apple.security.cs.allow-dyld-environment-variables</key>
+ <true/>
+ <key>com.apple.security.cs.debugger</key>
+ <true/>
+</dict>
+</plist>
diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
index b51e6e61f04..f3a251805cc 100644
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
@@ -305,6 +305,12 @@ public class Arguments {
setOptionValue("mac-sign", true);
}),
+ MAC_APP_STORE ("mac-app-store", OptionCategories.PLATFORM_MAC, () -> {
+ setOptionValue("mac-app-store", true);
+ }),
+
+ MAC_CATEGORY ("mac-app-category", OptionCategories.PLATFORM_MAC),
+
MAC_BUNDLE_NAME ("mac-package-name", OptionCategories.PLATFORM_MAC),
MAC_BUNDLE_IDENTIFIER("mac-package-identifier",
@@ -319,6 +325,8 @@ public class Arguments {
MAC_SIGNING_KEYCHAIN ("mac-signing-keychain",
OptionCategories.PLATFORM_MAC),
+ MAC_ENTITLEMENTS ("mac-entitlements", OptionCategories.PLATFORM_MAC),
+
WIN_MENU_HINT ("win-menu", OptionCategories.PLATFORM_WIN, () -> {
setOptionValue("win-menu", true);
}),
diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java
index 0a12f6cb7db..c501d4e878c 100644
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java
@@ -110,6 +110,9 @@ class ValidOptions {
options.put(CLIOptions.MAC_BUNDLE_SIGNING_PREFIX.getId(), 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.getId(), USE.ALL);
+ options.put(CLIOptions.MAC_CATEGORY.getId(), USE.ALL);
+ options.put(CLIOptions.MAC_ENTITLEMENTS.getId(), USE.ALL);
}
if (Platform.getPlatform() == Platform.LINUX) {
diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties
index f793835f27c..d9c22adea01 100644
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties
@@ -185,7 +185,7 @@ Generic Options:\n\
\ Icons, template files, and other resources of jpackage can be\n\
\ over-ridden by adding replacement resources to this directory.\n\
\ (absolute path or relative to the current directory)\n\
-\ --runtime-image <file-path>\n\
+\ --runtime-image <file path>\n\
\ Path of the predefined runtime image to install\n\
\ (absolute path or relative to the current directory)\n\
\ Option is required when creating a runtime package.\n\
@@ -244,8 +244,16 @@ MSG_Help_mac_launcher=\
\ (absolute path or relative to the current directory).\n\
\ If not specified, the standard keychains are used.\n\
\ --mac-signing-key-user-name <team name>\n\
-\ Team name portion in Apple signing identities' names.\n\
-\ For example "Developer ID Application: "\n\
+\ Team or user name portion of Apple signing identities.\n\
+\ --mac-app-store\n\
+\ Indicates that the jpackage output is intended for the\n\
+\ Mac App Store.\n\
+\ --mac-entitlements <file path>\n\
+\ Path to file containing entitlements to use when signing\n\
+\ executables and libraries in the bundle.\n\
+\ --mac-app-category <category string>\n\
+\ String used to construct LSApplicationCategoryType in\n\
+\ application plist. The default value is "utilities".\n\
MSG_Help_linux_install=\
\ --linux-package-name <package name>\n\
diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties
index 1b13545eda0..6f774c7d4fb 100644
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties
@@ -50,7 +50,19 @@ MSG_Help_win_install=\
\ UUID associated with upgrades for this package\n\
MSG_Help_win_install_dir=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5834\u6240\u306E\u4E0B\u306E\u76F8\u5BFE\u30B5\u30D6\u30D1\u30B9\n
-MSG_Help_mac_launcher=\ --mac-package-identifier <ID string>\n MacOS\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u4E00\u610F\u306B\u8B58\u5225\u3059\u308BID\n \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u540D\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n \u82F1\u6570\u5B57(A-Z\u3001a-z\u30010-9)\u3001\u30CF\u30A4\u30D5\u30F3(-)\n \u304A\u3088\u3073\u30D4\u30EA\u30AA\u30C9(.)\u6587\u5B57\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n --mac-package-name <name string>\n \u30E1\u30CB\u30E5\u30FC\u30FB\u30D0\u30FC\u306B\u8868\u793A\u3055\u308C\u308B\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u540D\u524D\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3068\u306F\u7570\u306A\u308A\u307E\u3059\u3002\n \u3053\u306E\u540D\u524D\u306F16\u6587\u5B57\u672A\u6E80\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u30E1\u30CB\u30E5\u30FC\u30FB\u30D0\u30FC\n \u304A\u3088\u3073\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u60C5\u5831\u30A6\u30A3\u30F3\u30C9\u30A6\u306B\u8868\u793A\u3059\u308B\u306E\u306B\u9069\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n --mac-package-signing-prefix <prefix string>\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u7F72\u540D\u3059\u308B\u969B\u3001\u65E2\u5B58\u306E\u30D1\u30C3\u30B1\u30FC\u30B8ID\u306E\u306A\u3044\n \u7F72\u540D\u304C\u5FC5\u8981\u306A\u3059\u3079\u3066\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3001\n \u3053\u306E\u5024\u304C\u63A5\u982D\u8F9E\u3068\u3057\u3066\u4ED8\u3051\u3089\u308C\u307E\u3059\u3002\n --mac-sign\n \u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u7F72\u540D\u3059\u308B\u3088\u3046\u30EA\u30AF\u30A8\u30B9\u30C8\u3057\u307E\u3059\n --mac-signing-keychain <file path>\n \u7F72\u540D\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u691C\u7D22\u3059\u308B\u30AD\u30FC\u30C1\u30A7\u30FC\u30F3\u306E\u30D1\u30B9\n (\u7D76\u5BFE\u30D1\u30B9\u307E\u305F\u306F\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304B\u3089\u306E\u76F8\u5BFE\u30D1\u30B9)\u3002\n \u6307\u5B9A\u3057\u306A\u304B\u3063\u305F\u5834\u5408\u3001\u6A19\u6E96\u306E\u30AD\u30FC\u30C1\u30A7\u30FC\u30F3\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n --mac-signing-key-user-name <team name>\n Apple\u7F72\u540D\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306E\u30C1\u30FC\u30E0\u540D\u90E8\u5206\u3002\n \u4F8B: "Developer ID Application: "\n
+MSG_Help_mac_launcher=\ --mac-package-identifier <ID string>\n MacOS\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u4E00\u610F\u306B\u8B58\u5225\u3059\u308BID\n \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u540D\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n \u82F1\u6570\u5B57(A-Z\u3001a-z\u30010-9)\u3001\u30CF\u30A4\u30D5\u30F3(-)\n \u304A\u3088\u3073\u30D4\u30EA\u30AA\u30C9(.)\u6587\u5B57\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n --mac-package-name <name string>\n \u30E1\u30CB\u30E5\u30FC\u30FB\u30D0\u30FC\u306B\u8868\u793A\u3055\u308C\u308B\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u540D\u524D\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3068\u306F\u7570\u306A\u308A\u307E\u3059\u3002\n \u3053\u306E\u540D\u524D\u306F16\u6587\u5B57\u672A\u6E80\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u30E1\u30CB\u30E5\u30FC\u30FB\u30D0\u30FC\n \u304A\u3088\u3073\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u60C5\u5831\u30A6\u30A3\u30F3\u30C9\u30A6\u306B\u8868\u793A\u3059\u308B\u306E\u306B\u9069\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n --mac-package-signing-prefix <prefix string>\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u7F72\u540D\u3059\u308B\u969B\u3001\u65E2\u5B58\u306E\u30D1\u30C3\u30B1\u30FC\u30B8ID\u306E\u306A\u3044\n \u7F72\u540D\u304C\u5FC5\u8981\u306A\u3059\u3079\u3066\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3001\n \u3053\u306E\u5024\u304C\u63A5\u982D\u8F9E\u3068\u3057\u3066\u4ED8\u3051\u3089\u308C\u307E\u3059\u3002\n --mac-sign\n \u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u7F72\u540D\u3059\u308B\u3088\u3046\u30EA\u30AF\u30A8\u30B9\u30C8\u3057\u307E\u3059\n --mac-signing-keychain <file path>\n \u7F72\u540D\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u691C\u7D22\u3059\u308B\u30AD\u30FC\u30C1\u30A7\u30FC\u30F3\u306E\u30D1\u30B9\n (\u7D76\u5BFE\u30D1\u30B9\u307E\u305F\u306F\u73FE\u5728\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304B\u3089\u306E\u76F8\u5BFE\u30D1\u30B9)\u3002\n \u6307\u5B9A\u3057\u306A\u304B\u3063\u305F\u5834\u5408\u3001\u6A19\u6E96\u306E\u30AD\u30FC\u30C1\u30A7\u30FC\u30F3\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n
+\ --mac-signing-key-user-name <team name>\n\
+\ Team or user name portion of Apple signing identities.\n\
+\ --mac-app-store\n\
+\ Indicates that the jpackage output is intended for the\n\
+\ Mac App Store.\n\
+\ --mac-entitlements <file path>\n\
+\ Path to file containing entitlements to use when signing\n\
+\ executables and libraries in the bundle.\n\
+\ --mac-app-category <category string>\n\
+\ String used to construct LSApplicationCategoryType in\n\
+\ application plist. The default value is "utilities".\n\
+
MSG_Help_linux_install=\ --linux-package-name <package name>\n Linux\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u540D\u524D\u3002\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\n --linux-deb-maintainer <email address>\n .deb\u30D1\u30C3\u30B1\u30FC\u30B8\u306EMaintainer\n --linux-menu-group <menu-group-name>\n \u3053\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u304C\u914D\u7F6E\u3055\u308C\u3066\u3044\u308B\u30E1\u30CB\u30E5\u30FC\u30FB\u30B0\u30EB\u30FC\u30D7\n --linux-package-deps\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306B\u5FC5\u8981\u306A\u30D1\u30C3\u30B1\u30FC\u30B8\u307E\u305F\u306F\u6A5F\u80FD\n --linux-rpm-license-type <type string>\n \u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u30BF\u30A4\u30D7(RPM .spec\u306E"License: <value>")\n --linux-app-release <release value>\n RPM <name>.spec\u30D5\u30A1\u30A4\u30EB\u306E\u30EA\u30EA\u30FC\u30B9\u5024\u307E\u305F\u306F \n DEB\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u30FB\u30D5\u30A1\u30A4\u30EB\u306EDebian\u30EA\u30D3\u30B8\u30E7\u30F3\u5024\u3002\n --linux-app-category <category value>\n RPM <name>.spec\u30D5\u30A1\u30A4\u30EB\u306E\u30B0\u30EB\u30FC\u30D7\u5024\u307E\u305F\u306F \n DEB\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u5024\u3002\n --linux-shortcut\n \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u4F5C\u6210\u3057\u307E\u3059\n
MSG_Help_mac_linux_install_dir=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u7D76\u5BFE\u30D1\u30B9\n
MSG_Help_default_install_dir=OS X\u307E\u305F\u306FLinux\u4E0A\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u7D76\u5BFE\u30D1\u30B9\u3002\n "\u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D5\u30A1\u30A4\u30EB"\u3084"AppData"\u306A\u3069\u3001Windows\u4E0A\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5834\u6240\u306E\u76F8\u5BFE\u30B5\u30D6\u30D1\u30B9\u3002\n
diff --git a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties
index 323611ab276..7ff98b6046e 100644
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties
@@ -49,7 +49,19 @@ MSG_Help_win_install=\
\ UUID associated with upgrades for this package\n\
MSG_Help_win_install_dir=\u9ED8\u8BA4\u5B89\u88C5\u4F4D\u7F6E\u4E0B\u9762\u7684\u76F8\u5BF9\u5B50\u8DEF\u5F84\n
-MSG_Help_mac_launcher=\ --mac-package-identifier <ID string>\n \u7528\u6765\u552F\u4E00\u5730\u6807\u8BC6 macOS \u5E94\u7528\u7A0B\u5E8F\u7684\u6807\u8BC6\u7B26\n \u9ED8\u8BA4\u4E3A\u4E3B\u7C7B\u540D\u79F0\u3002\n \u53EA\u80FD\u4F7F\u7528\u5B57\u6BCD\u6570\u5B57\uFF08A-Z\u3001a-z\u30010-9\uFF09\u3001\u8FDE\u5B57\u7B26 (-) \u548C\n \u53E5\u70B9 (.) \u5B57\u7B26\u3002\n --mac-package-name <name string>\n \u51FA\u73B0\u5728\u83DC\u5355\u680F\u4E2D\u7684\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n \u8FD9\u53EF\u4EE5\u4E0E\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\u4E0D\u540C\u3002\n \u6B64\u540D\u79F0\u7684\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E 16 \u4E2A\u5B57\u7B26\uFF0C\u9002\u5408\n \u663E\u793A\u5728\u83DC\u5355\u680F\u4E2D\u548C\u5E94\u7528\u7A0B\u5E8F\u201C\u4FE1\u606F\u201D\u7A97\u53E3\u4E2D\u3002\n \u9ED8\u8BA4\u4E3A\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\u3002\n --mac-package-signing-prefix <prefix string>\n \u5728\u5BF9\u5E94\u7528\u7A0B\u5E8F\u5305\u7B7E\u540D\u65F6\uFF0C\u4F1A\u5728\u6240\u6709\u9700\u8981\u7B7E\u540D\n \u4F46\u5F53\u524D\u6CA1\u6709\u7A0B\u5E8F\u5305\u6807\u8BC6\u7B26\u7684\u7EC4\u4EF6\u7684\n \u524D\u9762\u52A0\u4E0A\u6B64\u503C\u3002\n --mac-sign\n \u8BF7\u6C42\u5BF9\u7A0B\u5E8F\u5305\u8FDB\u884C\u7B7E\u540D\n --mac-signing-keychain <file path>\n \u8981\u7528\u6765\u641C\u7D22\u7B7E\u540D\u8EAB\u4EFD\u7684\u5BC6\u94A5\u94FE\u7684\u8DEF\u5F84\n \uFF08\u7EDD\u5BF9\u8DEF\u5F84\u6216\u76F8\u5BF9\u4E8E\u5F53\u524D\u76EE\u5F55\u7684\u8DEF\u5F84\uFF09\u3002\n \u5982\u679C\u672A\u6307\u5B9A\uFF0C\u5219\u4F7F\u7528\u6807\u51C6\u7684\u5BC6\u94A5\u94FE\u3002\n --mac-signing-key-user-name <team name>\n Apple \u7B7E\u540D\u8EAB\u4EFD\u540D\u79F0\u4E2D\u7684\u56E2\u961F\u540D\u79F0\u9009\u9879\u3002\n \u4F8B\u5982\uFF0C"Developer ID Application: "\n
+MSG_Help_mac_launcher=\ --mac-package-identifier <ID string>\n \u7528\u6765\u552F\u4E00\u5730\u6807\u8BC6 macOS \u5E94\u7528\u7A0B\u5E8F\u7684\u6807\u8BC6\u7B26\n \u9ED8\u8BA4\u4E3A\u4E3B\u7C7B\u540D\u79F0\u3002\n \u53EA\u80FD\u4F7F\u7528\u5B57\u6BCD\u6570\u5B57\uFF08A-Z\u3001a-z\u30010-9\uFF09\u3001\u8FDE\u5B57\u7B26 (-) \u548C\n \u53E5\u70B9 (.) \u5B57\u7B26\u3002\n --mac-package-name <name string>\n \u51FA\u73B0\u5728\u83DC\u5355\u680F\u4E2D\u7684\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n \u8FD9\u53EF\u4EE5\u4E0E\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\u4E0D\u540C\u3002\n \u6B64\u540D\u79F0\u7684\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E 16 \u4E2A\u5B57\u7B26\uFF0C\u9002\u5408\n \u663E\u793A\u5728\u83DC\u5355\u680F\u4E2D\u548C\u5E94\u7528\u7A0B\u5E8F\u201C\u4FE1\u606F\u201D\u7A97\u53E3\u4E2D\u3002\n \u9ED8\u8BA4\u4E3A\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\u3002\n --mac-package-signing-prefix <prefix string>\n \u5728\u5BF9\u5E94\u7528\u7A0B\u5E8F\u5305\u7B7E\u540D\u65F6\uFF0C\u4F1A\u5728\u6240\u6709\u9700\u8981\u7B7E\u540D\n \u4F46\u5F53\u524D\u6CA1\u6709\u7A0B\u5E8F\u5305\u6807\u8BC6\u7B26\u7684\u7EC4\u4EF6\u7684\n \u524D\u9762\u52A0\u4E0A\u6B64\u503C\u3002\n --mac-sign\n \u8BF7\u6C42\u5BF9\u7A0B\u5E8F\u5305\u8FDB\u884C\u7B7E\u540D\n --mac-signing-keychain <file path>\n \u8981\u7528\u6765\u641C\u7D22\u7B7E\u540D\u8EAB\u4EFD\u7684\u5BC6\u94A5\u94FE\u7684\u8DEF\u5F84\n \uFF08\u7EDD\u5BF9\u8DEF\u5F84\u6216\u76F8\u5BF9\u4E8E\u5F53\u524D\u76EE\u5F55\u7684\u8DEF\u5F84\uFF09\u3002\n \u5982\u679C\u672A\u6307\u5B9A\uFF0C\u5219\u4F7F\u7528\u6807\u51C6\u7684\u5BC6\u94A5\u94FE\u3002\n\
+\ --mac-signing-key-user-name <team name>\n\
+\ Team or user name portion of Apple signing identities.\n\
+\ --mac-app-store\n\
+\ Indicates that the jpackage output is intended for the\n\
+\ Mac App Store.\n\
+\ --mac-entitlements <file path>\n\
+\ Path to file containing entitlements to use when signing\n\
+\ executables and libraries in the bundle.\n\
+\ --mac-app-category <category string>\n\
+\ String used to construct LSApplicationCategoryType in\n\
+\ application plist. The default value is "utilities".\n\
+
MSG_Help_linux_install=\ --linux-package-name <package name>\n Linux \u7A0B\u5E8F\u5305\u7684\u540D\u79F0\uFF0C\u9ED8\u8BA4\u4E3A\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n --linux-deb-maintainer <email address>\n .deb \u7A0B\u5E8F\u5305\u7684\u7EF4\u62A4\u7A0B\u5E8F\n --linux-menu-group <menu-group-name>\n \u6B64\u5E94\u7528\u7A0B\u5E8F\u6240\u5728\u7684\u83DC\u5355\u7EC4\n --linux-package-deps\n \u5E94\u7528\u7A0B\u5E8F\u6240\u9700\u7684\u7A0B\u5E8F\u5305\u6216\u529F\u80FD\n --linux-rpm-license-type <type string>\n \u8BB8\u53EF\u8BC1\u7684\u7C7B\u578B\uFF08RPM .spec \u7684 "License: <value>"\uFF09\n --linux-app-release <release value>\n RPM <name>.spec \u6587\u4EF6\u7684\u53D1\u884C\u7248\u503C\u6216\n DEB \u63A7\u5236\u6587\u4EF6\u7684 Debian \u4FEE\u8BA2\u7248\u503C\u3002\n --linux-app-category <category value>\n RPM <name>.spec \u6587\u4EF6\u7684\u7EC4\u503C\u6216\n DEB \u63A7\u5236\u6587\u4EF6\u7684\u533A\u57DF\u503C\u3002\n --linux-shortcut\n \u4E3A\u5E94\u7528\u7A0B\u5E8F\u521B\u5EFA\u5FEB\u6377\u65B9\u5F0F\n
MSG_Help_mac_linux_install_dir=\u5E94\u7528\u7A0B\u5E8F\u5B89\u88C5\u76EE\u5F55\u7684\u7EDD\u5BF9\u8DEF\u5F84\n
MSG_Help_default_install_dir=OS X \u6216 Linux \u4E0A\u5E94\u7528\u7A0B\u5E8F\u5B89\u88C5\u76EE\u5F55\u7684\u7EDD\u5BF9\u8DEF\u5F84\u3002\n Windows \u4E0A\u5E94\u7528\u7A0B\u5E8F\u5B89\u88C5\u4F4D\u7F6E\u7684\u76F8\u5BF9\u5B50\u8DEF\u5F84\n \uFF08\u5982 "Program Files" \u6216 "AppData"\uFF09\u3002\n
diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsAppImageBuilder.java b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsAppImageBuilder.java
index e472da83f48..ef7139b61cd 100644
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsAppImageBuilder.java
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsAppImageBuilder.java
@@ -42,7 +42,7 @@ public class WindowsAppImageBuilder extends AbstractAppImageBuilder {
private static final ResourceBundle I18N = ResourceBundle.getBundle(
"jdk.jpackage.internal.resources.WinResources");
- private static final String TEMPLATE_APP_ICON ="java48.ico";
+ private static final String TEMPLATE_APP_ICON ="JavaApp.ico";
public static final BundlerParamInfo<Path> ICON_ICO =
new StandardBundlerParam<>(
diff --git a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/java48.ico b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/JavaApp.ico
index 8d2c9571ed9..8d2c9571ed9 100644
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/java48.ico
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/JavaApp.ico
Binary files differ
diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java
index d907a046f22..600249b056b 100644
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java
@@ -75,11 +75,11 @@ public final class LauncherIconVerifier {
public static Path getDefaultIcon() {
final String[] components;
if (TKit.isOSX()) {
- components = new String[] { "macosx", "java.icns" };
+ components = new String[] { "macosx", "JavaApp.icns" };
} else if (TKit.isLinux()) {
- components = new String[] { "linux", "java32.png" };
+ components = new String[] { "linux", "JavaApp.png" };
} else if (TKit.isWindows()) {
- components = new String[] { "windows", "java48.ico" };
+ components = new String[] { "windows", "JavaApp.ico" };
} else {
throw TKit.throwUnknownPlatformError();
}