Skip to content

Commit aafcf93

Browse files
authored
browser(firefox): bundle VS C++ redistributable dlls (#4359)
1 parent bc20bfd commit aafcf93

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

browser_patches/firefox/BUILD_NUMBER

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1201
2-
Changed: lushnikov@chromium.org Tue 03 Nov 2020 02:16:18 PM PST
1+
1202
2+
Changed: yurys@chromium.org Thu Nov 5 20:30:30 GMTST 2020

browser_patches/firefox/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,22 @@ elif [[ "$(uname)" == "Linux" ]]; then
2626
echo "-- building on Linux"
2727
echo "ac_add_options --disable-av1" > .mozconfig
2828
elif [[ "$(uname)" == MINGW* ]]; then
29+
TMPFILE=$(mktemp)
2930
if [[ $1 == "--win64" ]]; then
3031
echo "-- building win64 build on MINGW"
3132
echo "ac_add_options --target=x86_64-pc-mingw32" > .mozconfig
3233
echo "ac_add_options --host=x86_64-pc-mingw32" >> .mozconfig
34+
"$PROGRAMFILES\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll' > $TMPFILE
3335
else
3436
echo "-- building win32 build on MINGW"
37+
"$PROGRAMFILES\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x86\**\vcruntime140.dll' > $TMPFILE
3538
fi
39+
WIN32_REDIST_DIR=$(dirname "$(cat $TMPFILE)")
40+
if ! [[ -d $WIN32_REDIST_DIR ]]; then
41+
echo "Error: cannot find MS VS C++ redistributable $WIN32_REDIST_DIR"
42+
exit 1;
43+
fi
44+
echo "export WIN32_REDIST_DIR=\"$WIN32_REDIST_DIR\"" >> .mozconfig
3645
else
3746
echo "ERROR: cannot upload on this platform!" 1>&2
3847
exit 1;

0 commit comments

Comments
 (0)