2019-11-19 05:18:28 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2020-02-08 00:55:53 +03:00
|
|
|
set +x
|
2019-11-19 05:18:28 +03:00
|
|
|
|
2019-11-20 03:08:27 +03:00
|
|
|
trap "cd $(pwd -P)" EXIT
|
2019-11-20 03:58:09 +03:00
|
|
|
cd "$(dirname $0)"
|
2019-11-19 05:18:28 +03:00
|
|
|
|
2020-02-08 00:55:53 +03:00
|
|
|
build_gtk() {
|
|
|
|
if ! [[ -d ./WebKitBuild/GTK/DependenciesGTK ]]; then
|
2020-07-09 21:37:13 +03:00
|
|
|
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs
|
2020-02-08 00:55:53 +03:00
|
|
|
fi
|
2020-08-07 02:33:34 +03:00
|
|
|
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 MiniBrowser
|
2020-02-08 00:55:53 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
build_wpe() {
|
|
|
|
if ! [[ -d ./WebKitBuild/WPE/DependenciesWPE ]]; then
|
2020-07-09 21:37:13 +03:00
|
|
|
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitwpe-libs
|
2020-02-08 00:55:53 +03:00
|
|
|
fi
|
2020-08-07 02:33:34 +03:00
|
|
|
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 MiniBrowser
|
2020-02-08 00:55:53 +03:00
|
|
|
}
|
|
|
|
|
2019-11-19 05:18:28 +03:00
|
|
|
if [[ "$(uname)" == "Darwin" ]]; then
|
2020-01-17 02:32:50 +03:00
|
|
|
cd "checkout"
|
2020-04-18 01:21:01 +03:00
|
|
|
./Tools/Scripts/build-webkit --release --touch-events --orientation-events
|
2019-11-19 05:18:28 +03:00
|
|
|
elif [[ "$(uname)" == "Linux" ]]; then
|
2020-01-17 02:32:50 +03:00
|
|
|
cd "checkout"
|
2020-07-24 02:59:45 +03:00
|
|
|
if [[ $# == 0 || (-z "$1") ]]; then
|
2020-02-08 00:55:53 +03:00
|
|
|
echo
|
|
|
|
echo BUILDING: GTK and WPE
|
|
|
|
echo
|
|
|
|
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
|
2019-11-23 09:24:14 +03:00
|
|
|
fi
|
2020-01-17 02:32:50 +03:00
|
|
|
elif [[ "$(uname)" == MINGW* ]]; then
|
|
|
|
/c/Windows/System32/cmd.exe "/c buildwin.bat"
|
2019-11-19 05:18:28 +03:00
|
|
|
else
|
|
|
|
echo "ERROR: cannot upload on this platform!" 1>&2
|
|
|
|
exit 1;
|
|
|
|
fi
|