Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrushforth committed Oct 24, 2019
2 parents 2d5d7e0 + ab6ea3b commit a3711e2
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jfx.release.patch.version=0
#
##############################################################################

javadoc.bottom=<small><a href="https://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>
javadoc.bottom=<small><a href="https://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>

javadoc.title=JavaFX 14
javadoc.header=JavaFX&nbsp;14
Expand Down
52 changes: 33 additions & 19 deletions buildSrc/mac.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,37 @@ setupTools("mac_tools",
} else if (!file(defaultSdkPath).isDirectory()) {
// Get list of all macosx sdks
ByteArrayOutputStream results = new ByteArrayOutputStream();
exec {
def xcodeBuildResult = exec {
commandLine("xcodebuild", "-version", "-showsdks");
setStandardOutput(results);
ignoreExitValue(true);
}

BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim()));
// If our preferred SDK is in the list use it, else use the default
String sdk = "macosx"
String prefSdk = sdk + prefSdkVersion
while (true) {
def line = reader.readLine();
if (line == null) break;
if (line.contains("-sdk ${prefSdk}")) {
sdk = prefSdk
break;
if (xcodeBuildResult.exitValue == 0) {
BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim()));
// If our preferred SDK is in the list use it, else use the default
String sdk = "macosx"
String prefSdk = sdk + prefSdkVersion
while (true) {
def line = reader.readLine();
if (line == null) break;
if (line.contains("-sdk ${prefSdk}")) {
sdk = prefSdk
break;
}
}
}

results = new ByteArrayOutputStream();
exec {
commandLine("xcodebuild", "-version", "-sdk", sdk, "Path");
setStandardOutput(results);
results = new ByteArrayOutputStream();
exec {
commandLine("xcodebuild", "-version", "-sdk", sdk, "Path");
setStandardOutput(results);
}
} else {
// try with command line developer tools
results = new ByteArrayOutputStream();
exec {
commandLine("xcrun", "--show-sdk-path");
setStandardOutput(results);
}
}
String sdkPath = results.toString().trim();
propFile << "MACOSX_SDK_PATH=" << sdkPath << "\n";
Expand All @@ -97,7 +106,12 @@ println "MACOSX_MIN_VERSION = $MACOSX_MIN_VERSION"
println "MACOSX_SDK_PATH = $MACOSX_SDK_PATH"

if (!file(MACOSX_SDK_PATH).isDirectory()) {
throw new GradleException("FAIL: Cannot find $MACOSX_SDK_PATH")
throw new GradleException(
"""
FAIL: Cannot find $MACOSX_SDK_PATH
Install Xcode or Command line developer tool using `xcode-select --install`
"""
);
}

// NOTE: There is no space between -iframework and the specified path
Expand Down Expand Up @@ -169,7 +183,7 @@ MAC.prism = [:]
MAC.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
MAC.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
MAC.prism.compiler = compiler
MAC.prism.ccFlags = ["-O3", "-DINLINE=inline", "-c", ccBaseFlags].flatten()
MAC.prism.ccFlags = ["-O3", "-DINLINE=inline", "-c", IS_STATIC_BUILD ? "-DSTATIC_BUILD" : "", ccBaseFlags].flatten()
MAC.prism.linker = linker
MAC.prism.linkFlags = linkFlagsAlt
MAC.prism.lib = "prism_common"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ <h2><a id="deploy_as_module">Deploying an Application as a Module</a></h2>
</p>
<hr>
<p>
<small><a href="https://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>
<small><a href="https://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>
</p>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -6040,7 +6040,7 @@ <h2><a id="references">References</a></h2>
<p>[5] Uniform Resource Identifier (URI): Generic Syntax <a href="https://www.ietf.org/rfc/rfc3986">RFC-3986</a></p>
<hr>
<p>
<small><a href="https://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>
<small><a href="https://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>
</p>
<br>
</body>
Expand Down
16 changes: 16 additions & 0 deletions modules/javafx.graphics/src/main/native-prism-sw/JNIUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@
*/

#include <JNIUtil.h>
#ifdef STATIC_BUILD
JNIEXPORT jint JNICALL
JNI_OnLoad_prism_sw(JavaVM *vm, void * reserved) {
#ifdef JNI_VERSION_1_8
//min. returned JNI_VERSION required by JDK8 for builtin libraries
JNIEnv *env;
if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_8) != JNI_OK) {
return JNI_VERSION_1_4;
}
return JNI_VERSION_1_8;
#else
return JNI_VERSION_1_4;
#endif
}
#endif // STATIC_BUILD


jboolean
initializeFieldIds(jfieldID* dest, JNIEnv* env, jclass classHandle,
Expand Down

0 comments on commit a3711e2

Please sign in to comment.