mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-26 11:19:42 +01:00
Compare commits
26 Commits
1049
...
win_touch_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73ad96297b | ||
|
|
27eafd8a53 | ||
|
|
96da1139c0 | ||
|
|
668570bc61 | ||
|
|
d3ec3d899d | ||
|
|
d1479872f2 | ||
|
|
e8e4741bb0 | ||
|
|
33db034d49 | ||
|
|
8b7ad2e58f | ||
|
|
696a9a4128 | ||
|
|
54bb49caeb | ||
|
|
9c0afe3a7d | ||
|
|
6dd334f9f0 | ||
|
|
96dd8fcf48 | ||
|
|
9b960dd02a | ||
|
|
6b7d5fd58c | ||
|
|
ebcdeb7d80 | ||
|
|
67870df19e | ||
|
|
afd19dbefd | ||
|
|
a55097289b | ||
|
|
8de39b80cd | ||
|
|
0f038754e5 | ||
|
|
4aa278e4a0 | ||
|
|
e3562ecc99 | ||
|
|
b62d47da9c | ||
|
|
e748f39e20 |
14
.idea/vcs.xml
generated
14
.idea/vcs.xml
generated
@@ -1,5 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="[A-Z]+\-\d+" />
|
||||
<option name="linkRegexp" value="http://youtrack.jetbrains.com/issue/$0" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(\d+)\:" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
|
||||
@@ -8,6 +8,5 @@ RUN wget https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrs
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /jbrsdk
|
||||
ENV PATH $JAVA_HOME/bin:/opt/rh/devtoolset-8/root/usr/bin:$PATH
|
||||
RUN mkdir .git
|
||||
RUN git config user.email "builduser@jetbrains.com"
|
||||
RUN git config user.name "builduser"
|
||||
RUN git config --global user.email "teamcity@buildserver.intellij.net"
|
||||
RUN git config --global user.name "builduser"
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
VENDOR_NAME="JetBrains s.r.o."
|
||||
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION_WITH_DOTS}.${JDK_BUILD_NUMBER}-${build_number}"
|
||||
[ -z ${bundle_type} ] || VENDOR_VERSION_STRING="${VENDOR_VERSION_STRING}-${bundle_type}"
|
||||
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=0
|
||||
HEAD_REVISION=0
|
||||
|
||||
function do_exit() {
|
||||
exit_code=$1
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD modules.list src/java.desktop/share/classes/module-info.java
|
||||
if [ $do_reset_dcevm -eq 1 ]; then
|
||||
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
|
||||
fi
|
||||
exit $exit_code
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/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 "dcevm" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -1,12 +1,16 @@
|
||||
#!/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
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release 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
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# jfx - the release bundles with javafx
|
||||
# jcef_jfx - the release bundles with jcef and javafx
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -19,8 +23,8 @@
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_linux_x64
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
@@ -34,65 +38,81 @@ source jb/project/tools/common.sh
|
||||
|
||||
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" | "dcevm" | "nomod")
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
|
||||
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
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
|
||||
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
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE || do_exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -R $BASE_DIR/$JBR_BUNDLE $BASE_DIR/jbr
|
||||
cp -R ${JCEF_PATH}/* $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 ...
|
||||
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 $?
|
||||
tar -pcf ${JBR}.tar -C ${BASE_DIR} jbr || do_exit $?
|
||||
gzip -f ${JBR}.tar || do_exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"jfx_jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
sh configure \
|
||||
@@ -104,44 +124,44 @@ sh configure \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--enable-cds=yes || exit $?
|
||||
--enable-cds=yes || do_exit $?
|
||||
|
||||
make images CONF=$RELEASE_NAME || exit $?
|
||||
make clean images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
|
||||
JSDK=build/${RELEASE_NAME}/images/jdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=build/${RELEASE_NAME}/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE}
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBRSDK_BUNDLE/lib || do_exit $?
|
||||
fi
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR $JBRSDK_BUNDLE || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
tar -pcf ${JBSDK}.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C ${BASE_DIR} ${JBRSDK_BUNDLE} || do_exit $?
|
||||
gzip -f ${JBSDK}.tar || do_exit $?
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr ${bundle_type}
|
||||
create_jbr || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make test-image || exit $?
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make test-image CONF=$RELEASE_NAME || do_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
|
||||
tar -pcf ${JBRSDK_TEST}.tar -C ${BASE_DIR} --exclude='test/jdk/demos' test || do_exit $?
|
||||
gzip -f ${JBRSDK_TEST}.tar || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,90 +0,0 @@
|
||||
#!/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)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_linux_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--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 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 ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
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 $?
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/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 "dcevm" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -1,12 +1,16 @@
|
||||
#!/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
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release 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
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# jfx - the release bundles with javafx
|
||||
# jcef_jfx - the release bundles with jcef and javafx
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -19,8 +23,8 @@
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_mac
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_mac
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
@@ -34,23 +38,20 @@ source jb/project/tools/common.sh
|
||||
|
||||
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" | "dcevm" | "nomod")
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
|
||||
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
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
|
||||
@@ -62,44 +63,64 @@ function create_jbr {
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
${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 $?
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || do_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* ]] || [[ "${bundle_type}" == *dcevm* ]]; then
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || exit $?
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || do_exit $?
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || do_exit $?
|
||||
fi
|
||||
|
||||
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 $?
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || do_exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=macosx-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"jfx_jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=macosx-x86_64-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
sh configure \
|
||||
@@ -112,42 +133,45 @@ sh configure \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || exit $?
|
||||
--enable-cds=yes || do_exit $?
|
||||
|
||||
make clean images CONF=$RELEASE_NAME || exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk-bundle
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
JSDK=build/${RELEASE_NAME}/images/jdk-bundle
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || exit $?
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
mkdir $BASE_DIR || do_exit $?
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
fi
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "{$bundle_type}" == "fd" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
|
||||
[ -f "${JBSDK}.tar.gz" ] && rm "${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 $?
|
||||
${JBRSDK_BUNDLE} || do_exit $?
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr "${bundle_type}" || exit $?
|
||||
create_jbr || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make test-image || exit $?
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
|
||||
|
||||
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
|
||||
[ -f "${JBRSDK_TEST}.tar.gz" ] && rm "${JBRSDK_TEST}.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBRSDK_TEST}.tar.gz -C build/${RELEASE_NAME}/images \
|
||||
--exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,99 +0,0 @@
|
||||
#!/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)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_mac
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--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_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
|
||||
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_PATH}/Frameworks ${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 $?
|
||||
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git modules.list modules.list
|
||||
index e23d793..368d022 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -54,4 +54,7 @@ jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
-jdk.hotspot.agent
|
||||
+jdk.hotspot.agent,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index b663b38..3e9acdc 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -109,7 +109,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef,
|
||||
+ jogl.all;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
18
jb/project/tools/patches/add_jfx_module.patch
Normal file
18
jb/project/tools/patches/add_jfx_module.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
diff --git modules.list modules.list
|
||||
index e23d793ca61..14b9a6c8e50 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -20,6 +20,13 @@ java.sql.rowset,
|
||||
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.attach,
|
||||
@@ -1,33 +0,0 @@
|
||||
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 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
|
||||
+++ src/java.desktop/share/classes/module-info.java (date 1588168285537)
|
||||
@@ -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 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
|
||||
+++ modules.list (date 1588168285505)
|
||||
@@ -61,5 +61,4 @@
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
-jdk.hotspot.agent,
|
||||
-jcef
|
||||
+jdk.hotspot.agent
|
||||
@@ -1,21 +0,0 @@
|
||||
Index: modules.list
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- modules.list (revision ab073976c4f85f154ff1421b7ac888eee86b6595)
|
||||
+++ modules.list (date 1588171510146)
|
||||
@@ -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.attach,
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/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 "dcevm" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -1,12 +1,16 @@
|
||||
#!/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
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release 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
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# jfx - the release bundles with javafx
|
||||
# jcef_jfx - the release bundles with jcef and javafx
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -19,104 +23,124 @@
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_win_x64
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WORK_DIR=$(pwd)
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_win_x64}
|
||||
JCEF_PATH=${JCEF_PATH:=${WORK_DIR}/jcef_win_x64}
|
||||
TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION:=2015}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
"jfx" | "jcef" | "jfx_jcef" | "dcevm" | "nomod")
|
||||
cat modules.list > modules_tmp.list
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
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 ${JBR_BUNDLE} || exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]]
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
|
||||
then
|
||||
cp -R ${JCEF_PATH}/* ${JBR_BUNDLE}/bin
|
||||
cp -R ${JCEF_PATH}/* ${JBR_BUNDLE}/bin || do_exit $?
|
||||
fi
|
||||
echo Modifying release info ...
|
||||
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
echo "Excluding jcef modules"
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"jcef")
|
||||
echo "Excluding jfx modules"
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"jfx_jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jfx_module.patch || do_exit $?
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
echo "Adding dcevm patches"
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
sh ./configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-target-bits=64 \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-toolchain-version=2015 \
|
||||
--with-toolchain-version=${TOOLCHAIN_VERSION} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
--enable-cds=yes || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make LOG=info clean images CONF=$RELEASE_NAME test-image || exit 1
|
||||
if [ "${bundle_type}" == "jcef" ]; then
|
||||
make LOG=info clean images test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
else
|
||||
make LOG=info clean images CONF=$RELEASE_NAME || exit 1
|
||||
make LOG=info clean images CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
if [[ "$bundle_type" == *jcef* ]]; then
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
fi
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
cp -R ${JCEF_PATH}/* ${JBRSDK_BUNDLE}/bin
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]
|
||||
then
|
||||
cp -R ${JCEF_PATH}/* ${JBRSDK_BUNDLE}/bin
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr ${bundle_type}
|
||||
create_jbr || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -1,76 +0,0 @@
|
||||
#!/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)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_win_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_win_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-target-bits=64 \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-toolchain-version=2015 \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
|
||||
make LOG=info clean images CONF=$RELEASE_NAME || exit 1
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
cp -R ${JCEF_PATH}/* ${JBRSDK_BUNDLE}/bin
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
|
||||
cp -R ${JCEF_PATH}/* ${JBR_BUNDLE}/bin
|
||||
echo Modifying release info ...
|
||||
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
|
||||
@@ -1,12 +1,16 @@
|
||||
#!/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
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release 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
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# jfx - the release bundles with javafx
|
||||
# jcef_jfx - the release bundles with jcef and javafx
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -16,59 +20,68 @@
|
||||
# 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)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function pack_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
;;
|
||||
"jfx" | "jcef" | "dcevm" | "nomod")
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jfx" | "jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
echo "***ERR*** bundle was not specified" && do_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}
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || do_exit $?
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-release
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"fd")
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
esac
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
|
||||
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || do_exit $?
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
pack_jbr $bundle_type
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
if [ "$bundle_type" == "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
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/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
|
||||
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x64-fastdebug-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
JBR=$JBR_BASE_NAME-windows-x64-fastdebug-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1
|
||||
10
modules.list
10
modules.list
@@ -20,13 +20,6 @@ java.sql.rowset,
|
||||
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.attach,
|
||||
@@ -61,5 +54,4 @@ jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
jcef
|
||||
jdk.hotspot.agent
|
||||
|
||||
@@ -4568,17 +4568,6 @@ void Threads::deoptimized_wrt_marked_nmethods() {
|
||||
p->deoptimized_wrt_marked_nmethods();
|
||||
}
|
||||
}
|
||||
jlong Threads::compile_total_time_ms() {
|
||||
jlong accumulator = 0;
|
||||
MutexLocker mu(Threads_lock);
|
||||
for (JavaThread* i = _thread_list; i != NULL; i = i->next()) {
|
||||
if (i->is_Compiler_thread()) {
|
||||
jlong time = os::thread_cpu_time((Thread *) i, true) / 1000 / 1000;
|
||||
accumulator += time;
|
||||
}
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
|
||||
// Get count Java threads that are waiting to enter the specified monitor.
|
||||
|
||||
@@ -2250,8 +2250,6 @@ class Threads: AllStatic {
|
||||
|
||||
// Deoptimizes all frames tied to marked nmethods
|
||||
static void deoptimized_wrt_marked_nmethods();
|
||||
|
||||
static jlong compile_total_time_ms();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -892,7 +892,7 @@ static jlong get_long_attribute(jmmLongAttribute att) {
|
||||
return Management::ticks_to_ms(os::elapsed_counter());
|
||||
|
||||
case JMM_COMPILE_TOTAL_TIME_MS:
|
||||
return Threads::compile_total_time_ms();
|
||||
return Management::ticks_to_ms(CompileBroker::total_compilation_ticks());
|
||||
|
||||
case JMM_OS_PROCESS_ID:
|
||||
return os::current_process_id();
|
||||
|
||||
@@ -89,7 +89,11 @@ final class CClipboard extends SunClipboard {
|
||||
|
||||
try {
|
||||
byte[] bytes = DataTransferer.getInstance().translateTransferable(contents, flavor, format);
|
||||
setData(bytes, format);
|
||||
if (DataFlavor.javaFileListFlavor.equals(flavor)) {
|
||||
writeObjects(bytes);
|
||||
} else {
|
||||
setData(bytes, format);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Fix 4696186: don't print exception if data with
|
||||
// javaJVMLocalObjectMimeType failed to serialize.
|
||||
@@ -127,6 +131,7 @@ final class CClipboard extends SunClipboard {
|
||||
|
||||
private native void declareTypes(long[] formats, SunClipboard newOwner);
|
||||
private native void setData(byte[] data, long format);
|
||||
private native void writeObjects(byte[] data);
|
||||
|
||||
void checkPasteboardAndNotify() {
|
||||
if (checkPasteboardWithoutNotification()) {
|
||||
|
||||
@@ -297,18 +297,6 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
if (component.getInputMethodRequests() == null) {
|
||||
imInstance = null;
|
||||
}
|
||||
|
||||
LWWindowPeer windowPeer = peer.getPlatformWindow().getPeer();
|
||||
if (windowPeer.isSimpleWindow()) {
|
||||
// A simple window gains focus. Cocoa won't dispatch IME events into the simple window, but into its owner.
|
||||
// This IM represents the focused component in the simple window. We will use the owner as IME proxy.
|
||||
// For that, this IM is set for the owner and is dropped for the simple window.
|
||||
Window owner = windowPeer.getTarget().getOwner();
|
||||
assert owner != null && owner.isActive();
|
||||
long ownerPtr = getNativeViewPtr((LWComponentPeer)AWTAccessor.getComponentAccessor().getPeer(owner));
|
||||
nativeNotifyPeer(ownerPtr, this);
|
||||
imInstance = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (peer != null) {
|
||||
|
||||
@@ -174,6 +174,48 @@ JNF_COCOA_ENTER(env);
|
||||
JNF_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_CClipboard
|
||||
* Method: writeObjects
|
||||
* Signature: ([BJ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CClipboard_writeObjects
|
||||
(JNIEnv *env, jobject inObject, jbyteArray inBytes, jlong inFormat)
|
||||
{
|
||||
if (inBytes == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
JNF_COCOA_ENTER(env);
|
||||
jint nBytes = (*env)->GetArrayLength(env, inBytes);
|
||||
jbyte *rawBytes = (*env)->GetPrimitiveArrayCritical(env, inBytes, NULL);
|
||||
CHECK_NULL(rawBytes);
|
||||
NSData *bytesAsData = [NSData dataWithBytes:rawBytes length:nBytes];
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, inBytes, rawBytes, JNI_ABORT);
|
||||
NSString *format = formatForIndex(inFormat);
|
||||
NSMutableArray *formatArray = [NSMutableArray arrayWithCapacity:2];
|
||||
const char *bytes = [bytesAsData bytes];
|
||||
BOOL isStart=YES;
|
||||
for (int i = 0; i < [bytesAsData length]; i++) {
|
||||
if ((unsigned char)bytes[i] == 0) {
|
||||
isStart = YES;
|
||||
} else {
|
||||
if (isStart) {
|
||||
isStart = NO;
|
||||
NSString *path = [NSString stringWithUTF8String:(const char *)&bytes[i]];
|
||||
NSURL *fileURL = [NSURL fileURLWithPath:path relativeToURL:nil];
|
||||
[formatArray addObject:fileURL];
|
||||
}
|
||||
}
|
||||
}
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^() {
|
||||
[[NSPasteboard generalPasteboard] writeObjects:formatArray];
|
||||
}];
|
||||
JNF_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_CClipboard
|
||||
* Method: getClipboardFormats
|
||||
|
||||
@@ -95,8 +95,6 @@ import sun.awt.AppContext;
|
||||
import sun.awt.ComponentFactory;
|
||||
import sun.security.action.GetBooleanAction;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
import sun.awt.AppContext;
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.awt.ConstrainableGraphics;
|
||||
import sun.awt.EmbeddedFrame;
|
||||
import sun.awt.RequestFocusController;
|
||||
@@ -112,7 +110,6 @@ import sun.java2d.SunGraphics2D;
|
||||
import sun.java2d.SunGraphicsEnvironment;
|
||||
import sun.java2d.pipe.Region;
|
||||
import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
import sun.swing.SwingAccessor;
|
||||
import sun.util.logging.PlatformLogger;
|
||||
|
||||
@@ -226,6 +223,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Component");
|
||||
private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.Component");
|
||||
private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Component");
|
||||
private static final PlatformLogger focusRequestLog = PlatformLogger.getLogger("jb.focus.requests");
|
||||
|
||||
/**
|
||||
* The peer of the component. The peer implements the component's
|
||||
@@ -7958,6 +7956,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
boolean focusedWindowChangeAllowed,
|
||||
FocusEvent.Cause cause)
|
||||
{
|
||||
if (focusRequestLog.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
focusRequestLog.fine("requestFocus("
|
||||
+ (temporary ? "temporary," : "")
|
||||
+ (focusedWindowChangeAllowed ? "" : "inWindow,")
|
||||
+ cause + ") for " + this, new Throwable());
|
||||
}
|
||||
// 1) Check if the event being dispatched is a system-generated mouse event.
|
||||
AWTEvent currentEvent = EventQueue.getCurrentEvent();
|
||||
if (currentEvent instanceof MouseEvent &&
|
||||
|
||||
@@ -382,6 +382,7 @@ public class Window extends Container implements Accessible {
|
||||
private static final long serialVersionUID = 4497834738069338734L;
|
||||
|
||||
private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Window");
|
||||
private static final PlatformLogger focusRequestLog = PlatformLogger.getLogger("jb.focus.requests");
|
||||
|
||||
private static final boolean locationByPlatformProp;
|
||||
|
||||
@@ -1308,6 +1309,9 @@ public class Window extends Container implements Accessible {
|
||||
// This functionality is implemented in a final package-private method
|
||||
// to insure that it cannot be overridden by client subclasses.
|
||||
final void toFront_NoClientCode() {
|
||||
if (focusRequestLog.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
focusRequestLog.fine("toFront() for" + this, new Throwable());
|
||||
}
|
||||
if (visible) {
|
||||
WindowPeer peer = (WindowPeer)this.peer;
|
||||
if (peer != null) {
|
||||
@@ -1351,6 +1355,9 @@ public class Window extends Container implements Accessible {
|
||||
// This functionality is implemented in a final package-private method
|
||||
// to insure that it cannot be overridden by client subclasses.
|
||||
final void toBack_NoClientCode() {
|
||||
if (focusRequestLog.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
focusRequestLog.fine("toBack() for " + this, new Throwable());
|
||||
}
|
||||
if(isAlwaysOnTop()) {
|
||||
try {
|
||||
setAlwaysOnTop(false);
|
||||
|
||||
@@ -109,10 +109,7 @@ module java.desktop {
|
||||
// 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;
|
||||
|
||||
@@ -20,6 +20,11 @@ public class KeyEventProcessing {
|
||||
public final static boolean useLatinNonAlphaNumKeycodes = "true".equals(
|
||||
getProperty(useLatinNonAlphaNumKeycodesOption, "false"));
|
||||
|
||||
public final static String defaultTouchHandlingOption = "com.jetbrains.default.touchscreen.mode";
|
||||
|
||||
@Native
|
||||
public final static boolean defaultTouchHandling = "true".equalsIgnoreCase(getProperty(defaultTouchHandlingOption, "false"));
|
||||
|
||||
private static String getProperty(String option, String dflt) {
|
||||
return java.security.AccessController.doPrivileged(
|
||||
(PrivilegedAction<String>) () -> System.getProperty(option, dflt)
|
||||
|
||||
@@ -1726,7 +1726,7 @@ static jlong
|
||||
if (ftglyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD && width > 0) {
|
||||
glyphInfo->width = width/3;
|
||||
glyphInfo->topLeftX -= 1;
|
||||
glyphInfo->width += 1;
|
||||
glyphInfo->width += 2;
|
||||
} else if (ftglyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V) {
|
||||
glyphInfo->height = glyphInfo->height/3;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ public class XBaseWindow {
|
||||
|
||||
private static XAtom wm_client_leader;
|
||||
|
||||
private long userTime;
|
||||
private static long globalUserTime;
|
||||
|
||||
static enum InitialiseState {
|
||||
@@ -669,7 +668,7 @@ public class XBaseWindow {
|
||||
try {
|
||||
this.visible = visible;
|
||||
if (visible) {
|
||||
setUserTimeFromGlobal();
|
||||
setUserTimeBeforeShowing();
|
||||
XlibWrapper.XMapWindow(XToolkit.getDisplay(), getWindow());
|
||||
}
|
||||
else {
|
||||
@@ -1029,7 +1028,7 @@ public class XBaseWindow {
|
||||
public void handleVisibilityEvent(XEvent xev) {
|
||||
}
|
||||
public void handleKeyPress(XEvent xev) {
|
||||
setUserTime(xev.get_xkey().get_time());
|
||||
setUserTime(xev.get_xkey().get_time(), true);
|
||||
}
|
||||
public void handleKeyRelease(XEvent xev) {
|
||||
}
|
||||
@@ -1060,7 +1059,7 @@ public class XBaseWindow {
|
||||
if (!isWheel) {
|
||||
switch (xev.get_type()) {
|
||||
case XConstants.ButtonPress:
|
||||
setUserTime(xbe.get_time());
|
||||
setUserTime(xbe.get_time(), true);
|
||||
if (buttonState == 0) {
|
||||
XWindowPeer parent = getToplevelXWindow();
|
||||
// See 6385277, 6981400.
|
||||
@@ -1299,15 +1298,12 @@ public class XBaseWindow {
|
||||
return x >= getAbsoluteX() && y >= getAbsoluteY() && x < (getAbsoluteX()+getWidth()) && y < (getAbsoluteY()+getHeight());
|
||||
}
|
||||
|
||||
void setUserTimeFromGlobal() {
|
||||
setUserTime(globalUserTime);
|
||||
void setUserTimeBeforeShowing() {
|
||||
if (globalUserTime != 0) setUserTime(globalUserTime, false);
|
||||
}
|
||||
|
||||
protected void setUserTime(long time) {
|
||||
if (time == userTime) return;
|
||||
|
||||
userTime = time;
|
||||
if ((int)time - (int)globalUserTime > 0 /* accounting for wrap-around */) {
|
||||
protected void setUserTime(long time, boolean updateGlobalTime) {
|
||||
if (updateGlobalTime && (int)time - (int)globalUserTime > 0 /* accounting for wrap-around */) {
|
||||
globalUserTime = time;
|
||||
}
|
||||
XNETProtocol netProtocol = XWM.getWM().getNETProtocol();
|
||||
|
||||
@@ -1080,7 +1080,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
|
||||
}
|
||||
// we should treat WM_TAKE_FOCUS message as user interaction, as it can originate e.g. from user clicking
|
||||
// on window title bar (there will be no ButtonPress/ButtonRelease events in this case)
|
||||
setUserTime(requestTimeStamp);
|
||||
setUserTime(requestTimeStamp, true);
|
||||
|
||||
if (XWM.getWMID() == XWM.UNITY_COMPIZ_WM) {
|
||||
// JDK-8159460
|
||||
|
||||
@@ -110,7 +110,8 @@ final class XWM
|
||||
MUTTER_WM = 15,
|
||||
UNITY_COMPIZ_WM = 16,
|
||||
XMONAD_WM = 17,
|
||||
AWESOME_WM = 18;
|
||||
AWESOME_WM = 18,
|
||||
I3_WM = 19;
|
||||
|
||||
public String toString() {
|
||||
switch (WMID) {
|
||||
@@ -621,6 +622,10 @@ final class XWM
|
||||
return isNetWMName("awesome");
|
||||
}
|
||||
|
||||
static boolean isI3() {
|
||||
return isNetWMName("i3");
|
||||
}
|
||||
|
||||
static int awtWMNonReparenting = -1;
|
||||
static boolean isNonReparentingWM() {
|
||||
if (awtWMNonReparenting == -1) {
|
||||
@@ -824,6 +829,8 @@ final class XWM
|
||||
awt_wmgr = XWM.XMONAD_WM;
|
||||
} else if (isAwesome()) {
|
||||
awt_wmgr = XWM.AWESOME_WM;
|
||||
} else if (isI3()) {
|
||||
awt_wmgr = XWM.I3_WM;
|
||||
}
|
||||
/*
|
||||
* We don't check for legacy WM when we already know that WM
|
||||
|
||||
@@ -28,7 +28,6 @@ package sun.awt.X11;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.InvocationEvent;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.peer.ComponentPeer;
|
||||
import java.awt.peer.WindowPeer;
|
||||
@@ -36,13 +35,7 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.Condition;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.function.BooleanSupplier;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.awt.AWTAccessor.ComponentAccessor;
|
||||
@@ -150,10 +143,7 @@ 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();
|
||||
|
||||
final boolean isKDE = XWM.getWMID() == XWM.KDE2_WM;
|
||||
X11_DISABLE_OVERRIDE_FLAG =
|
||||
GetPropertyAction.privilegedGetProperty("x11.disable.override.flag", isKDE ? "true" : "false").equalsIgnoreCase("true");
|
||||
X11_DISABLE_OVERRIDE_XWINDOWPEER =
|
||||
@@ -1112,7 +1102,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
|
||||
if (!isVisible() && vis) {
|
||||
isBeforeFirstMapNotify = true;
|
||||
winAttr.initialFocus = isAutoRequestFocus();
|
||||
if (!winAttr.initialFocus) {
|
||||
if (!winAttr.initialFocus && XWM.getWMID() != XWM.I3_WM) {
|
||||
/*
|
||||
* It's easier and safer to temporary suppress WM_TAKE_FOCUS
|
||||
* protocol itself than to ignore WM_TAKE_FOCUS client message.
|
||||
@@ -1120,6 +1110,13 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
|
||||
* the message come after showing and the message come after
|
||||
* activation. Also, on Metacity, for some reason, we have _two_
|
||||
* WM_TAKE_FOCUS client messages when showing a frame/dialog.
|
||||
*
|
||||
* i3 window manager doesn't track updates to WM_TAKE_FOCUS
|
||||
* property, so this approach won't work for it, breaking
|
||||
* focus behaviour completely. So another way is used to
|
||||
* suppress focus take over - via setting _NET_WM_USER_TIME
|
||||
* to 0, as specified in EWMH spec (see
|
||||
* 'setUserTimeBeforeShowing' method).
|
||||
*/
|
||||
suppressWmTakeFocus(true);
|
||||
}
|
||||
@@ -1184,6 +1181,16 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
|
||||
protected void suppressWmTakeFocus(boolean doSuppress) {
|
||||
}
|
||||
|
||||
@Override
|
||||
void setUserTimeBeforeShowing() {
|
||||
if (winAttr.initialFocus || XWM.getWMID() != XWM.I3_WM) {
|
||||
super.setUserTimeBeforeShowing();
|
||||
}
|
||||
else {
|
||||
setUserTime(0, false);
|
||||
}
|
||||
}
|
||||
|
||||
final boolean isSimpleWindow() {
|
||||
return !(target instanceof Frame || target instanceof Dialog);
|
||||
}
|
||||
@@ -1425,7 +1432,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
|
||||
isUnhiding |= isWMStateNetHidden();
|
||||
|
||||
super.handleMapNotifyEvent(xev);
|
||||
if (!winAttr.initialFocus) {
|
||||
if (!winAttr.initialFocus && XWM.getWMID() != XWM.I3_WM) {
|
||||
suppressWmTakeFocus(false); // restore the protocol.
|
||||
/*
|
||||
* For some reason, on Metacity, a frame/dialog being shown
|
||||
@@ -2053,7 +2060,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
|
||||
this.visible = visible;
|
||||
if (visible) {
|
||||
applyWindowType();
|
||||
setUserTimeFromGlobal();
|
||||
setUserTimeBeforeShowing();
|
||||
XlibWrapper.XMapRaised(XToolkit.getDisplay(), getWindow());
|
||||
} else {
|
||||
XlibWrapper.XUnmapWindow(XToolkit.getDisplay(), getWindow());
|
||||
|
||||
@@ -1400,6 +1400,17 @@ static BOOL IsMouseEventFromTouch()
|
||||
{
|
||||
return (::GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH_MASK) == MOUSEEVENTF_FROMTOUCH;
|
||||
}
|
||||
|
||||
static BOOL IsDefaultTouch()
|
||||
{
|
||||
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
|
||||
jclass cls = env->FindClass("sun/awt/event/KeyEventProcessing");
|
||||
CHECK_NULL_RETURN(cls, FALSE);
|
||||
jfieldID fieldID = env->GetStaticFieldID(cls, "defaultTouchHandling", "Z");
|
||||
CHECK_NULL_RETURN(fieldID, FALSE);
|
||||
return static_cast<BOOL>(env->GetStaticBooleanField(cls, fieldID));
|
||||
}
|
||||
|
||||
/*
|
||||
* Dispatch messages for this window class--general component
|
||||
*/
|
||||
@@ -1427,6 +1438,8 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
DWORD curPos = 0;
|
||||
|
||||
static const BOOL PROCESS_TOUCH_EVENTS = !IsDefaultTouch();
|
||||
|
||||
UINT switchMessage = message;
|
||||
switch (switchMessage) {
|
||||
case WM_AWT_GETDC:
|
||||
@@ -1716,7 +1729,7 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_MOUSEHWHEEL:
|
||||
case WM_AWT_MOUSEENTER:
|
||||
case WM_AWT_MOUSEEXIT:
|
||||
if (IsMouseEventFromTouch()) {
|
||||
if (IsMouseEventFromTouch() && PROCESS_TOUCH_EVENTS) {
|
||||
break;
|
||||
}
|
||||
curPos = ::GetMessagePos();
|
||||
@@ -1796,8 +1809,10 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
break;
|
||||
case WM_TOUCH:
|
||||
WmTouch(wParam, lParam);
|
||||
break;
|
||||
if (PROCESS_TOUCH_EVENTS) {
|
||||
WmTouch(wParam, lParam);
|
||||
break;
|
||||
}
|
||||
case WM_SETCURSOR:
|
||||
mr = mrDoDefault;
|
||||
if (LOWORD(lParam) == HTCLIENT) {
|
||||
|
||||
94
test/jdk/jb/java/a11y/AccessibleComponentTest.java
Executable file
94
test/jdk/jb/java/a11y/AccessibleComponentTest.java
Executable file
@@ -0,0 +1,94 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import javax.swing.*;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
public abstract class AccessibleComponentTest {
|
||||
|
||||
protected static volatile boolean testResult = true;
|
||||
protected static volatile CountDownLatch countDownLatch;
|
||||
protected static String INSTRUCTIONS;
|
||||
protected static String exceptionString;
|
||||
protected JFrame mainFrame;
|
||||
protected static AccessibleComponentTest a11yTest;
|
||||
|
||||
public abstract CountDownLatch createCountDownLatch();
|
||||
|
||||
public void createUI(JPanel component, String testName) {
|
||||
mainFrame = new JFrame(testName);
|
||||
GridBagLayout layout = new GridBagLayout();
|
||||
JPanel mainControlPanel = new JPanel(layout);
|
||||
JPanel resultButtonPanel = new JPanel(layout);
|
||||
|
||||
GridBagConstraints gbc = new GridBagConstraints();
|
||||
|
||||
JTextArea instructionTextArea = new JTextArea();
|
||||
instructionTextArea.setText(INSTRUCTIONS);
|
||||
instructionTextArea.setEditable(false);
|
||||
instructionTextArea.setBackground(Color.white);
|
||||
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy = 0;
|
||||
gbc.fill = GridBagConstraints.HORIZONTAL;
|
||||
mainControlPanel.add(instructionTextArea, gbc);
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy = 1;
|
||||
mainControlPanel.add(component);
|
||||
|
||||
JButton passButton = new JButton("Pass");
|
||||
passButton.setActionCommand("Pass");
|
||||
passButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
mainFrame.dispose();
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
});
|
||||
|
||||
JButton failButton = new JButton("Fail");
|
||||
failButton.setActionCommand("Fail");
|
||||
failButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
testResult = false;
|
||||
mainFrame.dispose();
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
});
|
||||
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy = 0;
|
||||
resultButtonPanel.add(passButton, gbc);
|
||||
|
||||
gbc.gridx = 1;
|
||||
gbc.gridy = 0;
|
||||
resultButtonPanel.add(failButton, gbc);
|
||||
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy = 2;
|
||||
mainControlPanel.add(resultButtonPanel, gbc);
|
||||
|
||||
mainFrame.add(mainControlPanel);
|
||||
mainFrame.pack();
|
||||
|
||||
mainFrame.addWindowListener(new WindowAdapter() {
|
||||
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
mainFrame.dispose();
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
});
|
||||
mainFrame.setVisible(true);
|
||||
}
|
||||
}
|
||||
142
test/jdk/jb/java/a11y/AccessibleJListTest.java
Executable file
142
test/jdk/jb/java/a11y/AccessibleJListTest.java
Executable file
@@ -0,0 +1,142 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @summary manual test for JBR-2504
|
||||
* @author Artem.Semenov@jetbrains.com
|
||||
* @run main/manual AccessibleJListTest
|
||||
*/
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
public class AccessibleJListTest extends AccessibleComponentTest {
|
||||
|
||||
private static final String[] NAMES = {"One", "Two", "Three", "Four", "Five"};
|
||||
static JWindow window;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
a11yTest = new AccessibleJListTest();
|
||||
countDownLatch = a11yTest.createCountDownLatch();
|
||||
|
||||
SwingUtilities.invokeLater(((AccessibleJListTest) a11yTest)::createSimpleList);
|
||||
countDownLatch.await();
|
||||
|
||||
if (!testResult) {
|
||||
throw new RuntimeException(a11yTest.exceptionString);
|
||||
}
|
||||
|
||||
countDownLatch = a11yTest.createCountDownLatch();
|
||||
SwingUtilities.invokeLater(((AccessibleJListTest) a11yTest)::createCombobox);
|
||||
countDownLatch.await();
|
||||
|
||||
if (!testResult) {
|
||||
throw new RuntimeException(a11yTest.exceptionString);
|
||||
}
|
||||
|
||||
countDownLatch = a11yTest.createCountDownLatch();
|
||||
SwingUtilities.invokeLater(((AccessibleJListTest) a11yTest)::createPushButton);
|
||||
countDownLatch.await();
|
||||
|
||||
if (!testResult) {
|
||||
throw new RuntimeException(a11yTest.exceptionString);
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public CountDownLatch createCountDownLatch() {
|
||||
return new CountDownLatch(1);
|
||||
}
|
||||
|
||||
public void createSimpleList() {
|
||||
INSTRUCTIONS = "INSTRUCTIONS:\n"
|
||||
+ "Check a11y of JList in a simple Window.\n\n"
|
||||
+ "Turn screen reader on, and Tab to the list.\n"
|
||||
+ "Press the up and down arrow buttons to move through the list.\n\n"
|
||||
+ "If you can hear menu items tab further and press PASS, otherwise press FAIL.\n";
|
||||
|
||||
JPanel frame = new JPanel();
|
||||
|
||||
JList<String> list = new JList<>(NAMES);
|
||||
|
||||
frame.setLayout(new FlowLayout());
|
||||
frame.add(list);
|
||||
exceptionString = "Accessible JList simple list test failed!";
|
||||
super.createUI(frame, "Accessible JList test");
|
||||
}
|
||||
|
||||
public void createCombobox() {
|
||||
INSTRUCTIONS = "INSTRUCTIONS:\n"
|
||||
+ "Check a11y of JList in a combobox.\n\n"
|
||||
+ "Turn screen reader on, and Tab to the combobox.\n"
|
||||
+ "Press the up and down arrow buttons to move through the list.\n\n"
|
||||
+ "If you can hear combobox items tab further and press PASS, otherwise press FAIL.\n";
|
||||
|
||||
JPanel frame = new JPanel();
|
||||
|
||||
JComboBox<String> combo = new JComboBox<>(NAMES);
|
||||
|
||||
frame.setLayout(new FlowLayout());
|
||||
frame.add(combo);
|
||||
exceptionString = "Accessible JList combobox test failed!";
|
||||
super.createUI(frame, "Accessible JList test");
|
||||
}
|
||||
|
||||
public void createPushButton() {
|
||||
INSTRUCTIONS = "INSTRUCTIONS:\n"
|
||||
+ "Check a11y of JList in a popup.\n\n"
|
||||
+ "Turn screen reader on, and Tab to the show button and press space.\n"
|
||||
+ "Press the up and down arrow buttons to move through the list.\n\n"
|
||||
+ "If you can hear popup menu items tab further and press PASS, otherwise press FAIL.\n";
|
||||
|
||||
JPanel frame = new JPanel();
|
||||
|
||||
JButton button = new JButton("show");
|
||||
button.setPreferredSize(new Dimension(100, 35));
|
||||
|
||||
button.addActionListener(new ActionListener() {
|
||||
|
||||
final Runnable dispose = () -> {
|
||||
window.dispose();
|
||||
window = null;
|
||||
button.setText("show");
|
||||
};
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (window == null) {
|
||||
Rectangle bounds = frame.getBounds();
|
||||
window = new JWindow(mainFrame);
|
||||
JList<String> winList = new JList<>(NAMES);
|
||||
winList.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e) {
|
||||
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
||||
dispose.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
window.add(winList);
|
||||
window.setLocation(bounds.x + bounds.width + 20, bounds.y);
|
||||
window.pack();
|
||||
window.setVisible(true);
|
||||
button.setText("hide (ESC)");
|
||||
} else {
|
||||
dispose.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
frame.setLayout(new FlowLayout());
|
||||
frame.add(button);
|
||||
exceptionString = "Accessible JList push button test failed!";
|
||||
super.createUI(frame, "Accessible JList test");
|
||||
}
|
||||
}
|
||||
57
test/jdk/jb/java/a11y/AccessibleJTableTest.java
Executable file
57
test/jdk/jb/java/a11y/AccessibleJTableTest.java
Executable file
@@ -0,0 +1,57 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @summary manual test for JBR-2649
|
||||
* @author Artem.Semenov@jetbrains.com
|
||||
* @run main/manual AccessibleJTableTest
|
||||
*/
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class AccessibleJTableTest extends AccessibleComponentTest {
|
||||
|
||||
@Override
|
||||
public CountDownLatch createCountDownLatch() {
|
||||
return new CountDownLatch(1);
|
||||
}
|
||||
|
||||
public void createUI() {
|
||||
INSTRUCTIONS = "INSTRUCTIONS:\n"
|
||||
+ "Check a11y of JTable in a simple Window.\n\n"
|
||||
+ "Turn screen reader on, and Tab to the table.\n"
|
||||
+ "On Windows press the arrow buttons to move through the table.\n\n"
|
||||
+ "On MacOS, use the up and down arrow buttons to move through rows, and VoiceOver fast navigation to move through columns.\n\n"
|
||||
+ "If you can hear table cells tab further and press PASS, otherwise press FAIL.\n";
|
||||
|
||||
final String[] columnNames = {"One", "Two", "Three"};
|
||||
String[][] data = {
|
||||
{"One1", "Two1", "Three1"},
|
||||
{"One2", "Two2", "Three2"},
|
||||
{"One3", "Two3", "Three3"},
|
||||
{"One4", "Two4", "Three4"},
|
||||
{"One5", "Two5", "Three5"}
|
||||
};
|
||||
JTable table = new JTable(data, columnNames);
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new FlowLayout());
|
||||
JScrollPane scrollPane = new JScrollPane(table);
|
||||
panel.add(scrollPane);
|
||||
panel.setFocusable(false);
|
||||
exceptionString = "AccessibleJTable test failed!";
|
||||
super.createUI(panel, "AccessibleJTableTest");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
AccessibleJTableTest test = new AccessibleJTableTest();
|
||||
countDownLatch = test.createCountDownLatch();
|
||||
SwingUtilities.invokeAndWait(test::createUI);
|
||||
countDownLatch.await(15, TimeUnit.MINUTES);
|
||||
if (!testResult) {
|
||||
throw new RuntimeException(exceptionString);
|
||||
}
|
||||
}
|
||||
}
|
||||
158
test/jdk/jb/java/jcef/MouseEventTest.java
Normal file
158
test/jdk/jb/java/jcef/MouseEventTest.java
Normal file
@@ -0,0 +1,158 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @summary Regression test for JBR-2412. The test checks that mouse actions are handled on jcef browser after hide and show it.
|
||||
* @run main/othervm MouseEventTest
|
||||
*/
|
||||
|
||||
public class MouseEventTest {
|
||||
private static Robot robot;
|
||||
private static final int WIDTH = 400;
|
||||
private static final int HEIGHT = 400;
|
||||
private static CefBrowserFrame browserFrame = new CefBrowserFrame(WIDTH, HEIGHT);
|
||||
|
||||
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
|
||||
|
||||
try {
|
||||
robot = new Robot();
|
||||
SwingUtilities.invokeAndWait(browserFrame::initUI);
|
||||
robot.waitForIdle();
|
||||
|
||||
doMouseActions();
|
||||
if (!browserFrame.isMouseActionPerformed()) {
|
||||
throw new RuntimeException("Test FAILED. Some of mouse actions were not handled.");
|
||||
|
||||
}
|
||||
|
||||
browserFrame.resetMouseActionsPerformedFlag();
|
||||
browserFrame.hideAndShowBrowser();
|
||||
robot.delay(100);
|
||||
|
||||
doMouseActions();
|
||||
if (!browserFrame.isMouseActionPerformed()) {
|
||||
throw new RuntimeException("Test FAILED. Some of mouse actions were not handled.");
|
||||
}
|
||||
System.out.println("Test PASSED");
|
||||
} catch (AWTException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
browserFrame.getBrowser().dispose();
|
||||
JBCefApp.getInstance().getCefApp().dispose();
|
||||
SwingUtilities.invokeAndWait(browserFrame::dispose);
|
||||
}
|
||||
}
|
||||
|
||||
private static void doMouseActions() {
|
||||
Point frameCenter = new Point(browserFrame.getLocationOnScreen().x + WIDTH /2,
|
||||
browserFrame.getLocationOnScreen().y + HEIGHT /2);
|
||||
robot.mouseMove(frameCenter.x, frameCenter.y);
|
||||
robot.delay(100);
|
||||
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
|
||||
robot.delay(100);
|
||||
robot.mouseMove(frameCenter.x + 1, frameCenter.y);
|
||||
robot.delay(100);
|
||||
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
|
||||
robot.delay(100);
|
||||
robot.mouseWheel(1);
|
||||
robot.delay(100);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CefBrowserFrame extends JFrame {
|
||||
private final JBCefBrowser browser = new JBCefBrowser();
|
||||
private final int width, height;
|
||||
private volatile boolean mouseActionPerformed = false;
|
||||
|
||||
private MouseAdapter mouseAdapter = new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseDragged(MouseEvent e) {
|
||||
mouseActionPerformed = true;
|
||||
System.out.println("mouseDragged");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseMoved(MouseEvent e) {
|
||||
mouseActionPerformed = true;
|
||||
System.out.println("mouseMoved");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseWheelMoved(MouseWheelEvent e) {
|
||||
mouseActionPerformed = true;
|
||||
System.out.println("mouseWheelMoved");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
mouseActionPerformed = true;
|
||||
System.out.println("mouseClicked");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
mouseActionPerformed = true;
|
||||
System.out.println("mousePressed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
mouseActionPerformed = true;
|
||||
System.out.println("mouseReleased");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e) {
|
||||
mouseActionPerformed = true;
|
||||
System.out.println("mouseEntered");
|
||||
}
|
||||
};
|
||||
|
||||
public CefBrowserFrame(int width, int height) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public void initUI() {
|
||||
browser.getComponent().addMouseMotionListener(mouseAdapter);
|
||||
browser.getComponent().addMouseListener(mouseAdapter);
|
||||
browser.getComponent().addMouseWheelListener(mouseAdapter);
|
||||
|
||||
getContentPane().add(browser.getCefBrowser().getUIComponent());
|
||||
setSize(width, height);
|
||||
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
browser.dispose();
|
||||
}
|
||||
});
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
public void hideAndShowBrowser() {
|
||||
Container parent = browser.getComponent().getParent();
|
||||
parent.remove(browser.getComponent());
|
||||
SwingUtilities.invokeLater(() -> parent.add(browser.getComponent()));
|
||||
}
|
||||
|
||||
public JBCefBrowser getBrowser() {
|
||||
return browser;
|
||||
}
|
||||
|
||||
public void resetMouseActionsPerformedFlag() {
|
||||
mouseActionPerformed = false;
|
||||
}
|
||||
|
||||
public boolean isMouseActionPerformed() {
|
||||
return mouseActionPerformed;
|
||||
}
|
||||
}
|
||||
90
test/jdk/jb/java/jcef/MouseWheelEventTest.java
Normal file
90
test/jdk/jb/java/jcef/MouseWheelEventTest.java
Normal file
@@ -0,0 +1,90 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @summary Regression test for JBR-2639. The test checks that mouse wheel action is handled on jcef browser.
|
||||
* @run main/othervm MouseWheelEventTest
|
||||
*/
|
||||
|
||||
public class MouseWheelEventTest {
|
||||
|
||||
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
|
||||
final int width = 400;
|
||||
final int height = 400;
|
||||
CefBrowserFrame browserFrame = new CefBrowserFrame(width, height);
|
||||
|
||||
try {
|
||||
Robot r = new Robot();
|
||||
SwingUtilities.invokeAndWait(browserFrame::initUI);
|
||||
r.waitForIdle();
|
||||
|
||||
r.mouseMove(browserFrame.getLocationOnScreen().x + width/2,
|
||||
browserFrame.getLocationOnScreen().y + height/2);
|
||||
r.delay(100);
|
||||
r.mouseWheel(1);
|
||||
r.delay(100);
|
||||
|
||||
if (browserFrame.isMouseWheelMoved()) {
|
||||
System.out.println("Test PASSED");
|
||||
} else {
|
||||
throw new RuntimeException("Test FAILED. Mouse wheel action was not handled.");
|
||||
}
|
||||
} catch (AWTException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
browserFrame.getBrowser().dispose();
|
||||
JBCefApp.getInstance().getCefApp().dispose();
|
||||
SwingUtilities.invokeAndWait(browserFrame::dispose);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CefBrowserFrame extends JFrame {
|
||||
|
||||
private volatile boolean mouseWheelMoved = false;
|
||||
private final JBCefBrowser browser = new JBCefBrowser();
|
||||
private int width, height;
|
||||
|
||||
public CefBrowserFrame(int width, int height) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public void initUI() {
|
||||
browser.getComponent().addMouseWheelListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseWheelMoved(MouseWheelEvent e) {
|
||||
mouseWheelMoved = true;
|
||||
System.out.println("mouseWheelMoved");
|
||||
}
|
||||
});
|
||||
getContentPane().add(browser.getCefBrowser().getUIComponent());
|
||||
setSize(width, height);
|
||||
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
browser.dispose();
|
||||
}
|
||||
});
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
public JBCefBrowser getBrowser() {
|
||||
return browser;
|
||||
}
|
||||
|
||||
public boolean isMouseWheelMoved() {
|
||||
return mouseWheelMoved;
|
||||
}
|
||||
}
|
||||
@@ -213,6 +213,7 @@ java/awt/Frame/UnfocusableMaximizedFrameResizablity/UnfocusableMaximizedFrameRes
|
||||
java/awt/Frame/WindowDragTest/WindowDragTest.java 8169470 generic-all
|
||||
java/awt/FullScreen/8013581/bug8013581.java 8169471 macosx-all,windows-all,linux-all
|
||||
java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java 8047218 generic-all
|
||||
java/awt/FullScreen/BufferStrategyExceptionTest/BufferStrategyExceptionTest.java 8246558 windows-all
|
||||
java/awt/FullScreen/DisplayChangeVITest/DisplayChangeVITest.java 8169469,JBR-1897 windows-all,macosx-all,linux-all (linux: NPE commit testing)
|
||||
java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java 7019055 windows-all,linux-all,macosx-all
|
||||
java/awt/FullScreen/NoResizeEventOnDMChangeTest/NoResizeEventOnDMChangeTest.java 8169468 windows-all,macosx-all
|
||||
@@ -576,7 +577,7 @@ java/awt/TextField/SelectionInvisibleTest/SelectionInvisibleTest.java
|
||||
java/awt/Toolkit/DesktopProperties/rfe4758438.java 8193547 linux-all
|
||||
java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java 8208514 windows-all
|
||||
java/awt/Toolkit/RealSync/Test.java 6849383 generic-all
|
||||
java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250 windows-all,linux-all,macosx-all
|
||||
java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250,8253398 windows-all,linux-all,macosx-all
|
||||
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 generic-all
|
||||
java/awt/TrayIcon/ActionCommand/ActionCommand.java 8197575,8150540 macosx-all,windows-all
|
||||
java/awt/TrayIcon/ActionEventMask/ActionEventMask.java 8197575,8150540 macosx-all,windows-all
|
||||
@@ -595,6 +596,7 @@ java/awt/TrayIcon/PopupMenuLeakTest/PopupMenuLeakTest.java
|
||||
java/awt/Window/8159168/SetShapeTest.java 8208507 generic-all
|
||||
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java 8142536 generic-all
|
||||
java/awt/Window/Grab/GrabTest.java 8196019 macosx-all,windows-all,linux-all
|
||||
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java 8225787 linux-all
|
||||
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java 8215132,8194941 macosx-all,windows-all,linux-all
|
||||
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8159904 macosx-all,windows-all,linux-all
|
||||
java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java 8225116 windows-all
|
||||
@@ -635,6 +637,7 @@ java/awt/dnd/NoFormatsCrashTest/NoFormatsCrashTest.html
|
||||
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.html 8171510,7124379 macosx-all,linux-all
|
||||
java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.html 8194947 generic-all
|
||||
java/awt/event/ComponentEvent/MovedResizedTardyEventTest/MovedResizedTardyEventTest.html 6511207 generic-all
|
||||
java/awt/event/ComponentEvent/MovedResizedTwiceTest/MovedResizedTwiceTest.java 8225787 linux-all
|
||||
java/awt/event/HierarchyEvent/AncestorResized/AncestorResized.java 6618538 generic-all
|
||||
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
|
||||
java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 generic-all
|
||||
@@ -727,6 +730,7 @@ java/lang/String/StringRepeat.java
|
||||
java/lang/StringCoding/CheckEncodings.sh 7008363 generic-all
|
||||
java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java nobug windows-6.1 fails on Windows 7 only
|
||||
java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java nobug windows-6.1 fails on Windows 7 only
|
||||
java/lang/System/OsVersionTest.java 8253702 macosx-10.16
|
||||
|
||||
############################################################################
|
||||
|
||||
@@ -1262,5 +1266,6 @@ javax/swing/LookAndFeel/8146276/NimbusGlueTest.java
|
||||
sanity/client/SwingSet/src/GridBagLayoutDemoTest.java JBR-1977 linux-aarch64
|
||||
|
||||
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
|
||||
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTestLinux.sh JBR-2585 linux-all
|
||||
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTest.java JBR-2585 linux-all,windows-all nobug windows-6.1 not supported on Windows 7
|
||||
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTestLinux.sh JBR-2585 linux-all
|
||||
jb/java/awt/Focus/ChainOfPopupsFocusTest.java JBR-2657 windows-all,linux-all
|
||||
@@ -41,7 +41,6 @@ java/awt/Frame/MiscUndecorated/FrameCloseTest.java
|
||||
java/awt/Frame/NormalToIconified/NormalToIconifiedTest.java nobug linux-all,windows-all
|
||||
java/awt/Frame/ObscuredFrame/ObscuredFrameTest.java nobug macosx-all,linux-all
|
||||
java/awt/Frame/UnfocusableMaximizedFrameResizablity/UnfocusableMaximizedFrameResizablity.java nobug linux-all,windows-all,macosx-all
|
||||
java/awt/FullScreen/BufferStrategyExceptionTest/BufferStrategyExceptionTest.java nobug macosx-all,linux-all,windows-all
|
||||
java/awt/FullScreen/SetFSWindow/FSFrame.java nobug windows-all
|
||||
java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java nobug windows-all
|
||||
java/awt/Graphics/LineClipTest.java nobug macosx-all,windows-all
|
||||
|
||||
Reference in New Issue
Block a user