mirror of
https://github.com/flutter/flutter
synced 2024-07-05 01:48:58 +00:00
Make flutter and dart scripts invoke their batch file equivalents on Windows (#59789)
This makes the flutter and dart scripts invoke their batch file equivalents if running under MINGW (i.e. git-bash) on Windows. This allows for proper locking, and makes sure that people aren't using two different (and non-mutally-aware) locking systems when running flutter on Windows. I also fixed a couple of places where we look for MINGW32, which fails under MINGW64. It just looks for MINGW now.
This commit is contained in:
parent
01e09ea8af
commit
6db22118ad
8
bin/dart
8
bin/dart
|
@ -43,8 +43,14 @@ function follow_links() (
|
|||
echo "$file"
|
||||
)
|
||||
|
||||
PROG_NAME="$(follow_links "$BASH_SOURCE")"
|
||||
PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")"
|
||||
BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
|
||||
OS="$(uname -s)"
|
||||
|
||||
if [[ $OS =~ MINGW.* ]]; then
|
||||
# If we're on Windows, invoke the batch script instead, to get proper locking.
|
||||
exec "${BIN_DIR}/dart.bat" "$@"
|
||||
fi
|
||||
|
||||
# To define `shared::execute()` function
|
||||
source "$BIN_DIR/internal/shared.sh"
|
||||
|
|
|
@ -43,8 +43,14 @@ function follow_links() (
|
|||
echo "$file"
|
||||
)
|
||||
|
||||
PROG_NAME="$(follow_links "$BASH_SOURCE")"
|
||||
PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")"
|
||||
BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
|
||||
OS="$(uname -s)"
|
||||
|
||||
if [[ $OS =~ MINGW.* ]]; then
|
||||
# If we're on Windows, invoke the batch script instead, to get proper locking.
|
||||
exec "${BIN_DIR}/flutter.bat" "$@"
|
||||
fi
|
||||
|
||||
# To define `shared::execute()` function
|
||||
source "$BIN_DIR/internal/shared.sh"
|
||||
|
|
|
@ -170,7 +170,7 @@ function shared::execute() {
|
|||
# If running over git-bash, overrides the default UNIX executables with win32
|
||||
# executables
|
||||
case "$(uname -s)" in
|
||||
MINGW32*)
|
||||
MINGW*)
|
||||
DART="$DART.exe"
|
||||
PUB="$PUB.bat"
|
||||
;;
|
||||
|
|
|
@ -67,7 +67,7 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t
|
|||
DART_ZIP_NAME="dart-sdk-linux-x64.zip"
|
||||
IS_USER_EXECUTABLE="-perm /u+x"
|
||||
;;
|
||||
MINGW32*)
|
||||
MINGW*)
|
||||
DART_ZIP_NAME="dart-sdk-windows-x64.zip"
|
||||
IS_USER_EXECUTABLE="-perm /u+x"
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user