devops: teach //browser_patches/webkit/build.sh to build both GTK & WPE
- use `//browser_patches/webkit/build.sh --gtk` to build GTK only - use `//browser_patches/webkit/build.sh --wpe` to build WPE only
This commit is contained in:
parent
73148fda79
commit
3acc65d285
|
|
@ -48,6 +48,8 @@ elif [[ "$BUILD_FLAVOR" == "firefox-win64" ]]; then
|
|||
EXPECTED_HOST_OS="MINGW"
|
||||
elif [[ "$BUILD_FLAVOR" == "webkit-gtk" ]]; then
|
||||
BROWSER_NAME="webkit"
|
||||
EXTRA_BUILD_ARGS="--gtk"
|
||||
EXTRA_ARCHIVE_ARGS="--gtk"
|
||||
EXPECTED_HOST_OS="Linux"
|
||||
elif [[ "$BUILD_FLAVOR" == "webkit-wpe" ]]; then
|
||||
BROWSER_NAME="webkit"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ set -e
|
|||
set +x
|
||||
|
||||
if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then
|
||||
echo "usage: $(basename $0) [output-absolute-path] [--wpe]"
|
||||
echo "usage: $(basename $0) [output-absolute-path] [--wpe|--gtk]"
|
||||
echo
|
||||
echo "Generate distributable .zip archive from ./checkout folder that was previously built."
|
||||
echo
|
||||
|
|
@ -11,7 +11,7 @@ if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then
|
|||
fi
|
||||
|
||||
ZIP_PATH=$1
|
||||
USE_WPE=$2
|
||||
LINUX_FLAVOR=$2
|
||||
if [[ $ZIP_PATH != /* ]]; then
|
||||
echo "ERROR: path $ZIP_PATH is not absolute"
|
||||
exit 1
|
||||
|
|
@ -55,7 +55,7 @@ createZipForLinux() {
|
|||
# copy protocol
|
||||
node ../concat_protocol.js > $tmpdir/protocol.json
|
||||
|
||||
if [[ -n $USE_WPE ]]; then
|
||||
if [[ "$LINUX_FLAVOR" == "--wpe" ]]; then
|
||||
# copy all relevant binaries
|
||||
cp -t $tmpdir ./WebKitBuild/WPE/Release/bin/MiniBrowser ./WebKitBuild/WPE/Release/bin/WPE*Process
|
||||
# copy all relevant shared objects
|
||||
|
|
@ -68,7 +68,7 @@ createZipForLinux() {
|
|||
cd $tmpdir
|
||||
ln -s libWPEBackend-fdo-1.0.so.1 libWPEBackend-fdo-1.0.so
|
||||
cd -
|
||||
else
|
||||
elif [[ "$LINUX_FLAVOR" == "--gtk" ]]; then
|
||||
# copy all relevant binaries
|
||||
cp -t $tmpdir ./WebKitBuild/GTK/Release/bin/MiniBrowser ./WebKitBuild/GTK/Release/bin/WebKit*Process
|
||||
# copy all relevant shared objects
|
||||
|
|
@ -78,6 +78,9 @@ createZipForLinux() {
|
|||
|
||||
# we failed to nicely build libgdk_pixbuf - expect it in the env
|
||||
rm $tmpdir/libgdk_pixbuf*
|
||||
else
|
||||
echo "ERROR: must specify --gtk or --wpe"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# tar resulting directory and cleanup TMP.
|
||||
|
|
|
|||
|
|
@ -1,25 +1,45 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
set +x
|
||||
|
||||
trap "cd $(pwd -P)" EXIT
|
||||
cd "$(dirname $0)"
|
||||
|
||||
build_gtk() {
|
||||
if ! [[ -d ./WebKitBuild/GTK/DependenciesGTK ]]; then
|
||||
yes | WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs
|
||||
fi
|
||||
WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/build-webkit --gtk --release --touch-events MiniBrowser
|
||||
}
|
||||
|
||||
build_wpe() {
|
||||
if ! [[ -d ./WebKitBuild/WPE/DependenciesWPE ]]; then
|
||||
yes | WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitwpe-libs
|
||||
fi
|
||||
WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/build-webkit --wpe --release --touch-events MiniBrowser
|
||||
}
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
cd "checkout"
|
||||
./Tools/Scripts/build-webkit --release --touch-events
|
||||
elif [[ "$(uname)" == "Linux" ]]; then
|
||||
cd "checkout"
|
||||
if [[ "$1" == "--wpe" ]]; then
|
||||
if ! [[ -d ./WebKitBuild/WPE/DependenciesWPE ]]; then
|
||||
yes | WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitwpe-libs
|
||||
fi
|
||||
WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/build-webkit --wpe --release --touch-events MiniBrowser
|
||||
else
|
||||
if ! [[ -d ./WebKitBuild/GTK/DependenciesGTK ]]; then
|
||||
yes | WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs
|
||||
fi
|
||||
WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/build-webkit --gtk --release --touch-events MiniBrowser
|
||||
if [[ $# == 0 ]]; then
|
||||
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
|
||||
fi
|
||||
elif [[ "$(uname)" == MINGW* ]]; then
|
||||
/c/Windows/System32/cmd.exe "/c buildwin.bat"
|
||||
|
|
|
|||
Loading…
Reference in a new issue