Compare commits

...

25 Commits
762 ... 800

Author SHA1 Message Date
Vitaly Provodin
d75142e9dc updated JTreg exclude list 2020-03-27 16:32:49 +07:00
Vitaly Provodin
ec88122f13 JBR-2212 fix misprint in linux_x86, linux_aarch64, osx_fastdebug scripts 2020-03-23 11:44:15 +07:00
Vitaly Provodin
59be7ec370 JBR-2217 provide JCEF-only (no JavaFX) bundle for master/202 branches 2020-03-19 20:39:01 +07:00
Vitaly Provodin
57ff1dba25 JBR-2212 add scripts for linux_x86, linux_aarch64, linux_x64_fastdebug, osx_fastdebug, windows_x86 2020-03-17 19:59:25 +07:00
Vitaly Provodin
f5fb718c86 updated JTreg exclude list 2020-03-16 16:00:22 +07:00
Vitaly Provodin
d1b5e75f13 updated JTreg exclude list 2020-03-16 15:22:22 +07:00
Ivan Gerasimov
b9d3ad70d7 JBR-2214 backport fix for CLion crashes on attempt to load Swift project
8213383: Wrap up pthread_cond_wait into a loop to workaround potential spurious wakeups
2020-03-16 11:28:39 +07:00
Vitaly Provodin
cb653e6a5d JBR-2212 add windows_x86 scripts 2020-03-13 15:44:47 +07:00
Vitaly Provodin
1c6c53eb2c JBR-1643 remove extra bash invocations 2020-03-12 21:36:17 +07:00
Vitaly Provodin
6d8d933e97 JBR-2181 fix windows test bundle 2020-03-12 16:04:04 +07:00
Vitaly Provodin
0dc2c5ca69 JBR-1643 set JOBS according to configure recommendations and add LOG info 2020-03-12 09:26:18 +07:00
Vitaly Provodin
586e2845dd reduce JOBS for make on Windows to 1 2020-03-11 16:53:48 +07:00
Vitaly Provodin
fdca477148 reduce JOBS for make on Windows to 4 2020-03-11 15:44:58 +07:00
Vitaly Provodin
49895b3e2f JBR-2209 backport fix for java/awt/Window/LocationAtScreenCorner/LocationAtScreenCorner.java
8232433: [macos 10.15] java/awt/Window/LocationAtScreenCorner/LocationAtScreenCorner.java may fail
2020-03-11 15:43:37 +07:00
Vitaly Provodin
5301d56ae2 JBR-2208 backport the fix for the test from OpenJDK 15
8235153: [TESTBUG] [macos 10.15] java/awt/Graphics/DrawImageBG/SystemBgColorTest.java fails
2020-03-11 15:09:02 +07:00
Vitaly Provodin
1eff1948a5 JBR-2181: create two separate JBR bundles with JFX and JFX+JCEF 2020-03-11 14:27:56 +07:00
Egor Ushakov
547aa5d178 8239055: Wrong implementation of VMState.hasListener
Correct the VMState.hasListener implementation to return WeakReference<VMListener> type

Reviewed-by: sspitsyn, poonam
2020-03-04 11:26:59 +03:00
Vitaly Provodin
0babe0f639 updated JTreg exclude list 2020-03-03 09:23:17 +07:00
Artem Bochkarev
8b027c4fbf JBR-2143: enable X11_DISABLE_OVERRIDE_FLAG by default only in KDE-desktop env
fixed "XFCE: No context menu or main menu popups from Full screen mode"
2020-03-02 13:39:00 +03:00
Mikhail Grishchenko
b46e74fe6f JBR-1414 [Test] downscale frames to run on low-dpi screens 2020-02-27 13:41:13 +03:00
Anton Tarasov
a855f3b835 JBR-2169 AWTThreading: remove tracked invocation event from completion listener 2020-02-25 10:20:24 +03:00
Anton Tarasov
10d38be7e7 [followup] JBR-2148 JCEF: JBR bundle has invalid app structure
Rename to ALT_CEF_BROWSER_SUBPROCESS in test.
2020-02-22 20:04:46 +03:00
Vitaly Provodin
08d1926f8b updated JTreg exclude list 2020-02-22 07:52:28 +07:00
Sergey Malenkov
bbdc159762 FractionalMetricsSupport 2020-02-21 19:00:52 +03:00
Anton Tarasov
bba297b4a4 JBR-2159 Native crash in thread AWT-EventQueue-0 when trying to push commit 2020-02-21 10:16:19 +03:00
30 changed files with 1035 additions and 357 deletions

View File

@@ -2,7 +2,7 @@
FROM centos:7
RUN yum -y install centos-release-scl
RUN yum -y install devtoolset-8
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
# Install Java 11
RUN wget https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_3-linux-x64-b360.2.tar.gz \
-O - | tar xz -C /

View File

@@ -0,0 +1,33 @@
Index: src/java.desktop/share/classes/module-info.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/java.desktop/share/classes/module-info.java (revision 08d1926f8b7c74da0e1144e0ce5912e7589c4688)
+++ src/java.desktop/share/classes/module-info.java (date 1583207610780)
@@ -109,10 +109,7 @@
// see make/GensrcModuleInfo.gmk
exports sun.awt to
jdk.accessibility,
- jdk.unsupported.desktop,
- jcef;
-
- exports java.awt.peer to jcef;
+ jdk.unsupported.desktop;
exports java.awt.dnd.peer to jdk.unsupported.desktop;
exports sun.awt.dnd to jdk.unsupported.desktop;
Index: modules.list
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules.list (revision 08d1926f8b7c74da0e1144e0ce5912e7589c4688)
+++ modules.list (date 1583207610776)
@@ -60,5 +60,4 @@
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
-jdk.hotspot.agent,
-jcef
+jdk.hotspot.agent

View File

@@ -0,0 +1,21 @@
Index: modules.list
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules.list (revision 57ff1dba25206f9f078b48995aa8744e51b1dd2a)
+++ modules.list (date 1584500341724)
@@ -20,13 +20,6 @@
java.transaction.xa,
java.xml,
java.xml.crypto,
-javafx.base,
-javafx.controls,
-javafx.fxml,
-javafx.graphics,
-javafx.media,
-javafx.swing,
-javafx.web,
jdk.accessibility,
jdk.aot,
jdk.charsets,

View File

@@ -0,0 +1,9 @@
#!/bin/bash -x
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
script_dir=jb/project/tools/linux/scripts
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?

View File

@@ -1,93 +0,0 @@
#!/bin/bash
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbrlw-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
function create_jbr {
if [ -d "$BASE_DIR/$JBR_BUNDLE" ]; then
rm -rf $BASE_DIR/$JBR_BUNDLE
fi
if [ ! -z "$1" ]; then
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
else
cat modules.list > modules_tmp.list
fi
echo Running jlink....
$JSDK/bin/jlink \
--module-path $JSDK/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
echo Creating $JBR.tar.gz ...
tar -pcf $JBR.tar -C $BASE_DIR $JBR_BUNDLE || exit $?
gzip $JBR.tar || exit $?
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
JBRLW_BASE_NAME=jbrlw-$JBSDK_VERSION
sh configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-pre= \
--with-version-opt=b$build_number \
--with-import-modules=./modular-sdk \
--enable-cds=yes || exit $?
make clean CONF=linux-x86_64-normal-server-release || exit $?
make images CONF=linux-x86_64-normal-server-release || exit $?
JSDK=build/linux-x86_64-normal-server-release/images/jdk
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
echo Fixing permissions
chmod -R a+r $JSDK
BASE_DIR=build/linux-x86_64-normal-server-release/images
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
echo Creating $JBSDK.tar.gz ...
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man -C $BASE_DIR $JBRSDK_BUNDLE || exit $?
gzip $JBSDK.tar || exit $?
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
JBR_BUNDLE=jbr
create_jbr
JBR=$JBRLW_BASE_NAME-linux-x64-b$build_number
JBR_BUNDLE=jbrlw
create_jbr "lw"
make test-image || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
echo Creating $JBSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?

View File

@@ -0,0 +1,77 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
sh configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-pre= \
--with-version-opt=b$build_number \
--with-boot-jdk=amazon-corretto-11.0.5.10.1-linux-aarch64 \
--with-import-modules=./modular-sdk \
--enable-cds=yes || exit $?
make clean CONF=linux-aarch64-normal-server-release || exit $?
make images CONF=linux-aarch64-normal-server-release test-image || exit $?
JBSDK=${JBRSDK_BASE_NAME}-linux-aarch64-b${build_number}
BASE_DIR=build/linux-aarch64-normal-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
tar -pcf $JBSDK.tar \
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
JBR=$JBR_BASE_NAME-linux-aarch64-b$build_number
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.aarch64
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
echo Creating $JBR.tar.gz ...
tar -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
gzip $JBR.tar || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-aarch64-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?

View File

@@ -0,0 +1,123 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
function create_jbr {
case "$1" in
"${bundle_type}_lw")
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
;;
"jfx" | "jcef")
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
"jfx_jcef")
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
;;
esac
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
echo Running jlink....
$JSDK/bin/jlink \
--module-path $JSDK/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE
if [[ "$bundle_type" == *jcef* ]]; then
cp -R $BASE_DIR/$JBR_BUNDLE $BASE_DIR/jbr
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
fi
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
echo Creating $JBR.tar.gz ...
rm -rf ${BASE_DIR}/jbr
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
tar -pcf $JBR.tar -C $BASE_DIR jbr || exit $?
gzip $JBR.tar || exit $?
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
git checkout -- modules.list src
case "$bundle_type" in
"jfx")
git apply -p0 < jb/project/tools/exclude_jcef_module.patch
;;
"jcef")
git apply -p0 < jb/project/tools/exclude_jfx_module.patch
;;
esac
sh configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=./modular-sdk \
--enable-cds=yes || exit $?
make images CONF=linux-x86_64-normal-server-release || exit $?
JSDK=build/linux-x86_64-normal-server-release/images/jdk
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
echo Fixing permissions
chmod -R a+r $JSDK
BASE_DIR=build/linux-x86_64-normal-server-release/images
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
if [[ "$bundle_type" == *jcef* ]]; then
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
fi
if [ "$bundle_type" == "jfx_jcef" ]; then
echo Creating $JBSDK.tar.gz ...
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR $JBRSDK_BUNDLE || exit $?
gzip $JBSDK.tar || exit $?
fi
JBR_BUNDLE=jbr_${bundle_type}
create_jbr ${bundle_type}
if [ "$bundle_type" == "jfx_jcef" ]; then
make test-image || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
echo Creating $JBSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?
fi

View File

@@ -0,0 +1,72 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
sh configure \
--disable-warnings-as-errors \
--with-debug-level=fastdebug \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-pre= \
--with-version-opt=b$build_number \
--with-import-modules=./modular-sdk \
--enable-cds=yes || exit $?
make clean CONF=linux-x86_64-normal-server-fastdebug || exit $?
make images CONF=linux-x86_64-normal-server-fastdebug || exit $?
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
BASE_DIR=build/linux-x86_64-normal-server-fastdebug/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
echo Creating $JBSDK.tar.gz ...
tar -pcf $JBSDK.tar \
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
JBR=$JBR_BASE_NAME-linux-x64-fastdebug-b$build_number
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list | sed s/" "//g | sed s/,$//g) \
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
echo Creating $JBR.tar.gz ...
tar -czf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
gzip $JBR.tar || exit $?

View File

@@ -0,0 +1,73 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
linux32 bash configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-pre= \
--with-version-opt=b$build_number \
--with-boot-jdk=/jbrsdk-11.0.5-b1 \
--enable-cds=yes || exit $?
make clean CONF=linux-x86-normal-server-release || exit $?
make images CONF=linux-x86-normal-server-release test-image || exit $?
JBSDK=${JBRSDK_BASE_NAME}-linux-x86-b${build_number}
BASE_DIR=build/linux-x86-normal-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man -C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
JBR=$JBR_BASE_NAME-linux-x86-b$build_number
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.x86 | sed s/" "//g | sed s/,$//g) --output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
echo Creating $JBR.tar.gz ...
tar -pcf $JBR.tar -C $BASE_DIR $JBR_BUNDLE || exit $?
gzip $JBR.tar || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x86-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' --exclude='test/hotspot/gtest' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?

View File

@@ -0,0 +1,9 @@
#!/bin/bash -x
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
script_dir=jb/project/tools/mac/scripts
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?

View File

@@ -1,13 +1,15 @@
#!/bin/bash
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbrlw-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
@@ -18,43 +20,77 @@
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
function create_jbr {
mkdir -p $JRE_CONTENTS
if [ -d "$JRE_HOME" ]; then
rm -rf $JRE_HOME
fi
if [ ! -z "$1" ]; then
case "$1" in
"${bundle_type}_lw")
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
else
;;
"jfx" | "jcef")
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
"jfx_jcef")
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
;;
esac
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
JRE_HOME=${JRE_CONTENTS}/Home
if [ -d "${JRE_CONTENTS}" ]; then
rm -rf ${JRE_CONTENTS}
fi
mkdir -p ${JRE_CONTENTS}
JBR=${JBR_BASE_NAME}-osx-x64-b${build_number}
${BASE_DIR}/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
--module-path ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || exit $?
grep -v "^JAVA_VERSION" ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release | grep -v "^MODULES" >> ${JRE_HOME}/release
cp -R ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/MacOS ${JRE_CONTENTS}
cp ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Info.plist ${JRE_CONTENTS}
if [[ "${bundle_type}" == *jcef* ]]; then
rm -rf ${JRE_CONTENTS}/Frameworks || exit $?
rm -rf ${JRE_CONTENTS}/Helpers || exit $?
cp -a jcef_mac/Frameworks ${JRE_CONTENTS} || exit $?
cp -a jcef_mac/Helpers ${JRE_CONTENTS} || exit $?
fi
$BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
--module-path $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $JRE_HOME || exit $?
grep -v "^JAVA_VERSION" $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/release | grep -v "^MODULES" >> $JRE_HOME/release
cp -R $BASE_DIR/$JBRSDK_BUNDLE/Contents/MacOS $JRE_CONTENTS
cp $BASE_DIR/$JBRSDK_BUNDLE/Contents/Info.plist $JRE_CONTENTS
cp -a jcef_mac/Frameworks $JRE_CONTENTS || exit $?
cp -a jcef_mac/Helpers $JRE_CONTENTS || exit $?
echo Creating $JBR.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBR.tar.gz --exclude='*.dSYM' --exclude='man' -C $BASE_DIR $JBR_BUNDLE || exit $?
echo Creating ${JBR}.tar.gz ...
rm -rf ${BASE_DIR}/jbr
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || exit $?
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
JBRLW_BASE_NAME=jbrlw-$JBSDK_VERSION
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
git checkout -- modules.list src
case "$bundle_type" in
"jfx")
git apply -p0 < jb/project/tools/exclude_jcef_module.patch
;;
"jcef")
git apply -p0 < jb/project/tools/exclude_jfx_module.patch
;;
esac
sh configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-version-pre= \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-opt=b$build_number \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=./modular-sdk \
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
--enable-cds=yes || exit $?
@@ -62,7 +98,7 @@ sh configure \
make images CONF=macosx-x86_64-normal-server-release || exit $?
JSDK=build/macosx-x86_64-normal-server-release/images/jdk-bundle
JBSDK=$JBRSDK_BASE_NAME-osx-x64-b$build_number
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
BASE_DIR=jre
JBRSDK_BUNDLE=jbrsdk
@@ -70,34 +106,29 @@ JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR
mkdir $BASE_DIR || exit $?
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
cp -a build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-$JBSDK_VERSION_WITH_DOTS.jdk \
$BASE_DIR/$JBRSDK_BUNDLE || exit $?
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
cp -a jcef_mac/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
cp -a jcef_mac/Helpers $BASE_DIR/$JBRSDK_BUNDLE/Contents/
if [[ "$bundle_type" == *jcef* ]]; then
cp -a jcef_mac/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
cp -a jcef_mac/Helpers $BASE_DIR/$JBRSDK_BUNDLE/Contents/
fi
if [ "$bundle_type" == "jfx_jcef" ]; then
echo Creating $JBSDK.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
$JBRSDK_BUNDLE || exit $?
fi
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
$JBRSDK_BUNDLE || exit $?
JBR_BUNDLE=jbr_${bundle_type}
create_jbr "${bundle_type}" || exit $?
JBR=$JBR_BASE_NAME-osx-x64-b$build_number
JBR_BUNDLE=jbr
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
JRE_HOME=$JRE_CONTENTS/Home
create_jbr
if [ "$bundle_type" == "jfx_jcef" ]; then
make test-image || exit $?
JBR=$JBRLW_BASE_NAME-osx-x64-b$build_number
JBR_BUNDLE=jbrlw
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
JRE_HOME=$JRE_CONTENTS/Home
create_jbr "lw"
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
make test-image || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
echo Creating $JBSDK_TEST.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/macosx-x86_64-normal-server-release/images \
--exclude='test/jdk/demos' test || exit $?
echo Creating $JBRSDK_TEST.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/macosx-x86_64-normal-server-release/images \
--exclude='test/jdk/demos' test || exit $?
fi

View File

@@ -0,0 +1,83 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
sh configure \
--disable-warnings-as-errors \
--with-debug-level=fastdebug \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-pre= \
--with-version-opt=b$build_number \
--with-import-modules=./modular-sdk \
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
--enable-cds=yes || exit $?
make clean CONF=macosx-x86_64-normal-server-fastdebug || exit $?
make images CONF=macosx-x86_64-normal-server-fastdebug || exit $?
JSDK=build/macosx-x86_64-normal-server-fastdebug/images/jdk-bundle
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
BASE_DIR=jre
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR
mkdir $BASE_DIR || exit $?
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
cp -a jcef_mac/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
cp -a jcef_mac/Helpers $BASE_DIR/$JBRSDK_BUNDLE/Contents
COPYFILE_DISABLE=1 \
tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
${JBRSDK_BUNDLE} || exit $?
JBR_BUNDLE=jbr
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
JRE_HOME=$JRE_CONTENTS/Home
JBR_BASE_NAME=jbr-$JBSDK_VERSION
mkdir -p $JRE_CONTENTS
if [ -d "$JRE_HOME" ]; then
rm -rf $JRE_HOME
fi
JBR=${JBR_BASE_NAME}-osx-x64-fastdebug-b${build_number}
$BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
--module-path $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list | sed s/" "//g) --output $JRE_HOME || exit $?
grep -v "^JAVA_VERSION" $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/release | grep -v "^MODULES" >> $JRE_HOME/release
cp -R $BASE_DIR/$JBRSDK_BUNDLE/Contents/MacOS $JRE_CONTENTS
cp $BASE_DIR/$JBRSDK_BUNDLE/Contents/Info.plist $JRE_CONTENTS
cp -a jcef_mac/Frameworks ${JRE_CONTENTS} || exit $?
cp -a jcef_mac/Helpers ${JRE_CONTENTS} || exit $?
echo Creating $JBR.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBR.tar.gz --exclude='*.dSYM' --exclude='man' -C $BASE_DIR $JBR_BUNDLE || exit $?

View File

@@ -0,0 +1,9 @@
#!/bin/bash -x
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
script_dir=jb/project/tools/windows/scripts
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?

View File

@@ -1,75 +0,0 @@
#!/bin/bash
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbrlw-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
function create_jbr {
rm -rf $BASE_DIR/$JBR_BUNDLE
if [ ! -z "$1" ]; then
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
else
cat modules.list > modules_tmp.list
fi
$JSDK/bin/jlink \
--module-path $JSDK/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE || exit $?
cp -R jcef_win_x64/* $BASE_DIR/$JBR_BUNDLE/bin
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" $JSDK/release | grep -v \"^MODULES\" >> $BASE_DIR/$JBR_BUNDLE/release
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
JBRLW_BASE_NAME=jbrlw-$JBSDK_VERSION
WORK_DIR=$(pwd)
PATH="/usr/local/bin:/usr/bin:$PATH"
./configure \
--disable-warnings-as-errors \
--disable-debug-symbols \
--with-target-bits=64 \
--with-version-pre= \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-opt=b$build_number \
--with-import-modules=$WORK_DIR/modular-sdk \
--with-toolchain-version=2015 \
--with-boot-jdk=$BOOT_JDK \
--disable-ccache \
--enable-cds=yes || exit 1
make clean CONF=windows-x86_64-normal-server-release || exit 1
make images CONF=windows-x86_64-normal-server-release || exit 1
make -d test-image || exit 1
JSDK=build/windows-x86_64-normal-server-release/images/jdk
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
BASE_DIR=build/windows-x86_64-normal-server-release/images
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR/$JBRSDK_BUNDLE && rsync -a --exclude demo --exclude sample $JSDK/ $JBRSDK_BUNDLE || exit 1
cp -R jcef_win_x64/* $JBRSDK_BUNDLE/bin
JBR_BUNDLE=jbr
create_jbr
JBR_BUNDLE=jbrlw
create_jbr "lw"

View File

@@ -0,0 +1,100 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
function create_jbr {
case "$1" in
"${bundle_type}_lw")
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
;;
"jfx" | "jcef" | "jfx_jcef")
cat modules.list > modules_tmp.list
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
;;
esac
rm -rf ${JBR_BUNDLE}
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
if [[ "${bundle_type}" == *jcef* ]]
then
cp -R jcef_win_x64/* ${JBR_BUNDLE}/bin
fi
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release
}
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
git checkout -- modules.list src
case "$bundle_type" in
"jfx")
echo "Excluding jcef modules"
git apply -p0 < jb/project/tools/exclude_jcef_module.patch
;;
"jcef")
echo "Excluding jfx modules"
git apply -p0 < jb/project/tools/exclude_jfx_module.patch
;;
esac
PATH="/usr/local/bin:/usr/bin:${PATH}"
./configure \
--disable-warnings-as-errors \
--disable-debug-symbols \
--with-target-bits=64 \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=${WORK_DIR}/modular-sdk \
--with-toolchain-version=2015 \
--with-boot-jdk=${BOOT_JDK} \
--disable-ccache \
--enable-cds=yes || exit 1
if [ "$bundle_type" == "jfx_jcef" ]; then
make LOG=info images CONF=windows-x86_64-normal-server-release test-image || exit 1
else
make LOG=info images CONF=windows-x86_64-normal-server-release || exit 1
fi
JSDK=build/windows-x86_64-normal-server-release/images/jdk
if [[ "$bundle_type" == *jcef* ]]; then
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
fi
BASE_DIR=build/windows-x86_64-normal-server-release/images
JBRSDK_BUNDLE=jbrsdk
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
cp -R jcef_win_x64/* ${JBRSDK_BUNDLE}/bin
JBR_BUNDLE=jbr_${bundle_type}
create_jbr ${bundle_type}
#JBR_BUNDLE=jbr_${bundle_type}_lw
#create_jbr ${bundle_type}_lw

View File

@@ -0,0 +1,57 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
PATH="/usr/local/bin:/usr/bin:${PATH}"
./configure \
--disable-warnings-as-errors \
--disable-debug-symbols \
--with-target-bits=32 \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-toolchain-version=2015 \
--with-boot-jdk=${BOOT_JDK} \
--disable-ccache \
--enable-cds=yes || exit 1
make clean CONF=windows-x86-normal-server-release || exit 1
make LOG=info images CONF=windows-x86-normal-server-release test-image || exit 1
JBSDK=${JBRSDK_BASE_NAME}-windows-x86-b${build_number}
BASE_DIR=build/windows-x86-normal-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
JBR_BUNDLE=jbr
rm -rf ${JBR_BUNDLE}
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.x86 | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release

View File

@@ -0,0 +1,72 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
function pack_jbr {
case "$1" in
"${bundle_type}_lw")
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
;;
"jfx" | "jcef")
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
;;
"jfx_jcef")
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
;;
*)
echo "***ERR*** bundle was not specified" && exit 1
;;
esac
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
echo Creating $JBR.tar.gz ...
rm -rf ${BASE_DIR}/jbr
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1
#rm -rf ${BASE_DIR}/${JBR_BUNDLE}
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
IMAGES_DIR=build/windows-x86_64-normal-server-release/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
BASE_DIR=.
if [ "$bundle_type" == "jfx_jcef" ]; then
JBRSDK_BUNDLE=jbrsdk
echo Creating $JBSDK.tar.gz ...
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
fi
JBR_BUNDLE=jbr_${bundle_type}
pack_jbr $bundle_type
if [ "$bundle_type" == "jfx_jcef" ]; then
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1
fi

View File

@@ -1,13 +1,15 @@
#!/bin/bash
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbrlw-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
@@ -21,26 +23,23 @@ build_number=$3
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
JBRLW_BASE_NAME=jbrlw-$JBSDK_VERSION
JSDK=build/windows-x86_64-normal-server-release/images/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
IMAGES_DIR=build/windows-x86-normal-server-release/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x86-b$build_number
BASE_DIR=.
JBRSDK_BUNDLE=jbrsdk
BASE_DIR=build/windows-x86_64-normal-server-release/images
echo Creating $JBSDK.tar.gz ...
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
JBR_BUNDLE=jbr
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
echo Creating $JBR.tar.gz ...
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $JBR_BUNDLE || exit 1
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
JBR_BUNDLE=jbrlw
JBR=$JBRLW_BASE_NAME-windows-x64-b$build_number
JBR=$JBR_BASE_NAME-windows-x86-b$build_number
echo Creating $JBR.tar.gz ...
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $JBR_BUNDLE || exit 1
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR ${JBR_BUNDLE} || exit 1
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x86-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $BASE_DIR --exclude='test/jdk/demos' test || exit 1
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1

View File

@@ -67,7 +67,7 @@ static __thread bool reentry = false; /* prevent reentry deadlock (per-thread) *
/* Used to synchronize the installation of signal handlers. */
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
static pthread_t tid = 0;
static pthread_t tid;
typedef void (*sa_handler_t)(int);
typedef void (*sa_sigaction_t)(int, siginfo_t *, void *);
@@ -100,8 +100,11 @@ static void signal_lock() {
/* When the jvm is installing its set of signal handlers, threads
* other than the jvm thread should wait. */
if (jvm_signal_installing) {
if (tid != pthread_self()) {
pthread_cond_wait(&cond, &mutex);
/* tid is not initialized until jvm_signal_installing is set to true. */
if (pthread_equal(tid, pthread_self()) == 0) {
do {
pthread_cond_wait(&cond, &mutex);
} while (jvm_signal_installing);
}
}
}

View File

@@ -1175,6 +1175,15 @@ JNF_COCOA_ENTER(env);
// ensure we repaint the whole window after the resize operation
// (this will also re-enable screen updates, which were disabled above)
// TODO: send PaintEvent
// the macOS may ignore our "setFrame" request, in this, case the
// windowDidMove() will not come and we need to manually resync the
// "java.awt.Window" and NSWindow locations, because "java.awt.Window"
// already uses location ignored by the macOS.
// see sun.lwawt.LWWindowPeer#notifyReshape()
if (!NSEqualRects(rect, [nsWindow frame])) {
[window _deliverMoveResizeEvent];
}
}];
JNF_COCOA_EXIT(env);

View File

@@ -375,6 +375,7 @@ public abstract class JComponent extends Container implements Serializable,
* AA text hints.
*/
private transient Object aaHint;
private transient Object fmHint;
private transient Object lcdRenderingHint;
static {
@@ -677,6 +678,8 @@ public abstract class JComponent extends Container implements Serializable,
// aaText shouldn't persist between look and feels, reset it.
aaHint = UIManager.getDefaults().get(
RenderingHints.KEY_TEXT_ANTIALIASING);
fmHint = UIManager.getDefaults().get(
RenderingHints.KEY_FRACTIONALMETRICS);
lcdRenderingHint = UIManager.getDefaults().get(
RenderingHints.KEY_TEXT_LCD_CONTRAST);
ComponentUI oldUI = ui;
@@ -4047,6 +4050,8 @@ public abstract class JComponent extends Container implements Serializable,
public final Object getClientProperty(Object key) {
if (key == RenderingHints.KEY_TEXT_ANTIALIASING) {
return aaHint;
} else if (key == RenderingHints.KEY_FRACTIONALMETRICS) {
return fmHint;
} else if (key == RenderingHints.KEY_TEXT_LCD_CONTRAST) {
return lcdRenderingHint;
}
@@ -4091,6 +4096,9 @@ public abstract class JComponent extends Container implements Serializable,
if (key == RenderingHints.KEY_TEXT_ANTIALIASING) {
aaHint = value;
return;
} else if (key == RenderingHints.KEY_FRACTIONALMETRICS) {
fmHint = value;
return;
} else if (key == RenderingHints.KEY_TEXT_LCD_CONTRAST) {
lcdRenderingHint = value;
return;

View File

@@ -85,7 +85,7 @@ public class AWTThreading {
public Thread newThread(Runnable r) {
Thread t = factory.newThread(r);
t.setDaemon(true);
t.setName("AWT-" + AWTThreading.class.getSimpleName() + " " + t.getName());
t.setName(AWTThreading.class.getSimpleName() + " " + t.getName());
return t;
}
})
@@ -161,24 +161,42 @@ public class AWTThreading {
instance.invocations.push(new TrackingQueue());
}
final TrackingQueue queue = instance.invocations.peek();
InvocationEvent event = new InvocationEvent(source, runnable, listener, catchThrowables) {
final SoftReference<TrackingQueue> queueRef = new SoftReference<>(queue);
final InvocationEvent[] eventRef = new InvocationEvent[1];
queue.add(eventRef[0] = new InvocationEvent(
source,
runnable,
// Wrap the original completion listener so that it:
// - guarantees a single run either from dispatch or dispose
// - removes the invocation event from the tracking queue
new Runnable() {
SoftReference<TrackingQueue> queueRef = new SoftReference<>(queue);
@Override
public void run() {
if (queueRef != null) {
if (listener != null) {
listener.run();
}
TrackingQueue q = queueRef.get();
if (q != null) {
q.remove(eventRef[0]);
q.clear();
}
queueRef = null;
}
}
},
catchThrowables)
{
@Override
public void dispatch() {
if (!isDispatched()) {
super.dispatch();
TrackingQueue queue = queueRef.get();
if (queue != null) {
queue.remove(this);
queueRef.clear();
}
}
}
};
queue.add(event);
return event;
});
return eventRef[0];
}
}
return new InvocationEvent(source, runnable, listener, catchThrowables);

View File

@@ -68,6 +68,7 @@ import java.text.AttributedCharacterIterator;
import java.text.AttributedString;
import java.text.BreakIterator;
import java.text.CharacterIterator;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -103,9 +104,11 @@ import sun.font.FontUtilities;
import sun.java2d.SunGraphicsEnvironment;
import sun.print.ProxyPrintGraphics;
import static java.awt.RenderingHints.KEY_FRACTIONALMETRICS;
import static java.awt.RenderingHints.KEY_TEXT_ANTIALIASING;
import static java.awt.RenderingHints.KEY_TEXT_LCD_CONTRAST;
import static java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT;
import static java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
import static java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT;
import static java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR;
import static java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB;
@@ -566,25 +569,9 @@ public class SwingUtilities2 {
? null
: c.getClientProperty(KEY_TEXT_ANTIALIASING);
if (aaHint != null) {
Object oldContrast = null;
Object oldAAValue = g2.getRenderingHint(KEY_TEXT_ANTIALIASING);
if (aaHint != oldAAValue) {
g2.setRenderingHint(KEY_TEXT_ANTIALIASING, aaHint);
} else {
oldAAValue = null;
}
Object lcdContrastHint = c.getClientProperty(
KEY_TEXT_LCD_CONTRAST);
if (lcdContrastHint != null) {
oldContrast = g2.getRenderingHint(KEY_TEXT_LCD_CONTRAST);
if (lcdContrastHint.equals(oldContrast)) {
oldContrast = null;
} else {
g2.setRenderingHint(KEY_TEXT_LCD_CONTRAST,
lcdContrastHint);
}
}
Object oldAAValue = configureHint(KEY_TEXT_ANTIALIASING, g2, aaHint);
Object oldFMValue = configureHint(KEY_FRACTIONALMETRICS, g2, c);
Object oldContrast = configureHint(KEY_TEXT_LCD_CONTRAST, g2, c);
if (needsTextLayout) {
TextLayout layout = createTextLayout(c, text, g2.getFont(),
@@ -594,12 +581,9 @@ public class SwingUtilities2 {
g2.drawString(text, x, y);
}
if (oldAAValue != null) {
g2.setRenderingHint(KEY_TEXT_ANTIALIASING, oldAAValue);
}
if (oldContrast != null) {
g2.setRenderingHint(KEY_TEXT_LCD_CONTRAST, oldContrast);
}
restoreHint(KEY_TEXT_ANTIALIASING, g2, oldAAValue);
restoreHint(KEY_FRACTIONALMETRICS, g2, oldFMValue);
restoreHint(KEY_TEXT_LCD_CONTRAST, g2, oldContrast);
return;
}
@@ -905,34 +889,15 @@ public class SwingUtilities2 {
Graphics2D g2 = (Graphics2D) g;
if (aaHint != null) {
Object oldContrast = null;
Object oldAAValue = g2.getRenderingHint(KEY_TEXT_ANTIALIASING);
if (aaHint != null && aaHint != oldAAValue) {
g2.setRenderingHint(KEY_TEXT_ANTIALIASING, aaHint);
} else {
oldAAValue = null;
}
Object lcdContrastHint = c.getClientProperty(KEY_TEXT_LCD_CONTRAST);
if (lcdContrastHint != null) {
oldContrast = g2.getRenderingHint(KEY_TEXT_LCD_CONTRAST);
if (lcdContrastHint.equals(oldContrast)) {
oldContrast = null;
} else {
g2.setRenderingHint(KEY_TEXT_LCD_CONTRAST,
lcdContrastHint);
}
}
Object oldAAValue = configureHint(KEY_TEXT_ANTIALIASING, g2, aaHint);
Object oldFMValue = configureHint(KEY_FRACTIONALMETRICS, g2, c);
Object oldContrast = configureHint(KEY_TEXT_LCD_CONTRAST, g2, c);
g2.drawString(new String(data, offset, length), x, y);
if (oldAAValue != null) {
g2.setRenderingHint(KEY_TEXT_ANTIALIASING, oldAAValue);
}
if (oldContrast != null) {
g2.setRenderingHint(KEY_TEXT_LCD_CONTRAST, oldContrast);
}
restoreHint(KEY_TEXT_ANTIALIASING, g2, oldAAValue);
restoreHint(KEY_FRACTIONALMETRICS, g2, oldFMValue);
restoreHint(KEY_TEXT_LCD_CONTRAST, g2, oldContrast);
}
else {
g2.drawString(new String(data, offset, length), x, y);
@@ -1249,7 +1214,6 @@ public class SwingUtilities2 {
*/
private static FontRenderContext getFRCProperty(JComponent c) {
if (c != null) {
GraphicsConfiguration gc = c.getGraphicsConfiguration();
AffineTransform tx = (gc == null) ? null : gc.getDefaultTransform();
if (tx == null && !GraphicsEnvironment.isHeadless()) {
@@ -1260,16 +1224,22 @@ public class SwingUtilities2 {
.getDefaultTransform();
}
Object aaHint = c.getClientProperty(KEY_TEXT_ANTIALIASING);
return getFRCFromCache(tx, aaHint);
if (aaHint == null) aaHint = VALUE_TEXT_ANTIALIAS_DEFAULT;
Object fmHint = c.getClientProperty(KEY_FRACTIONALMETRICS);
if (fmHint == null) fmHint = VALUE_FRACTIONALMETRICS_DEFAULT;
return getFRCFromCache(tx, aaHint, fmHint);
}
return null;
}
private static final Object APP_CONTEXT_FRC_CACHE_KEY = new Object();
private static FontRenderContext getFRCFromCache(AffineTransform tx,
Object aaHint) {
if (tx == null && aaHint == null) {
private static FontRenderContext getFRCFromCache(AffineTransform tx, Object aaHint, Object fmHint) {
if ((tx == null || tx.isIdentity())
&& (aaHint == VALUE_TEXT_ANTIALIAS_OFF || aaHint == VALUE_TEXT_ANTIALIAS_DEFAULT)
&& (fmHint == VALUE_FRACTIONALMETRICS_OFF || fmHint == VALUE_FRACTIONALMETRICS_DEFAULT)) {
return null;
}
@@ -1283,41 +1253,31 @@ public class SwingUtilities2 {
}
Object key = (tx == null)
? aaHint
: (aaHint == null ? tx : new KeyPair(tx, aaHint));
? new KeyArray(aaHint, fmHint)
: new KeyArray(tx, aaHint, fmHint);
FontRenderContext frc = cache.get(key);
if (frc == null) {
aaHint = (aaHint == null) ? VALUE_TEXT_ANTIALIAS_OFF : aaHint;
frc = new FontRenderContext(tx, aaHint,
VALUE_FRACTIONALMETRICS_DEFAULT);
cache.put(key, frc);
}
return frc;
return cache.computeIfAbsent(key, k -> new FontRenderContext(tx, aaHint, fmHint));
}
private static class KeyPair {
private static class KeyArray {
private final Object[] array;
private final Object key1;
private final Object key2;
public KeyPair(Object key1, Object key2) {
this.key1 = key1;
this.key2 = key2;
KeyArray(Object... array) {
this.array = array;
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof KeyPair)) {
public boolean equals(Object object) {
if (!(object instanceof KeyArray)) {
return false;
}
KeyPair that = (KeyPair) obj;
return this.key1.equals(that.key1) && this.key2.equals(that.key2);
KeyArray that = (KeyArray) object;
return Arrays.equals(that.array, array);
}
@Override
public int hashCode() {
return key1.hashCode() + 37 * key2.hashCode();
return Arrays.hashCode(array);
}
}
@@ -2349,4 +2309,45 @@ public class SwingUtilities2 {
var oldTx = oldGC != null ? oldGC.getDefaultTransform() : null;
return !Objects.equals(newTx, oldTx);
}
/**
* @param key the key of the hint to be set
* @param g the graphics to configure
* @param c the component that provides a hint value
* @return a value previously set in the given graphics,
* or {@code null} if a hint value is not set
*/
private static Object configureHint(RenderingHints.Key key, Graphics2D g, JComponent c) {
if (c == null) return null; // component is not specified
return configureHint(key, g, c.getClientProperty(key));
}
/**
* @param key the key of the hint to be set
* @param g the graphics to configure
* @param newValue the new value to set
* @return a value previously set in the given graphics,
* or {@code null} if a hint value is not set
*/
private static Object configureHint(RenderingHints.Key key, Graphics2D g, Object newValue) {
if (newValue == null) return null; // new value is not provided
Object oldValue = g.getRenderingHint(key);
if (newValue.equals(oldValue)) return null; // value is not changed
g.setRenderingHint(key, newValue);
return oldValue;
}
/**
* @param key the key of the hint to be set
* @param g the graphics to configure
* @param oldValue the stored value to set
*/
private static void restoreHint(RenderingHints.Key key, Graphics2D g, Object oldValue) {
if (oldValue == null) return; // nothing to restore
g.setRenderingHint(key, oldValue);
}
}

View File

@@ -69,10 +69,8 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
//
// enable X11_DISABLE_OVERRIDE_FLAG by default (users haven't found side-effects), see
// https://youtrack.jetbrains.com/issue/JBR-1680#focus=streamItem-27-3924178.0-0
private static final boolean X11_DISABLE_OVERRIDE_FLAG =
GetPropertyAction.privilegedGetProperty("x11.disable.override.flag", "true").equalsIgnoreCase("true");
private static final boolean X11_DISABLE_OVERRIDE_XWINDOWPEER =
GetPropertyAction.privilegedGetProperty("x11.disable.override.xwindowpeer", "false").equalsIgnoreCase("true");
private static final boolean X11_DISABLE_OVERRIDE_FLAG;
private static final boolean X11_DISABLE_OVERRIDE_XWINDOWPEER;
// should be synchronized on awtLock
private static Set<XWindowPeer> windows = new HashSet<XWindowPeer>();
@@ -151,6 +149,17 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
*/
private static final int MAXIMUM_BUFFER_LENGTH_NET_WM_ICON = (2<<15) - 1;
static {
/* https://userbase.kde.org/KDE_System_Administration/Environment_Variables#KDE_FULL_SESSION */
final String kdeSession = AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getenv("KDE_FULL_SESSION"));
final boolean isKDE = kdeSession != null && !kdeSession.isEmpty();
X11_DISABLE_OVERRIDE_FLAG =
GetPropertyAction.privilegedGetProperty("x11.disable.override.flag", isKDE ? "true" : "false").equalsIgnoreCase("true");
X11_DISABLE_OVERRIDE_XWINDOWPEER =
GetPropertyAction.privilegedGetProperty("x11.disable.override.xwindowpeer", "false").equalsIgnoreCase("true");
}
void preInit(XCreateWindowParams params) {
target = (Component)params.get(TARGET);
windowType = ((Window)target).getType();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@@ -179,7 +179,14 @@ class VMState {
}
synchronized boolean hasListener(VMListener listener) {
return listeners.contains(listener);
Iterator<WeakReference<VMListener>> iter = listeners.iterator();
while (iter.hasNext()) {
WeakReference<VMListener> ref = iter.next();
if (listener.equals(ref.get())) {
return true;
}
}
return false;
}
synchronized void removeListener(VMListener listener) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2020, 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
@@ -28,8 +28,14 @@
* @run main SystemBgColorTest
*/
import java.awt.*;
import java.awt.image.*;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.SystemColor;
import java.awt.image.BufferedImage;
import java.awt.image.DataBuffer;
import java.awt.image.IndexColorModel;
public class SystemBgColorTest {
public static final int TESTW = 10;
@@ -109,12 +115,20 @@ public class SystemBgColorTest {
}
public static void test(Image src, BufferedImage dst, Color bg) {
Graphics g = dst.getGraphics();
Graphics2D g = (Graphics2D) dst.getGraphics();
g.setComposite(AlphaComposite.Src);
g.setColor(Color.white);
g.fillRect(0, 0, TESTW, TESTH);
g.drawImage(src, 0, 0, bg, null);
if (dst.getRGB(0, 0) != bg.getRGB()) {
error("bad bg pixel for: "+bg);
int dstRGB = dst.getRGB(0, 0);
int bgRGB = bg.getRGB();
if (!dst.getColorModel().hasAlpha()) {
bgRGB |= 0xFF000000;
}
if (dstRGB != bgRGB) {
System.err.println("Actual: " + Integer.toHexString(dstRGB));
System.err.println("Expected: " + Integer.toHexString(bgRGB));
error("bad bg pixel for: " + bg);
}
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, 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
@@ -21,6 +21,7 @@
* questions.
*/
import java.awt.AWTException;
import java.awt.Frame;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
@@ -31,15 +32,21 @@ import java.awt.Robot;
/**
* @test
* @key headful
* @bug 8201364
* @bug 8201364 8232433
* @summary Component.getLocation() should returns correct location if
* Component.setBounds() was ignored by the OS
*/
public final class LocationAtScreenCorner {
public static void main(final String[] args) throws Exception {
test(true);
test(false);
}
private static void test(final boolean undecorated) throws AWTException {
Robot robot = new Robot();
Frame frame = new Frame();
frame.setUndecorated(undecorated);
frame.setSize(200, 200);
frame.setLocationRelativeTo(null);
frame.setVisible(true);

View File

@@ -166,7 +166,7 @@ class DragSourceFrame extends JFrame implements DragGestureListener {
void initUI() {
this.setLocation(0, 0);
JPanel contentPane = new JPanel(null);
contentPane.setPreferredSize(new Dimension(100, 100));
contentPane.setPreferredSize(new Dimension(50, 50));
sourcePanel = new JPanel() {
@Override
@@ -174,10 +174,10 @@ class DragSourceFrame extends JFrame implements DragGestureListener {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.setColor(this.getBackground());
g2.fillRect(0, 0, 100, 100);
g2.fillRect(0, 0, 50, 50);
}
};
sourcePanel.setBounds(0, 0, 100, 100);
sourcePanel.setBounds(0, 0, 50,50);
sourcePanel.setEnabled(true);
sourcePanel.setBackground(Color.white);
@@ -291,7 +291,7 @@ class DropTargetFrame extends JFrame {
void initUI(Point frameLocation) {
this.setLocation(frameLocation);
JPanel contentPane = new JPanel(null);
contentPane.setPreferredSize(new Dimension(400, 400));
contentPane.setPreferredSize(new Dimension(200,200));
dtPanel = new JPanel() {
@Override
@@ -299,11 +299,11 @@ class DropTargetFrame extends JFrame {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.setColor(this.getBackground());
g2.fillRect(0, 0, 200, 200);
g2.fillRect(0, 0, 100,100);
}
};
dtPanel.setBounds(100, 100, 200, 200);
dtPanel.setBounds(50,50, 100, 100);
dtPanel.setEnabled(true);
dtPanel.setBackground(Color.white);
dtPanel.setDropTarget(new DropTarget(dtPanel, DnDConstants.ACTION_COPY_OR_MOVE, new DropTargetAdapter() {

View File

@@ -71,19 +71,19 @@ public abstract class JBCefApp {
@Override
protected String[] applyPlatformSettings(CefSettings settings) {
String ALT_CEF_FRAMEWORK_DIR = System.getenv("ALT_CEF_FRAMEWORK_DIR");
String ALT_CEF_HELPER_DIR = System.getenv("ALT_CEF_HELPER_DIR");
if (ALT_CEF_FRAMEWORK_DIR == null || ALT_CEF_HELPER_DIR == null) {
String ALT_CEF_BROWSER_SUBPROCESS = System.getenv("ALT_CEF_BROWSER_SUBPROCESS");
if (ALT_CEF_FRAMEWORK_DIR == null || ALT_CEF_BROWSER_SUBPROCESS == null) {
String CONTENTS_PATH = System.getProperty("java.home") + "/..";
if (ALT_CEF_FRAMEWORK_DIR == null) {
ALT_CEF_FRAMEWORK_DIR = CONTENTS_PATH + "/Frameworks/Chromium Embedded Framework.framework";
}
if (ALT_CEF_HELPER_DIR == null) {
ALT_CEF_HELPER_DIR = CONTENTS_PATH + "/Helpers";
if (ALT_CEF_BROWSER_SUBPROCESS == null) {
ALT_CEF_BROWSER_SUBPROCESS = CONTENTS_PATH + "/Helpers/jcef Helper.app/Contents/MacOS/jcef Helper";
}
}
return new String[] {
"--framework-dir-path=" + normalize(ALT_CEF_FRAMEWORK_DIR),
"--browser-subprocess-path=" + normalize(ALT_CEF_HELPER_DIR) + "/jcef Helper.app/Contents/MacOS/jcef Helper",
"--browser-subprocess-path=" + normalize(ALT_CEF_BROWSER_SUBPROCESS),
"--disable-in-process-stack-traces"
};
}

View File

@@ -219,6 +219,7 @@ java/awt/Graphics/CopyScaledArea/CopyScaledAreaTest.java
java/awt/Graphics/LineClipTest.java JRE-898 macosx-all
java/awt/Graphics2D/CopyAreaOOB.java 7001973 windows-all,macosx-all,linux-all
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8197796 generic-all
java/awt/Graphics2D/DrawString/LCDTextSrcEa.java 8223543 generic-all
java/awt/Graphics2D/DrawString/RotTransText.java 8197797 generic-all
java/awt/Graphics2D/DrawString/TextRenderingTest.java 8169464 windows-all
java/awt/Graphics2D/FillTexturePaint/FillTexturePaint.java 8169463 windows-all
@@ -550,7 +551,7 @@ java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersInKeyEvent.java
java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java 7124407 macosx-all,windows-all,linux-all
java/awt/Mouse/RemovedComponentMouseListener/RemovedComponentMouseListener.java 8157170 macosx-all,windows-all
java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.html 8148041 linux-all
java/awt/MouseInfo/GetPointerInfoTest.java 8158798 windows-all
java/awt/MouseInfo/GetPointerInfoTest.java 8130741 macosx-all
java/awt/Multiscreen/LocationRelativeToTest/LocationRelativeToTest.java 7124230 generic-all
java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java 8155744 windows-all,linux-all
java/awt/Multiscreen/WindowGCChangeTest/WindowGCChangeTest.html 8168132 macosx-all,linux-all
@@ -823,6 +824,7 @@ com/sun/nio/sctp/SctpChannel/SocketOptionTests.java
# jdk_security
sun/security/lib/cacerts/VerifyCACerts.java 8240268 generic-all
sun/security/pkcs11/ec/TestKeyFactory.java 8026976 generic-all
sun/security/pkcs11/Secmod/AddTrustedCert.java 8180837 generic-all
sun/security/pkcs11/tls/TestKeyMaterial.java 8180837 generic-all
@@ -902,7 +904,7 @@ javax/swing/JFileChooser/DeserializedJFileChooser/DeserializedJFileChooserTest.j
javax/swing/JFrame/8016356/bug8016356.java 8169955 windows-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8193942 generic-all
javax/swing/JInternalFrame/5066752/bug5066752.java 8207850 macosx-all,windows-all
javax/swing/JInternalFrame/8020708/bug8020708.java 8226230 linux-all
javax/swing/JInternalFrame/8020708/bug8020708.java 8226230 linux-all,windows-all
javax/swing/JInternalFrame/8069348/bug8069348.java 8208570 macosx-all,windows-all,linux-all
javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java 8203918 windows-all,linux-all
javax/swing/JInternalFrame/8145896/TestJInternalFrameMaximize.java 8194944 macosx-all,windows-all,linux-all
@@ -1008,7 +1010,7 @@ javax/swing/UIDefaults/8133926/InternalFrameIcon.java
javax/swing/UIDefaults/8149879/InternalResourceBundle.java 8199054 windows-all
javax/swing/UITest/UITest.java 8198392 generic-all
javax/swing/border/Test6981576.java 8198339 generic-all
javax/swing/dnd/7171812/bug7171812.java 8041447 macosx-all,windows-all
javax/swing/dnd/7171812/bug7171812.java 8041447 macosx-all,windows-all,linux-all
javax/swing/dnd/8139050/NativeErrorsInTableDnD.java 8202765 macosx-all,linux-all
javax/swing/plaf/basic/BasicComboBoxEditor/Test8015336.java 8198394 generic-all
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8194945 macosx-all,linux-all,windows-all
@@ -1249,5 +1251,5 @@ javax/swing/LookAndFeel/8145547/DemandGTK.java
javax/swing/LookAndFeel/8146276/NimbusGlueTest.java JBR-1977 linux-aarch64
sanity/client/SwingSet/src/GridBagLayoutDemoTest.java JBR-1977 linux-aarch64
jb/java/jcef/JCEFStartupTest.java JBR-1996,JBR-2094 macosx-all,linux-i386,windows-x86
jb/java/jcef/JCEFStartupTest.java JBR-1996 linux-i386,windows-x86
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTest.java nobug windows-6.1 not supported on Windows 7