Skip to content

Commit 8a81b11

Browse files
authored
devops: replace WebKit for MacOS 10.14 build with a stub (#6886)
This patch will produce a stub build of WebKit for MacOS 10.14 with a stub that errors out with a descriptive error. References #6879
1 parent 401dcfd commit 8a81b11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+9
-25498
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1444
2-
Changed: yurys@chromium.org Wed 19 May 2021 11:08:01 AM PDT
1+
1445
2+
Changed: lushnikov@chromium.org Thu Jun 3 15:24:06 PDT 2021

browser_patches/deprecated-webkit-mac-10.14/UPSTREAM_CONFIG.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

browser_patches/deprecated-webkit-mac-10.14/archive.sh

Lines changed: 1 addition & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -28,111 +28,13 @@ if ! [[ -d $(dirname $ZIP_PATH) ]]; then
2828
exit 1
2929
fi
3030

31-
main() {
32-
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
33-
cd "${WK_CHECKOUT_PATH}"
34-
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
35-
else
36-
cd "checkout"
37-
fi
38-
39-
set -x
40-
if [[ "$(uname)" == "Darwin" ]]; then
41-
createZipForMac
42-
elif [[ "$(uname)" == "Linux" ]]; then
43-
createZipForLinux
44-
elif [[ "$(uname)" == MINGW* ]]; then
45-
createZipForWindows
46-
else
47-
echo "ERROR: cannot upload on this platform!" 1>&2
48-
exit 1;
49-
fi
50-
}
51-
52-
53-
createZipForLinux() {
54-
# create a TMP directory to copy all necessary files
55-
local tmpdir=$(mktemp -d -t webkit-deploy-XXXXXXXXXX)
56-
mkdir -p $tmpdir
57-
58-
# copy runner
59-
cp -t $tmpdir $SCRIPTS_DIR/pw_run.sh
60-
# copy protocol
61-
node $SCRIPTS_DIR/concat_protocol.js > $tmpdir/protocol.json
62-
63-
# Generate and unpack MiniBrowser bundles for each port
64-
for port in gtk wpe; do
65-
WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/${port^^} Tools/Scripts/generate-bundle \
66-
--bundle=MiniBrowser --release \
67-
--platform=${port} --destination=${tmpdir}
68-
unzip ${tmpdir}/MiniBrowser_${port}_release.zip -d ${tmpdir}/minibrowser-${port}
69-
rm -f ${tmpdir}/MiniBrowser_${port}_release.zip
70-
done
71-
72-
# tar resulting directory and cleanup TMP.
73-
cd $tmpdir
74-
zip --symlinks -r $ZIP_PATH ./
75-
cd -
76-
rm -rf $tmpdir
77-
}
78-
79-
# see https://docs.microsoft.com/en-us/visualstudio/install/tools-for-managing-visual-studio-instances?view=vs-2019
80-
printMSVCRedistDir() {
81-
local dll_file=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll')
82-
local redist_dir=$(dirname "$dll_file")
83-
if ! [[ -d $redist_dir ]]; then
84-
echo "ERROR: cannot find MS VS C++ redistributable $redist_dir"
85-
exit 1;
86-
fi
87-
echo "$redist_dir"
88-
}
89-
90-
createZipForWindows() {
91-
# create a TMP directory to copy all necessary files
92-
local tmpdir="/tmp/webkit-deploy-$(date +%s)"
93-
mkdir -p $tmpdir
94-
95-
cp -t $tmpdir ./WebKitLibraries/win/bin64/*.dll
96-
cd WebKitBuild/Release/bin64
97-
cp -r -t $tmpdir WebKit.resources
98-
cp -t $tmpdir JavaScriptCore.dll PlaywrightLib.dll WTF.dll WebKit2.dll libEGL.dll libGLESv2.dll
99-
cp -t $tmpdir Playwright.exe WebKitNetworkProcess.exe WebKitWebProcess.exe
100-
cd -
101-
cd "$(printMSVCRedistDir)"
102-
cp -t $tmpdir msvcp140.dll vcruntime140.dll vcruntime140_1.dll msvcp140_2.dll
103-
cd -
104-
105-
# copy protocol
106-
node $SCRIPTS_DIR/concat_protocol.js > $tmpdir/protocol.json
107-
# tar resulting directory and cleanup TMP.
108-
cd $tmpdir
109-
zip -r $ZIP_PATH ./
110-
cd -
111-
rm -rf $tmpdir
112-
}
113-
11431
createZipForMac() {
11532
# create a TMP directory to copy all necessary files
11633
local tmpdir=$(mktemp -d)
11734

11835
# copy all relevant files
119-
ditto {./WebKitBuild/Release,$tmpdir}/com.apple.WebKit.Networking.xpc
120-
ditto {./WebKitBuild/Release,$tmpdir}/com.apple.WebKit.Plugin.64.xpc
121-
ditto {./WebKitBuild/Release,$tmpdir}/com.apple.WebKit.WebContent.xpc
122-
ditto {./WebKitBuild/Release,$tmpdir}/JavaScriptCore.framework
123-
ditto {./WebKitBuild/Release,$tmpdir}/libwebrtc.dylib
124-
ditto {./WebKitBuild/Release,$tmpdir}/Playwright.app
125-
ditto {./WebKitBuild/Release,$tmpdir}/PluginProcessShim.dylib
126-
ditto {./WebKitBuild/Release,$tmpdir}/WebCore.framework
127-
ditto {./WebKitBuild/Release,$tmpdir}/WebInspectorUI.framework
128-
ditto {./WebKitBuild/Release,$tmpdir}/WebKit.framework
129-
ditto {./WebKitBuild/Release,$tmpdir}/WebKitLegacy.framework
13036
ditto {$SCRIPTS_DIR,$tmpdir}/pw_run.sh
13137
# copy protocol
132-
node $SCRIPTS_DIR/concat_protocol.js > $tmpdir/protocol.json
133-
134-
# Remove all broken symlinks. @see https://github.com/microsoft/playwright/issues/5472
135-
find "${tmpdir}" -type l ! -exec test -e {} \; -print | xargs rm
13638

13739
# zip resulting directory and cleanup TMP.
13840
ditto -c -k $tmpdir $ZIP_PATH
@@ -143,4 +45,4 @@ trap "cd $(pwd -P)" EXIT
14345
cd "$(dirname "$0")"
14446
SCRIPTS_DIR="$(pwd -P)"
14547

146-
main "$@"
48+
createZipForMac
Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,3 @@
11
#!/bin/bash
2-
set -e
3-
set +x
42

5-
trap "cd $(pwd -P)" EXIT
6-
cd "$(dirname $0)"
7-
SCRIPT_FOLDER="$(pwd -P)"
8-
9-
build_gtk() {
10-
if ! [[ -d ./WebKitBuild/GTK/DependenciesGTK ]]; then
11-
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs
12-
fi
13-
local CMAKE_ARGS=""
14-
if [[ -n "${EXPORT_COMPILE_COMMANDS}" ]]; then
15-
CMAKE_ARGS="--cmakeargs=\"-DCMAKE_EXPORT_COMPILE_COMMANDS=1\""
16-
fi
17-
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
18-
}
19-
20-
build_wpe() {
21-
if ! [[ -d ./WebKitBuild/WPE/DependenciesWPE ]]; then
22-
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitwpe-libs
23-
fi
24-
local CMAKE_ARGS=""
25-
if [[ -n "${EXPORT_COMPILE_COMMANDS}" ]]; then
26-
CMAKE_ARGS="--cmakeargs=\"-DCMAKE_EXPORT_COMPILE_COMMANDS=1\""
27-
fi
28-
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
29-
}
30-
31-
ensure_linux_deps() {
32-
yes | DEBIAN_FRONTEND=noninteractive ./Tools/gtk/install-dependencies
33-
yes | DEBIAN_FRONTEND=noninteractive ./Tools/wpe/install-dependencies
34-
yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/update-webkitwpe-libs
35-
yes | DEBIAN_FRONTEND=noninteractive WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/update-webkitgtk-libs
36-
}
37-
38-
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
39-
cd "${WK_CHECKOUT_PATH}"
40-
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
41-
else
42-
cd "checkout"
43-
fi
44-
45-
if [[ "$(uname)" == "Darwin" ]]; then
46-
./Tools/Scripts/build-webkit --release --touch-events --orientation-events
47-
elif [[ "$(uname)" == "Linux" ]]; then
48-
if [[ $# == 0 || (-z "$1") ]]; then
49-
echo
50-
echo BUILDING: GTK and WPE
51-
echo
52-
build_wpe
53-
build_gtk
54-
elif [[ "$1" == "--full" ]]; then
55-
echo
56-
echo BUILDING: GTK and WPE
57-
echo
58-
ensure_linux_deps
59-
build_wpe
60-
build_gtk
61-
elif [[ "$1" == "--gtk" ]]; then
62-
echo
63-
echo BUILDING: GTK
64-
echo
65-
build_gtk
66-
elif [[ "$1" == "--wpe" ]]; then
67-
echo
68-
echo BUILDING: WPE
69-
echo
70-
build_wpe
71-
fi
72-
elif [[ "$(uname)" == MINGW* ]]; then
73-
/c/Windows/System32/cmd.exe "/c $(cygpath -w ${SCRIPT_FOLDER}/buildwin.bat)"
74-
else
75-
echo "ERROR: cannot upload on this platform!" 1>&2
76-
exit 1;
77-
fi
3+
# NOTE: this file is intentionally empty since deprecated-webkit-mac-10.14 is now a stub.

browser_patches/deprecated-webkit-mac-10.14/buildwin.bat

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
11
#!/bin/bash
2-
set -e
3-
set +x
42

5-
trap "cd $(pwd -P)" EXIT
6-
cd "$(dirname $0)"
7-
8-
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
9-
cd "${WK_CHECKOUT_PATH}"
10-
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
11-
else
12-
cd "checkout"
13-
fi
14-
15-
if [[ -d ./WebKitBuild ]]; then
16-
rm -rf ./WebKitBuild/Release
17-
fi
18-
if [[ -d ./WebKitBuild/GTK ]]; then
19-
rm -rf ./WebKitBuild/GTK/Release
20-
fi
21-
if [[ -d ./WebKitBuild/WPE ]]; then
22-
rm -rf ./WebKitBuild/WPE/Release
23-
fi
3+
# NOTE: this file is intentionally empty since deprecated-webkit-mac-10.14 is now a stub.

browser_patches/deprecated-webkit-mac-10.14/concat_protocol.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

browser_patches/deprecated-webkit-mac-10.14/embedder/Playwright/Configurations/Base.xcconfig

Lines changed: 0 additions & 87 deletions
This file was deleted.

browser_patches/deprecated-webkit-mac-10.14/embedder/Playwright/Configurations/DebugRelease.xcconfig

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)