Skip to content

Commit a3711e2

Browse files
Merge
2 parents 2d5d7e0 + ab6ea3b commit a3711e2

File tree

5 files changed

+52
-22
lines changed

5 files changed

+52
-22
lines changed

build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jfx.release.patch.version=0
5454
#
5555
##############################################################################
5656

57-
javadoc.bottom=<small><a href="http://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> Copyright &copy; 2008, 2019, Oracle and/or its affiliates. All rights reserved.</small>
57+
javadoc.bottom=<small><a href="http://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> Copyright &copy; 2008, 2020, Oracle and/or its affiliates. All rights reserved.</small>
5858

5959
javadoc.title=JavaFX 14
6060
javadoc.header=JavaFX&nbsp;14

buildSrc/mac.gradle

+33-19
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,37 @@ setupTools("mac_tools",
6161
} else if (!file(defaultSdkPath).isDirectory()) {
6262
// Get list of all macosx sdks
6363
ByteArrayOutputStream results = new ByteArrayOutputStream();
64-
exec {
64+
def xcodeBuildResult = exec {
6565
commandLine("xcodebuild", "-version", "-showsdks");
6666
setStandardOutput(results);
67+
ignoreExitValue(true);
6768
}
68-
69-
BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim()));
70-
// If our preferred SDK is in the list use it, else use the default
71-
String sdk = "macosx"
72-
String prefSdk = sdk + prefSdkVersion
73-
while (true) {
74-
def line = reader.readLine();
75-
if (line == null) break;
76-
if (line.contains("-sdk ${prefSdk}")) {
77-
sdk = prefSdk
78-
break;
69+
if (xcodeBuildResult.exitValue == 0) {
70+
BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim()));
71+
// If our preferred SDK is in the list use it, else use the default
72+
String sdk = "macosx"
73+
String prefSdk = sdk + prefSdkVersion
74+
while (true) {
75+
def line = reader.readLine();
76+
if (line == null) break;
77+
if (line.contains("-sdk ${prefSdk}")) {
78+
sdk = prefSdk
79+
break;
80+
}
7981
}
80-
}
8182

82-
results = new ByteArrayOutputStream();
83-
exec {
84-
commandLine("xcodebuild", "-version", "-sdk", sdk, "Path");
85-
setStandardOutput(results);
83+
results = new ByteArrayOutputStream();
84+
exec {
85+
commandLine("xcodebuild", "-version", "-sdk", sdk, "Path");
86+
setStandardOutput(results);
87+
}
88+
} else {
89+
// try with command line developer tools
90+
results = new ByteArrayOutputStream();
91+
exec {
92+
commandLine("xcrun", "--show-sdk-path");
93+
setStandardOutput(results);
94+
}
8695
}
8796
String sdkPath = results.toString().trim();
8897
propFile << "MACOSX_SDK_PATH=" << sdkPath << "\n";
@@ -97,7 +106,12 @@ println "MACOSX_MIN_VERSION = $MACOSX_MIN_VERSION"
97106
println "MACOSX_SDK_PATH = $MACOSX_SDK_PATH"
98107

99108
if (!file(MACOSX_SDK_PATH).isDirectory()) {
100-
throw new GradleException("FAIL: Cannot find $MACOSX_SDK_PATH")
109+
throw new GradleException(
110+
"""
111+
FAIL: Cannot find $MACOSX_SDK_PATH
112+
Install Xcode or Command line developer tool using `xcode-select --install`
113+
"""
114+
);
101115
}
102116

103117
// NOTE: There is no space between -iframework and the specified path
@@ -169,7 +183,7 @@ MAC.prism = [:]
169183
MAC.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
170184
MAC.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
171185
MAC.prism.compiler = compiler
172-
MAC.prism.ccFlags = ["-O3", "-DINLINE=inline", "-c", ccBaseFlags].flatten()
186+
MAC.prism.ccFlags = ["-O3", "-DINLINE=inline", "-c", IS_STATIC_BUILD ? "-DSTATIC_BUILD" : "", ccBaseFlags].flatten()
173187
MAC.prism.linker = linker
174188
MAC.prism.linkFlags = linkFlagsAlt
175189
MAC.prism.lib = "prism_common"

modules/javafx.fxml/src/main/docs/javafx/fxml/doc-files/introduction_to_fxml.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ <h2><a id="deploy_as_module">Deploying an Application as a Module</a></h2>
11001100
</p>
11011101
<hr>
11021102
<p>
1103-
<small><a href="http://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> Copyright &copy; 2008, 2019, Oracle and/or its affiliates. All rights reserved.</small>
1103+
<small><a href="http://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> Copyright &copy; 2008, 2020, Oracle and/or its affiliates. All rights reserved.</small>
11041104
</p>
11051105
</body>
11061106
</html>

modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6040,7 +6040,7 @@ <h2><a id="references">References</a></h2>
60406040
<p>[5] Uniform Resource Identifier (URI): Generic Syntax <a href="http://www.ietf.org/rfc/rfc3986">RFC-3986</a></p>
60416041
<hr>
60426042
<p>
6043-
<small><a href="http://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> Copyright &copy; 2008, 2019, Oracle and/or its affiliates. All rights reserved.</small>
6043+
<small><a href="http://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> Copyright &copy; 2008, 2020, Oracle and/or its affiliates. All rights reserved.</small>
60446044
</p>
60456045
<br>
60466046
</body>

modules/javafx.graphics/src/main/native-prism-sw/JNIUtil.c

+16
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@
2424
*/
2525

2626
#include <JNIUtil.h>
27+
#ifdef STATIC_BUILD
28+
JNIEXPORT jint JNICALL
29+
JNI_OnLoad_prism_sw(JavaVM *vm, void * reserved) {
30+
#ifdef JNI_VERSION_1_8
31+
//min. returned JNI_VERSION required by JDK8 for builtin libraries
32+
JNIEnv *env;
33+
if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_8) != JNI_OK) {
34+
return JNI_VERSION_1_4;
35+
}
36+
return JNI_VERSION_1_8;
37+
#else
38+
return JNI_VERSION_1_4;
39+
#endif
40+
}
41+
#endif // STATIC_BUILD
42+
2743

2844
jboolean
2945
initializeFieldIds(jfieldID* dest, JNIEnv* env, jclass classHandle,

0 commit comments

Comments
 (0)