devops: support msys2 (#13194)
This commit is contained in:
parent
6a463195c4
commit
297edb02f1
|
|
@ -332,7 +332,7 @@ if [[ "$CURRENT_HOST_OS_VERSION" != "$EXPECTED_HOST_OS_VERSION" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(uname) == MINGW* ]]; then
|
if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
ZIP_PATH="$PWD/archive-$BROWSER_NAME.zip"
|
ZIP_PATH="$PWD/archive-$BROWSER_NAME.zip"
|
||||||
LOG_PATH="$PWD/log-$BROWSER_NAME.zip"
|
LOG_PATH="$PWD/log-$BROWSER_NAME.zip"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ export GOMA_START_COMPILER_PROXY=true
|
||||||
|
|
||||||
function print_gn_args() {
|
function print_gn_args() {
|
||||||
PLAYWRIGHT_GOMA_PATH="${SCRIPT_FOLDER}/electron-build-tools/third_party/goma"
|
PLAYWRIGHT_GOMA_PATH="${SCRIPT_FOLDER}/electron-build-tools/third_party/goma"
|
||||||
if [[ $(uname) == MINGW* ]]; then
|
if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
PLAYWRIGHT_GOMA_PATH=$(cygpath -w "${PLAYWRIGHT_GOMA_PATH}")
|
PLAYWRIGHT_GOMA_PATH=$(cygpath -w "${PLAYWRIGHT_GOMA_PATH}")
|
||||||
fi
|
fi
|
||||||
echo 'use_goma = true'
|
echo 'use_goma = true'
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ mirror_chromium() {
|
||||||
PLATFORM="--mac"
|
PLATFORM="--mac"
|
||||||
elif [[ "${CURRENT_HOST_OS}" == "Linux" ]]; then
|
elif [[ "${CURRENT_HOST_OS}" == "Linux" ]]; then
|
||||||
PLATFORM="--linux"
|
PLATFORM="--linux"
|
||||||
elif [[ "${CURRENT_HOST_OS}" == MINGW* ]]; then
|
elif [[ "${CURRENT_HOST_OS}" == MINGW* || "${CURRENT_HOST_OS}" == MSYS* ]]; then
|
||||||
PLATFORM="--win64"
|
PLATFORM="--win64"
|
||||||
else
|
else
|
||||||
echo "ERROR: unsupported host platform - ${CURRENT_HOST_OS}"
|
echo "ERROR: unsupported host platform - ${CURRENT_HOST_OS}"
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ fi
|
||||||
# TODO(aslushnikov): this won't be needed with official builds.
|
# TODO(aslushnikov): this won't be needed with official builds.
|
||||||
if [[ "$(uname)" == "Linux" ]]; then
|
if [[ "$(uname)" == "Linux" ]]; then
|
||||||
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"
|
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
||||||
cd "$(printMSVCRedistDir)"
|
cd "$(printMSVCRedistDir)"
|
||||||
cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dll
|
cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dll
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
echo "-- building on Mac"
|
echo "-- building on Mac"
|
||||||
elif [[ "$(uname)" == "Linux" ]]; then
|
elif [[ "$(uname)" == "Linux" ]]; then
|
||||||
echo "-- building on Linux"
|
echo "-- building on Linux"
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
||||||
echo "ac_add_options --disable-default-browser-agent" >> .mozconfig
|
echo "ac_add_options --disable-default-browser-agent" >> .mozconfig
|
||||||
echo "ac_add_options --disable-maintenance-service" >> .mozconfig
|
echo "ac_add_options --disable-maintenance-service" >> .mozconfig
|
||||||
|
|
@ -67,7 +67,7 @@ else
|
||||||
echo "ac_add_options --enable-release" >> .mozconfig
|
echo "ac_add_options --enable-release" >> .mozconfig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" || "$(uname)" == MSYS* ]]; then
|
||||||
# This options is only available on win and mac.
|
# This options is only available on win and mac.
|
||||||
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ fi
|
||||||
# TODO(aslushnikov): this won't be needed with official builds.
|
# TODO(aslushnikov): this won't be needed with official builds.
|
||||||
if [[ "$(uname)" == "Linux" ]]; then
|
if [[ "$(uname)" == "Linux" ]]; then
|
||||||
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"
|
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
||||||
cd "$(printMSVCRedistDir)"
|
cd "$(printMSVCRedistDir)"
|
||||||
cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dll
|
cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dll
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,12 @@ if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
echo "-- building on Mac"
|
echo "-- building on Mac"
|
||||||
elif [[ "$(uname)" == "Linux" ]]; then
|
elif [[ "$(uname)" == "Linux" ]]; then
|
||||||
echo "-- building on Linux"
|
echo "-- building on Linux"
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
||||||
echo "ac_add_options --disable-default-browser-agent" >> .mozconfig
|
echo "ac_add_options --disable-default-browser-agent" >> .mozconfig
|
||||||
echo "ac_add_options --disable-maintenance-service" >> .mozconfig
|
echo "ac_add_options --disable-maintenance-service" >> .mozconfig
|
||||||
|
|
||||||
echo "-- building win64 build on MINGW"
|
echo "-- building on Windows"
|
||||||
echo "ac_add_options --target=x86_64-pc-mingw32" >> .mozconfig
|
echo "ac_add_options --target=x86_64-pc-mingw32" >> .mozconfig
|
||||||
echo "ac_add_options --host=x86_64-pc-mingw32" >> .mozconfig
|
echo "ac_add_options --host=x86_64-pc-mingw32" >> .mozconfig
|
||||||
DLL_FILE=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll')
|
DLL_FILE=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll')
|
||||||
|
|
@ -67,7 +67,7 @@ else
|
||||||
echo "ac_add_options --enable-release" >> .mozconfig
|
echo "ac_add_options --enable-release" >> .mozconfig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" || "$(uname)" == MSYS* ]]; then
|
||||||
# This options is only available on win and mac.
|
# This options is only available on win and mac.
|
||||||
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
echo "ac_add_options --disable-update-agent" >> .mozconfig
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ if [[ "${ZIP_PATH}" != *.zip && "${ZIP_PATH}" != *.gz ]]; then
|
||||||
echo "ERROR: ${ZIP_PATH} is not an archive (must have a .zip or .gz extension)"
|
echo "ERROR: ${ZIP_PATH} is not an archive (must have a .zip or .gz extension)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ $(uname) == MINGW* ]]; then
|
if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
# Convert POSIX path to MSYS
|
# Convert POSIX path to MSYS
|
||||||
WIN_PATH=$({ cd $(dirname "$ZIP_PATH") && pwd -W; } | sed 's|/|\\|g')
|
WIN_PATH=$({ cd $(dirname "$ZIP_PATH") && pwd -W; } | sed 's|/|\\|g')
|
||||||
WIN_PATH="${WIN_PATH}\\$(basename "$ZIP_PATH")"
|
WIN_PATH="${WIN_PATH}\\$(basename "$ZIP_PATH")"
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ main() {
|
||||||
createZipForMac
|
createZipForMac
|
||||||
elif [[ "$(uname)" == "Linux" ]]; then
|
elif [[ "$(uname)" == "Linux" ]]; then
|
||||||
createZipForLinux
|
createZipForLinux
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
createZipForWindows
|
createZipForWindows
|
||||||
else
|
else
|
||||||
echo "ERROR: cannot upload on this platform!" 1>&2
|
echo "ERROR: cannot upload on this platform!" 1>&2
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ elif [[ "$(uname)" == "Linux" ]]; then
|
||||||
echo
|
echo
|
||||||
build_wpe
|
build_wpe
|
||||||
fi
|
fi
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
/c/Windows/System32/cmd.exe "/c $(cygpath -w "${SCRIPT_FOLDER}"/buildwin.bat)"
|
/c/Windows/System32/cmd.exe "/c $(cygpath -w "${SCRIPT_FOLDER}"/buildwin.bat)"
|
||||||
else
|
else
|
||||||
echo "ERROR: cannot upload on this platform!" 1>&2
|
echo "ERROR: cannot upload on this platform!" 1>&2
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(uname)" != MINGW* ]]; then
|
if [[ "$(uname)" != MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
echo "ERROR: this script only supports MINGW (windows)"
|
echo "ERROR: this script only supports MINGW (windows)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ set +x
|
||||||
trap "cd $(pwd -P)" EXIT
|
trap "cd $(pwd -P)" EXIT
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
|
|
||||||
if [[ "$(uname)" == MINGW* ]]; then
|
if [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
|
||||||
/c/Windows/System32/cmd.exe "/c buildwin.bat"
|
/c/Windows/System32/cmd.exe "/c buildwin.bat"
|
||||||
else
|
else
|
||||||
echo "ERROR: cannot upload on this platform!" 1>&2
|
echo "ERROR: cannot upload on this platform!" 1>&2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue