Commit Graph

31 Commits

Author SHA1 Message Date
Christopher Fujino
1519553bed
[flutter_tools] print out the unzipping method used by update_dart_sdk.ps1 (#133364)
in case there are future issues with unzipping the dart sdk, such as https://github.com/flutter/flutter/issues/132592, we should log out what tool we are using to try to extract the archive.
2023-08-31 21:06:47 +00:00
Loïc Sharma
9e67e0e4a1
[Windows] Allow overwriting the cache's Dart SDK archive license file… (#132777)
Relands https://github.com/flutter/flutter/pull/132669 after it was reverted by https://github.com/flutter/flutter/pull/132773. The test failures were fixed separately by https://github.com/flutter/flutter/pull/132766

Tracking issue: https://github.com/flutter/flutter/issues/132592
Cherrypick issue: https://github.com/flutter/flutter/issues/132718
2023-08-17 18:45:18 +00:00
yaakovschectman
e10d74b4d5
Revert "[Windows] Allow overwriting the cache's Dart SDK archive license file" (#132773)
Reverts flutter/flutter#132669

Introduced failure on `windows/mac/linux framework_library_tests`.

```
05:41 +7318 ~22 -1: /b/s/w/ir/x/w/flutter/packages/flutter/test/material/menu_bar_theme_test.dart: (tearDownAll) [E]                                                                                   
  Expected: leak free
    Actual: <Instance of 'Leaks'>
     Which: contains leaks:
            # The text is generated by leak_tracker.
            # For leak troubleshooting tips open:
            # https://github.com/dart-lang/leak_tracker/blob/main/doc/TROUBLESHOOT.md
            notDisposed:
              total: 3
              objects:
                ValueNotifier<_OverlayEntryWidgetState?>:
                  test: Constructor parameters override theme parameters
                  identityHashCode: 407433615
                FocusScopeNode:
                  test: Constructor parameters override theme parameters
                  identityHashCode: 513181650
                FocusScopeNode:
                  test: Constructor parameters override theme parameters
                  identityHashCode: 704743556
            
  package:matcher                                                                   expect
  package:flutter_test/src/widget_tester.dart 458:18                                expect
  package:leak_tracker_flutter_testing/src/leak_tracking_flutter_testing.dart 81:5  _tearDownTestingWithLeakTracking
  ===== asynchronous gap ===========================
  dart:async                                                                        _CustomZone.registerBinaryCallback
  package:leak_tracker_flutter_testing/src/leak_tracking_flutter_testing.dart 59:9  configureLeakTrackingTearDown.<fn>
```
2023-08-17 17:26:17 +00:00
Loïc Sharma
7ee864ee37
[Windows] Allow overwriting the cache's Dart SDK archive license file (#132669)
https://github.com/flutter/engine/pull/43974 added a license file to the Dart SDK's ZIP archive. As a result, extracting the Dart SDK now needs to overwrite the cache's `LICENSE.dart_sdk_archive.md` file.

This is a short-term solution that will be cherry-picked for the next [3.14 beta release](https://github.com/flutter/flutter/issues/132267). Addresses https://github.com/flutter/flutter/issues/132592.

The long-term solution is tracked by https://github.com/flutter/flutter/issues/132702
2023-08-17 16:08:08 +00:00
Zachary Anderson
118c2df776
Allows adding a storage 'realm' to the storage base URL (#131951)
Context: https://github.com/flutter/flutter/issues/131862

This PR injects a "realm" component to the storage base URL when the contents of the file `bin/internal/engine.realm` is non-empty.

As documented in the PR, when the realm is `flutter_archives_v2`, and `bin/internal/engine.version` contains the commit hash for a commit in a `flutter/engine` PR, then the artifacts pulled by the tool will be the artifacts built by the presubmit checks for the PR.

This works for everything but the following two cases:
1. Fuchsia artifacts are not uploaded to CIPD by the Fuchsia presubmit builds.
2. Web artifacts are not uploaded to gstatic by the web engine presubmit builds.

For (1), the flutter/flutter presubmit `fuchsia_precache` is driven by a shell script outside of the repo. It will fail when the `engine.version` and `engine.realm` don't point to a post-submit engine commit.

For (2), the flutter/flutter web presubmit tests that refer to artifacts in gstatic hang when the artifacts aren't found, so this PR skips them.
2023-08-09 23:26:05 +00:00
godofredoc
da6528cda6
Point to a new artifacts location. (#70673)
This is in preparation to move the flutter artifacts to a more secure
location.

Bug:
  go/fxb/64576
2021-02-04 18:44:47 -08:00
Alexander Aprelev
6ec7368a15
[win] Suppress Powershell download/extraction visualization progress bar. (#75335)
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
2021-02-03 11:37:40 -08:00
Jonah Williams
10a1a7016a
[flutter_tool] prepend module name on Windows pwr shell (#67801)
In case different powershell module is installed over the default name. Fixes #22896
2020-10-12 09:49:41 -07:00
Jonah Williams
f1472e1fc4
[flutter_tools] only lock if an upgrade/download will be performed (linux/macos) and output building messages to stderr (#65422)
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.
2020-09-22 17:44:08 -07:00
Niklas Schulze
580a96f957
update_dart_sdk.ps1: Ensure Start-BitsTransfer always throws an exception in case of errors (#65929) 2020-09-17 15:22:13 -07:00
Jonah Williams
1021a52f13
[flutter_tools] exit script if powershell version detection fails (#64773) 2020-08-31 11:23:06 -07:00
Ian Hickson
449f4a6673
License update (#45373)
* 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
2019-11-27 15:04:02 -08:00
Danny Tuppeny
0f4ae3ff4e
Disable the progress bar when downloading the Dart SDK via Invoke-WebRequest (#37792) 2019-08-08 08:25:37 +01:00
Tim Sneath
529189791c
Replace flutter.io with flutter.dev (#30562) 2019-04-05 11:39:30 -07:00
KyleWong
cf612a4299 Check powershell version. (#27596) 2019-02-06 14:37:47 -08:00
Niklas Schulze
154dbc5975 update_dart_sdk.ps1: Fall back to Invoke-WebRequest if BITS fails (#19873) 2018-07-27 14:29:20 -07:00
Alexander Aprelev
3b84503403
Move quotes around to help Powershell 2.0 to substitute variable with value (#14907) 2018-02-26 20:11:11 -08:00
Alexander Aprelev
a448994543
Use the Dart SDK built from Flutter engine rather than from dartlang.org (#14610)
* 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
2018-02-14 07:18:25 -08:00
Michael Goderbauer
54e3333182
Use bundled mingit on Windows if available (#14025)
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.
2018-01-10 16:48:39 -08:00
Jakob Andersen
e1018fab34
Make artifacts URLs configurable. (#13380)
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.
2017-12-07 16:30:23 +01:00
Michael Goderbauer
e6f71555f6 Revert "Work around to fix appveyor build (#11295)" (#11297)
This reverts commit bc4a3f1703.
2017-07-24 12:54:07 -07:00
Michael Goderbauer
bc4a3f1703 Work around to fix appveyor build (#11295)
* work around for appveyor connectivity issues

Unfortuantelly, this slows down our build :(

* review feedback
2017-07-19 12:05:30 -07:00
Alexander Aprelev
272faba1c0 Support 'be' channel so you can download dart-sdk from the tip. (#10625)
* 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 ===
2017-06-13 08:28:16 -07:00
Michael Goderbauer
7ede6b530e Use 7-Zip to unzip SDK, if available. (#8721)
Windows' built-in unzippers are painfully slow. It drives me mad!

Unzip SDK with 7-Zip: ~10s
Unzip SDK with Windows: ~90s
2017-03-10 15:21:08 -08:00
Michael Goderbauer
e2dccc5e48 Ensure compatibility with older PowerShell versions and better error handling (#8652)
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.
2017-03-08 10:52:07 -08:00
Michael Goderbauer
4d394591cf fix for PowerShell Script when flutter/bin is not in PATH (#8620) 2017-03-07 15:00:01 -08:00
Michael Goderbauer
582df7b643 Minor fixes to SDK update PowerShell Script (#8617)
* for Win 7, we need to import BitsTransfer before using it
* switch to PowerShell's build-in archive expander (instead of relying on .NET)
2017-03-07 11:14:59 -08:00
Michael Goderbauer
756842a29e Don't delete old Dart SDK if it is in use (#8385) 2017-02-24 09:28:58 -08:00
Michael Goderbauer
b65ed45222 Improvments to bat file (#8377)
Mainly: Don't call out to PoerShell (expansive!) if Dart SDK is upto date.
2017-02-23 12:09:52 -08:00
Michael Goderbauer
769646218a Add git config option to automatically convert CRLF to LF (#8122) 2017-02-14 10:21:33 -08:00
Michael Goderbauer
51dc83dd80 Launch Flutter Tools on Windows. (#7613)
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
2017-01-24 10:58:11 -08:00