This is to avoid Windows Command Prompt window from changing the fonts and colors as it transitions into Powershell with its drawing progress bar.
Instead simple console text will be printed:
```
C:\src\f\flutter>bin\flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 2c144c3eeb4b25fd78b90dd3e2a24c36f4201021...
Expanding downloaded archive...
Building flutter tool...
...
```
Fixes https://github.com/flutter/flutter/issues/74864
Currently an invocation of flutter/dart will always attempt to acquire a lock. This can pose problems for tools that attempt to run multiple dart/flutter instances.
Instead update the lock logic (on Linux/macOS) so that we only attempt to acquire it if an update/snapshot needs to be performed. To avoid repeatedly performing downloads/snapshots if multiple flutter/dart invocations are fired off concurrently when an update needs to be performed, do a second check of the download/snapshot condition after the lock is released.
Additionally, moves all of the building/debug output to stderr on both the bash and batch scripts. This allows machine mode consumption of the tool to ignore needing to parse/handle the rebuild messages.
* Update project.pbxproj files to say Flutter rather than Chromium
Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
* Update the copyright notice checker to require a standard notice on all files
* Update copyrights on Dart files. (This was a mechanical commit.)
* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).
* Clean up the copyrights in non-Dart files. (Manual edits.)
Also, make sure templates don't have copyrights.
* Fix some more ORGANIZATIONNAMEs
* Use engine-built dart sdk
* Download dart-sdk from engine
* Move up deps to fix dart sdk constraint problem
* Update update_dart_sdk.ps1 for Windows
* Fix tests so they pass analysis
* More types for tests
* Roll engine
* Update dart sdk stamp location in flutter.bat
* Add newline
In the packaged ZIP files for Flutter we bundle mingit on Windows to make setup for our users easier (they don't have to download and install git anymore). This change makes Flutter use the bundled mingit if it is available and if git is not installed on the system.
This change will still require that users add `flutter\bin` to their path or they'll have to execute `flutter\bin\flutter.bat` directly. A follow-up PR will add a pre-configured Flutter Console that people can start with a double-click to minimize setup even further.
Also in this PR:
* If 7Zip is not available to unpack the Dart SDK try 7Zip's standalone version.
Add support for configuring the base storage URL for Flutter's
artifacts. If FLUTTER_STORAGE_BASE_URL is set, use it instead of
storage.googleapis.com.
The pub server can be overridden by setting PUB_HOSTED_URL.
* Support 'be' channel so you can download dart-sdk from the tip.
This is triggered when you put 'hash/<build hash>' into dart-sdk.version file. For example, 'hash/c0617d20158955d99d6447036237fe2639ba088c'
* Add README.md
* Fix grammar, spacing, 80 chars, nicer ===
This should make our scripts compatible with PowerShell 2 or newer. PowerShell 2 was released in October 2009 and shipped with Windows 7 as default. (I suspect the scripts are now also compatible with PowerShell 1, but that's unconfirmed). This fixes#8606.
The PR also introduces better error handling when Flutter fail to download the Dart SDK to fix#8627.
This brings the Windows script up to par with the Linux/Mac script.
`flutter doctor` works.
There are two scripts (`bin/flutter` and `bin/internal/update_dart-sdk`), which are platform dependent (bash script on Linux/Max, PowerShell script on Windows) and we need to keep an eye on making sure that their logic stays in sync. Both scripts are rather simple and I am not expecting many changes to them. I also made sure that both versions follow the same structure to make it easier to keep them consistent.
Required for https://github.com/flutter/flutter/issues/138