diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk
index 0c5af57ed66..c1c51570a1d 100644
--- a/make/MacBundles.gmk
+++ b/make/MacBundles.gmk
@@ -38,11 +38,8 @@ ifeq ($(call isTargetOs, macosx), true)
MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
- BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
- BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM)
- BUNDLE_VERSION := $(VERSION_NUMBER)
ifeq ($(COMPANY_NAME), N/A)
BUNDLE_VENDOR := UNDEFINED
else
@@ -75,24 +72,26 @@ ifeq ($(call isTargetOs, macosx), true)
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
- @@ID@@ => $(BUNDLE_ID).jdk ; \
+ @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
- @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
- @@VERSION@@ => $(BUNDLE_VERSION) ; \
- @@VENDOR@@ => $(BUNDLE_VENDOR) , \
+ @@VERSION@@ => $(VERSION_NUMBER) ; \
+ @@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
+ @@VENDOR@@ => $(BUNDLE_VENDOR) ; \
+ @@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
- @@ID@@ => $(BUNDLE_ID).jre ; \
+ @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
- @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
- @@VERSION@@ => $(BUNDLE_VERSION) ; \
- @@VENDOR@@ => $(BUNDLE_VENDOR) , \
+ @@VERSION@@ => $(VERSION_NUMBER) ; \
+ @@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
+ @@VENDOR@@ => $(BUNDLE_VENDOR) ; \
+ @@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
diff --git a/make/autoconf/jdk-version.m4 b/make/autoconf/jdk-version.m4
index 15446c1343c..c5e23937ac6 100644
--- a/make/autoconf/jdk-version.m4
+++ b/make/autoconf/jdk-version.m4
@@ -67,34 +67,6 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(HOTSPOT_VM_DISTRO)
- # Set the MACOSX Bundle Name base
- AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
- [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
- @<:@not specified@:>@])])
- if test "x$with_macosx_bundle_name_base" = xyes; then
- AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
- elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
- AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
- elif test "x$with_macosx_bundle_name_base" != x; then
- # Set MACOSX_BUNDLE_NAME_BASE to the configured value.
- MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
- fi
- AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
-
- # Set the MACOSX Bundle ID base
- AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
- [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
- @<:@not specified@:>@])])
- if test "x$with_macosx_bundle_id_base" = xyes; then
- AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
- elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
- AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
- elif test "x$with_macosx_bundle_id_base" != x; then
- # Set MACOSX_BUNDLE_ID_BASE to the configured value.
- MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
- fi
- AC_SUBST(MACOSX_BUNDLE_ID_BASE)
-
# Set the JDK RC name
AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name],
[Set JDK RC name. This is used for FileDescription and ProductName properties
@@ -502,6 +474,60 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
VENDOR_VERSION_STRING="$with_vendor_version_string"
fi
+ # Set the MACOSX Bundle Name base
+ AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
+ [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
+ @<:@not specified@:>@])])
+ if test "x$with_macosx_bundle_name_base" = xyes; then
+ AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
+ elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
+ AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
+ elif test "x$with_macosx_bundle_name_base" != x; then
+ # Set MACOSX_BUNDLE_NAME_BASE to the configured value.
+ MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
+ fi
+ AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
+
+ # Set the MACOSX Bundle ID base
+ AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
+ [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
+ @<:@not specified@:>@])])
+ if test "x$with_macosx_bundle_id_base" = xyes; then
+ AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
+ elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
+ AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
+ elif test "x$with_macosx_bundle_id_base" != x; then
+ # Set MACOSX_BUNDLE_ID_BASE to the configured value.
+ MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
+ else
+ # If using the default value, append the VERSION_PRE if there is one
+ # to make it possible to tell official builds apart from developer builds
+ if test "x$VERSION_PRE" != x; then
+ MACOSX_BUNDLE_ID_BASE="$MACOSX_BUNDLE_ID_BASE-$VERSION_PRE"
+ fi
+ fi
+ AC_SUBST(MACOSX_BUNDLE_ID_BASE)
+
+ # Set the MACOSX CFBundleVersion field
+ AC_ARG_WITH(macosx-bundle-build-version, [AS_HELP_STRING([--with-macosx-bundle-build-version],
+ [Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
+ string composed of one to three period-separated integers and should represent the
+ build version. Defaults to the build number.])])
+ if test "x$with_macosx_bundle_build_version" = xyes; then
+ AC_MSG_ERROR([--with-macosx-bundle-build-version must have a value])
+ elif [ ! [[ $with_macosx_bundle_build_version =~ ^[0-9\.]*$ ]] ]; then
+ AC_MSG_ERROR([--with-macosx-bundle-build-version contains non numbers and periods: $with_macosx_bundle_build_version])
+ elif test "x$with_macosx_bundle_build_version" != x; then
+ MACOSX_BUNDLE_BUILD_VERSION="$with_macosx_bundle_build_version"
+ else
+ MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
+ # If VERSION_OPT consists of only numbers and periods, add it.
+ if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
+ MACOSX_BUNDLE_BUILD_VERSION+=".$VERSION_OPT"
+ fi
+ fi
+ AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
+
# We could define --with flags for these, if really needed
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
index fbaf2209ff3..14d7a18a0e8 100644
--- a/make/autoconf/spec.gmk.in
+++ b/make/autoconf/spec.gmk.in
@@ -170,6 +170,7 @@ COMPANY_NAME:=@COMPANY_NAME@
HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
+MACOSX_BUNDLE_BUILD_VERSION=@MACOSX_BUNDLE_BUILD_VERSION@
USERNAME:=@USERNAME@
VENDOR_URL:=@VENDOR_URL@
VENDOR_URL_BUG:=@VENDOR_URL_BUG@
diff --git a/make/common/modules/LauncherCommon.gmk b/make/common/modules/LauncherCommon.gmk
index c3bd0443d74..7ad0375e2e3 100644
--- a/make/common/modules/LauncherCommon.gmk
+++ b/make/common/modules/LauncherCommon.gmk
@@ -102,19 +102,19 @@ define SetupBuildLauncherBody
ifeq ($(call isTargetOs, macosx), true)
ifeq ($$($1_MACOSX_PRIVILEGED), true)
- $1_PLIST_SRC_FILE := Info-privileged.plist
- else
- $1_PLIST_SRC_FILE := Info-cmdline.plist
+ $1_PLIST_EXTRA := SecTaskAccessallowed
endif
$1_PLIST_FILE := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$1/Info.plist
$$(eval $$(call SetupTextFileProcessing, BUILD_PLIST_$1, \
- SOURCE_FILES := $$(TOPDIR)/src/java.base/macosx/native/launcher/$$($1_PLIST_SRC_FILE), \
+ SOURCE_FILES := $(TOPDIR)/make/data/bundle/cmdline-Info.plist, \
OUTPUT_FILE := $$($1_PLIST_FILE), \
REPLACEMENTS := \
- @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT).$1 ; \
+ @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).$1 ; \
@@VERSION@@ => $(VERSION_NUMBER) ; \
+ @@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
+ @@EXTRA@@ => $$($1_PLIST_EXTRA), \
))
$1_LDFLAGS += -sectcreate __TEXT __info_plist $$($1_PLIST_FILE)
@@ -187,6 +187,10 @@ define SetupBuildLauncherBody
$$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, java, /libjava) \
$$($1_WINDOWS_JLI_LIB)
endif
+
+ ifeq ($(call isTargetOs, macosx), true)
+ $$(BUILD_LAUNCHER_$1): $$($1_PLIST_FILE)
+ endif
endef
################################################################################
diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js
index ddad4b40619..36abc0a0ff4 100644
--- a/make/conf/jib-profiles.js
+++ b/make/conf/jib-profiles.js
@@ -1339,13 +1339,17 @@ var versionArgs = function(input, common) {
"--with-version-pre=" + version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE"),
"--without-version-opt");
} else if (input.build_type == "ci") {
- var optString = input.build_id_data.ciBuildNumber;
+ var ciBuildNumber = input.build_id_data.ciBuildNumber;
var preString = input.build_id_data.projectName;
if (preString == "jdk") {
preString = version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE");
}
args = concat(args, "--with-version-pre=" + preString,
- "--with-version-opt=" + optString);
+ "--with-version-opt=" + ciBuildNumber);
+ if (input.target_os == "macosx") {
+ args = concat(args, "--with-macosx-bundle-build-version="
+ + common.build_number + "." + ciBuildNumber);
+ }
} else {
args = concat(args, "--with-version-opt=" + common.build_id);
}
diff --git a/make/data/bundle/JDK-Info.plist b/make/data/bundle/JDK-Info.plist
index e37b4928064..0ad038fbc39 100644
--- a/make/data/bundle/JDK-Info.plist
+++ b/make/data/bundle/JDK-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.0
+ @@VERSION@@
CFBundleSignature
????
CFBundleVersion
- @@VERSION@@
+ @@BUILD_VERSION@@
NSMicrophoneUsageDescription
The application is requesting access to the microphone.
JavaVM
@@ -33,9 +33,9 @@
JVMMinimumFrameworkVersion
13.2.9
JVMMinimumSystemVersion
- 10.6.0
+ @@MACOSX_VERSION_MIN@@
JVMPlatformVersion
- @@PLATFORM_VERSION@@
+ @@VERSION@@
JVMVendor
@@VENDOR@@
JVMVersion
diff --git a/make/data/bundle/JRE-Info.plist b/make/data/bundle/JRE-Info.plist
index 0081b240b27..be2870cf209 100644
--- a/make/data/bundle/JRE-Info.plist
+++ b/make/data/bundle/JRE-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.0
+ @@VERSION@@
CFBundleSignature
????
CFBundleVersion
- @@VERSION@@
+ @@BUILD_VERSION@@
NSMicrophoneUsageDescription
The application is requesting access to the microphone.
JavaVM
@@ -29,9 +29,9 @@
JVMMinimumFrameworkVersion
13.2.9
JVMMinimumSystemVersion
- 10.6.0
+ @@MACOSX_VERSION_MIN@@
JVMPlatformVersion
- @@PLATFORM_VERSION@@
+ @@VERSION@@
JVMVendor
@@VENDOR@@
JVMVersion
diff --git a/src/java.base/macosx/native/launcher/Info-cmdline.plist b/make/data/bundle/cmdline-Info.plist
similarity index 90%
rename from src/java.base/macosx/native/launcher/Info-cmdline.plist
rename to make/data/bundle/cmdline-Info.plist
index c3728c62f0d..7d6af359128 100644
--- a/src/java.base/macosx/native/launcher/Info-cmdline.plist
+++ b/make/data/bundle/cmdline-Info.plist
@@ -7,10 +7,11 @@
CFBundleInfoDictionaryVersion
6.0
CFBundleShortVersionString
- 1.0
- CFBundleVersion
@@VERSION@@
+ CFBundleVersion
+ @@BUILD_VERSION@@
NSMicrophoneUsageDescription
The application is requesting access to the microphone.
+ @@EXTRA@@
diff --git a/src/java.base/macosx/native/launcher/Info-privileged.plist b/src/java.base/macosx/native/launcher/Info-privileged.plist
deleted file mode 100644
index 569c509b853..00000000000
--- a/src/java.base/macosx/native/launcher/Info-privileged.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- CFBundleIdentifier
- @@ID@@
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- OpenJDK Command
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- @@VERSION@@
- SecTaskAccess
- allowed
-
-