devops: support msys2 (#13194)

This commit is contained in:
liuxingbaoyu 2022-04-01 06:09:38 +08:00 committed by GitHub
parent 6a463195c4
commit 297edb02f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 15 additions and 15 deletions

View File

@ -332,7 +332,7 @@ if [[ "$CURRENT_HOST_OS_VERSION" != "$EXPECTED_HOST_OS_VERSION" ]]; then
exit 1
fi
if [[ $(uname) == MINGW* ]]; then
if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; then
ZIP_PATH="$PWD/archive-$BROWSER_NAME.zip"
LOG_PATH="$PWD/log-$BROWSER_NAME.zip"
else

View File

@ -34,7 +34,7 @@ export GOMA_START_COMPILER_PROXY=true
function print_gn_args() {
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}")
fi
echo 'use_goma = true'

View File

@ -39,7 +39,7 @@ mirror_chromium() {
PLATFORM="--mac"
elif [[ "${CURRENT_HOST_OS}" == "Linux" ]]; then
PLATFORM="--linux"
elif [[ "${CURRENT_HOST_OS}" == MINGW* ]]; then
elif [[ "${CURRENT_HOST_OS}" == MINGW* || "${CURRENT_HOST_OS}" == MSYS* ]]; then
PLATFORM="--win64"
else
echo "ERROR: unsupported host platform - ${CURRENT_HOST_OS}"

View File

@ -56,7 +56,7 @@ fi
# TODO(aslushnikov): this won't be needed with official builds.
if [[ "$(uname)" == "Linux" ]]; then
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
cd "$(printMSVCRedistDir)"
cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dll

View File

@ -32,7 +32,7 @@ if [[ "$(uname)" == "Darwin" ]]; then
echo "-- building on Mac"
elif [[ "$(uname)" == "Linux" ]]; then
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-default-browser-agent" >> .mozconfig
echo "ac_add_options --disable-maintenance-service" >> .mozconfig
@ -67,7 +67,7 @@ else
echo "ac_add_options --enable-release" >> .mozconfig
fi
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" ]]; then
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" || "$(uname)" == MSYS* ]]; then
# This options is only available on win and mac.
echo "ac_add_options --disable-update-agent" >> .mozconfig
fi

View File

@ -58,7 +58,7 @@ fi
# TODO(aslushnikov): this won't be needed with official builds.
if [[ "$(uname)" == "Linux" ]]; then
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
cd "$(printMSVCRedistDir)"
cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dll

View File

@ -32,12 +32,12 @@ if [[ "$(uname)" == "Darwin" ]]; then
echo "-- building on Mac"
elif [[ "$(uname)" == "Linux" ]]; then
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-default-browser-agent" >> .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 --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')
@ -67,7 +67,7 @@ else
echo "ac_add_options --enable-release" >> .mozconfig
fi
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" ]]; then
if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" || "$(uname)" == MSYS* ]]; then
# This options is only available on win and mac.
echo "ac_add_options --disable-update-agent" >> .mozconfig
fi

View File

@ -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)"
exit 1
fi
if [[ $(uname) == MINGW* ]]; then
if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; then
# Convert POSIX path to MSYS
WIN_PATH=$({ cd $(dirname "$ZIP_PATH") && pwd -W; } | sed 's|/|\\|g')
WIN_PATH="${WIN_PATH}\\$(basename "$ZIP_PATH")"

View File

@ -41,7 +41,7 @@ main() {
createZipForMac
elif [[ "$(uname)" == "Linux" ]]; then
createZipForLinux
elif [[ "$(uname)" == MINGW* ]]; then
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
createZipForWindows
else
echo "ERROR: cannot upload on this platform!" 1>&2

View File

@ -81,7 +81,7 @@ elif [[ "$(uname)" == "Linux" ]]; then
echo
build_wpe
fi
elif [[ "$(uname)" == MINGW* ]]; then
elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
/c/Windows/System32/cmd.exe "/c $(cygpath -w "${SCRIPT_FOLDER}"/buildwin.bat)"
else
echo "ERROR: cannot upload on this platform!" 1>&2

View File

@ -10,7 +10,7 @@ if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then
exit 0
fi
if [[ "$(uname)" != MINGW* ]]; then
if [[ "$(uname)" != MINGW* || "$(uname)" == MSYS* ]]; then
echo "ERROR: this script only supports MINGW (windows)"
exit 1
fi

View File

@ -5,7 +5,7 @@ set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
if [[ "$(uname)" == MINGW* ]]; then
if [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then
/c/Windows/System32/cmd.exe "/c buildwin.bat"
else
echo "ERROR: cannot upload on this platform!" 1>&2