mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-05 04:31:36 +00:00
8263154: [macos] DMG builds have finder errors
Reviewed-by: herrick, asemenyuk
This commit is contained in:
parent
54cb388dce
commit
5b43b39e55
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -94,8 +94,12 @@ public abstract class MacBaseInstallerBundler extends AbstractBundler {
|
||||
(s, p) -> s);
|
||||
|
||||
protected static String getInstallDir(
|
||||
Map<String, ? super Object> params) {
|
||||
Map<String, ? super Object> params, boolean defaultOnly) {
|
||||
String returnValue = INSTALL_DIR.fetchFrom(params);
|
||||
if (defaultOnly && returnValue != null) {
|
||||
Log.info(I18N.getString("message.install-dir-ignored"));
|
||||
returnValue = null;
|
||||
}
|
||||
if (returnValue == null) {
|
||||
if (StandardBundlerParam.isRuntimeInstaller(params)) {
|
||||
returnValue = "/Library/Java/JavaVirtualMachines";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -126,7 +126,7 @@ public class MacDmgBundler extends MacBaseInstallerBundler {
|
||||
data.put("DEPLOY_VOLUME_PATH", volumePath.toString());
|
||||
data.put("DEPLOY_APPLICATION_NAME", APP_NAME.fetchFrom(params));
|
||||
|
||||
data.put("DEPLOY_INSTALL_LOCATION", getInstallDir(params));
|
||||
data.put("DEPLOY_INSTALL_LOCATION", getInstallDir(params, true));
|
||||
|
||||
createResource(DEFAULT_DMG_SETUP_SCRIPT, params)
|
||||
.setCategory(I18N.getString("resource.dmg-setup-script"))
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -208,10 +208,10 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
|
||||
|
||||
Map<String, String> data = new HashMap<>();
|
||||
|
||||
Path appLocation = Path.of(getInstallDir(params),
|
||||
Path appLocation = Path.of(getInstallDir(params, false),
|
||||
APP_NAME.fetchFrom(params) + ".app", "Contents", "app");
|
||||
|
||||
data.put("INSTALL_LOCATION", getInstallDir(params));
|
||||
data.put("INSTALL_LOCATION", getInstallDir(params, false));
|
||||
data.put("APP_LOCATION", appLocation.toString());
|
||||
|
||||
createResource(TEMPLATE_PREINSTALL_SCRIPT, params)
|
||||
@ -441,7 +441,7 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
|
||||
"--root",
|
||||
root,
|
||||
"--install-location",
|
||||
getInstallDir(params),
|
||||
getInstallDir(params, false),
|
||||
"--analyze",
|
||||
cpl.toAbsolutePath().toString());
|
||||
|
||||
@ -455,7 +455,7 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
|
||||
"--root",
|
||||
root,
|
||||
"--install-location",
|
||||
getInstallDir(params),
|
||||
getInstallDir(params, false),
|
||||
"--component-plist",
|
||||
cpl.toAbsolutePath().toString(),
|
||||
"--identifier",
|
||||
@ -468,7 +468,7 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
|
||||
"--root",
|
||||
root,
|
||||
"--install-location",
|
||||
getInstallDir(params),
|
||||
getInstallDir(params, false),
|
||||
"--component-plist",
|
||||
cpl.toAbsolutePath().toString(),
|
||||
"--scripts",
|
||||
@ -523,7 +523,7 @@ public class MacPkgBundler extends MacBaseInstallerBundler {
|
||||
commandLine.add("--component");
|
||||
Path p = Path.of(root, APP_NAME.fetchFrom(params) + ".app");
|
||||
commandLine.add(p.toAbsolutePath().toString());
|
||||
commandLine.add(getInstallDir(params));
|
||||
commandLine.add(getInstallDir(params, false));
|
||||
} else {
|
||||
commandLine.add("--distribution");
|
||||
commandLine.add(getConfig_DistributionXMLFile(params)
|
||||
|
||||
@ -87,3 +87,4 @@ message.preparing-scripts=Preparing package scripts.
|
||||
message.preparing-distribution-dist=Preparing distribution.dist: {0}.
|
||||
message.signing.pkg=Warning: For signing PKG, you might need to set "Always Trust" for your certificate using "Keychain Access" tool.
|
||||
message.setfile.dmg=Setting custom icon on DMG file skipped because 'SetFile' utility was not found. Installing Xcode with Command Line Tools should resolve this issue.
|
||||
message.install-dir-ignored=Warning: "--install-dir" is not supported by DMG and will be default to /Applications.
|
||||
|
||||
@ -86,3 +86,4 @@ message.preparing-scripts=\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30B9\u30AF\u30EA
|
||||
message.preparing-distribution-dist=distribution.dist\u3092\u6E96\u5099\u3057\u3066\u3044\u307E\u3059: {0}
|
||||
message.signing.pkg=\u8B66\u544A: PKG\u3078\u306E\u7F72\u540D\u306E\u5834\u5408\u3001\u300C\u30AD\u30FC\u30C1\u30A7\u30FC\u30F3\u30FB\u30A2\u30AF\u30BB\u30B9\u300D\u30C4\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u3066\u8A3C\u660E\u66F8\u306B\u300C\u5E38\u306B\u4FE1\u983C\u3059\u308B\u300D\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
message.setfile.dmg='SetFile'\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u304C\u898B\u3064\u304B\u3089\u306A\u3044\u305F\u3081\u3001DMG\u30D5\u30A1\u30A4\u30EB\u3067\u306E\u30AB\u30B9\u30BF\u30E0\u30FB\u30A2\u30A4\u30B3\u30F3\u306E\u8A2D\u5B9A\u304C\u30B9\u30AD\u30C3\u30D7\u3055\u308C\u307E\u3057\u305F\u3002Xcode\u3068\u30B3\u30DE\u30F3\u30C9\u30FB\u30E9\u30A4\u30F3\u30FB\u30C4\u30FC\u30EB\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u3068\u3001\u3053\u306E\u554F\u984C\u306F\u89E3\u6C7A\u3055\u308C\u307E\u3059\u3002
|
||||
message.install-dir-ignored=Warning: "--install-dir" is not supported by DMG and will be default to /Applications.
|
||||
|
||||
@ -86,3 +86,4 @@ message.preparing-scripts=\u6B63\u5728\u51C6\u5907\u7A0B\u5E8F\u5305\u811A\u672C
|
||||
message.preparing-distribution-dist=\u6B63\u5728\u51C6\u5907 distribution.dist: {0}\u3002
|
||||
message.signing.pkg=\u8B66\u544A\uFF1A\u8981\u5BF9 PKG \u8FDB\u884C\u7B7E\u540D\uFF0C\u53EF\u80FD\u9700\u8981\u4F7F\u7528\u201C\u5BC6\u94A5\u94FE\u8BBF\u95EE\u201D\u5DE5\u5177\u4E3A\u8BC1\u4E66\u8BBE\u7F6E\u201C\u59CB\u7EC8\u4FE1\u4EFB\u201D\u3002
|
||||
message.setfile.dmg=\u7531\u4E8E\u672A\u627E\u5230 'SetFile' \u5B9E\u7528\u7A0B\u5E8F\uFF0C\u8DF3\u8FC7\u4E86\u9488\u5BF9 DMG \u6587\u4EF6\u8BBE\u7F6E\u5B9A\u5236\u56FE\u6807\u7684\u64CD\u4F5C\u3002\u5B89\u88C5\u5E26\u547D\u4EE4\u884C\u5DE5\u5177\u7684 Xcode \u5E94\u80FD\u89E3\u51B3\u6B64\u95EE\u9898\u3002
|
||||
message.install-dir-ignored=Warning: "--install-dir" is not supported by DMG and will be default to /Applications.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user