diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index e7c068d273d65..db8c007b3732e 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -2145,7 +2145,6 @@ FILE: ../../../flutter/shell/platform/fuchsia/flutter/gfx_session_connection.cc FILE: ../../../flutter/shell/platform/fuchsia/flutter/gfx_session_connection.h FILE: ../../../flutter/shell/platform/fuchsia/flutter/isolate_configurator.cc FILE: ../../../flutter/shell/platform/fuchsia/flutter/isolate_configurator.h -FILE: ../../../flutter/shell/platform/fuchsia/flutter/kernel/extract_far.dart FILE: ../../../flutter/shell/platform/fuchsia/flutter/kernel/framework_shim.dart FILE: ../../../flutter/shell/platform/fuchsia/flutter/kernel/libraries.json FILE: ../../../flutter/shell/platform/fuchsia/flutter/keyboard.cc diff --git a/shell/platform/fuchsia/flutter/kernel/extract_far.dart b/shell/platform/fuchsia/flutter/kernel/extract_far.dart deleted file mode 100644 index 442f64be4bd3d..0000000000000 --- a/shell/platform/fuchsia/flutter/kernel/extract_far.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// @dart = 2.9 - -import "dart:io"; - -import "package:args/args.dart"; - -Future main(List args) async { - final parser = new ArgParser(); - parser.addOption("far-tool", help: "Path to `far` tool"); - parser.addOption("archive", help: "Path to the far archive to extract from"); - parser.addOption("out-dir", help: "Path to output directory"); - final usage = """ -Usage: extract_far.dart [options] {paths} - -Options: -${parser.usage}; -"""; - - ArgResults options; - try { - options = parser.parse(args); - if (options["far-tool"] == null) { - throw "Must specify --far-tool"; - } - if (options["archive"] == null) { - throw "Must specify --archive"; - } - if (options["out-dir"] == null) { - throw "Must specify --out-dir"; - } - } catch (e) { - print("ERROR: $e\n"); - print(usage); - exitCode = 1; - return; - } - - await run(options); -} - -Future run(ArgResults options) async { - final far = options["far-tool"]; - - Future extract(String archive, String file, String output) async { - await new File(output).parent.create(recursive: true); - final args = ["extract-file", "--archive=$archive", "--file=$file", "--output=$output"]; - final result = await Process.run(far, args); - if (result.exitCode != 0) { - print(result.stdout); - print(result.stderr); - throw "Command failed: $far $args"; - } - } - - final outerArchive = options["archive"]; - final outDir = options["out-dir"]; - - final innerArchive = "$outDir/meta.far"; - await extract(outerArchive, "meta.far", innerArchive); - - final manifest = "$outDir/meta/contents"; - await extract(innerArchive, "meta/contents", manifest); - - final blobNames = {}; - for (final line in await new File(manifest).readAsLines()) { - final pivot = line.lastIndexOf("="); - blobNames[line.substring(0, pivot)] = line.substring(pivot + 1, line.length); - } - - for (final path in options.rest) { - final blobName = blobNames[path]; - if (blobName == null) { - print("Archive contents: "); - for (final key in blobNames.keys) { - print(key); - } - throw "$outerArchive does not contain $path"; - } - await extract(outerArchive, blobName, "$outDir/$path"); - } -}