mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
e64f66685a
Official WebKit no longer supports Mac 10.14. However, since this system is still very much in use, we want to be able to keep it running for a while. This patch adds a new browser that we would compile and maintain specifically for Mac 10.14: `deprecated-webkit-mac-10.14`. This browser is a clone of Webkit r1443 that is the last known revision to compile on Mac 10.14. As we move on, we're free to modify this browser however we want, backporting important patches. References #5833
78 lines
2.7 KiB
Bash
Executable File
78 lines
2.7 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set +x
|
|
|
|
trap "cd $(pwd -P)" EXIT
|
|
cd "$(dirname $0)"
|
|
SCRIPT_FOLDER="$(pwd -P)"
|
|
|
|
build_gtk() {
|
|
if ! [[ -d ./WebKitBuild/GTK/DependenciesGTK ]]; then
|
|
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs
|
|
fi
|
|
local CMAKE_ARGS=""
|
|
if [[ -n "${EXPORT_COMPILE_COMMANDS}" ]]; then
|
|
CMAKE_ARGS="--cmakeargs=\"-DCMAKE_EXPORT_COMPILE_COMMANDS=1\""
|
|
fi
|
|
WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/build-webkit --gtk --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox --no-webxr MiniBrowser
|
|
}
|
|
|
|
build_wpe() {
|
|
if ! [[ -d ./WebKitBuild/WPE/DependenciesWPE ]]; then
|
|
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitwpe-libs
|
|
fi
|
|
local CMAKE_ARGS=""
|
|
if [[ -n "${EXPORT_COMPILE_COMMANDS}" ]]; then
|
|
CMAKE_ARGS="--cmakeargs=\"-DCMAKE_EXPORT_COMPILE_COMMANDS=1\""
|
|
fi
|
|
WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/build-webkit --wpe --release "${CMAKE_ARGS}" --touch-events --orientation-events --no-bubblewrap-sandbox --no-webxr MiniBrowser
|
|
}
|
|
|
|
ensure_linux_deps() {
|
|
yes | DEBIAN_FRONTEND=noninteractive ./Tools/gtk/install-dependencies
|
|
yes | DEBIAN_FRONTEND=noninteractive ./Tools/wpe/install-dependencies
|
|
yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/update-webkitwpe-libs
|
|
yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/update-webkitgtk-libs
|
|
}
|
|
|
|
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
|
|
cd "${WK_CHECKOUT_PATH}"
|
|
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
|
|
else
|
|
cd "checkout"
|
|
fi
|
|
|
|
if [[ "$(uname)" == "Darwin" ]]; then
|
|
./Tools/Scripts/build-webkit --release --touch-events --orientation-events
|
|
elif [[ "$(uname)" == "Linux" ]]; then
|
|
if [[ $# == 0 || (-z "$1") ]]; then
|
|
echo
|
|
echo BUILDING: GTK and WPE
|
|
echo
|
|
build_wpe
|
|
build_gtk
|
|
elif [[ "$1" == "--full" ]]; then
|
|
echo
|
|
echo BUILDING: GTK and WPE
|
|
echo
|
|
ensure_linux_deps
|
|
build_wpe
|
|
build_gtk
|
|
elif [[ "$1" == "--gtk" ]]; then
|
|
echo
|
|
echo BUILDING: GTK
|
|
echo
|
|
build_gtk
|
|
elif [[ "$1" == "--wpe" ]]; then
|
|
echo
|
|
echo BUILDING: WPE
|
|
echo
|
|
build_wpe
|
|
fi
|
|
elif [[ "$(uname)" == MINGW* ]]; then
|
|
/c/Windows/System32/cmd.exe "/c $(cygpath -w ${SCRIPT_FOLDER}/buildwin.bat)"
|
|
else
|
|
echo "ERROR: cannot upload on this platform!" 1>&2
|
|
exit 1;
|
|
fi
|