From 29827d75f3a8020ae164cf4a401b8333932a5117 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 11 Feb 2025 13:52:03 +1300 Subject: [PATCH] Update gen_keycodes output to new engine location. (#162479) The engine is now part of Flutter and doesn't need to have the path configured. The current code doesn't update the engine. --- dev/tools/gen_keycodes/README.md | 4 ---- dev/tools/gen_keycodes/bin/gen_keycodes.dart | 12 +----------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/dev/tools/gen_keycodes/README.md b/dev/tools/gen_keycodes/README.md index 8235e6161f..069cccab30 100644 --- a/dev/tools/gen_keycodes/README.md +++ b/dev/tools/gen_keycodes/README.md @@ -38,10 +38,6 @@ anew before generating the files. To do this, run: This will generate `physical_key_data.g.json` and `logical_key_data.g.json`. These files should be checked in. -By default this tool assumes that the gclient directory for flutter/engine -and the root for the flutter/flutter are placed at the same folder. If not, -use `--engine-root=/ENGINE/GCLIENT/ROOT` to specify the engine root. - Other options can be found using `--help`. ## Key ID Scheme diff --git a/dev/tools/gen_keycodes/bin/gen_keycodes.dart b/dev/tools/gen_keycodes/bin/gen_keycodes.dart index c26b6fc681..001ad74c51 100644 --- a/dev/tools/gen_keycodes/bin/gen_keycodes.dart +++ b/dev/tools/gen_keycodes/bin/gen_keycodes.dart @@ -111,16 +111,6 @@ Future main(List rawArguments) async { return; } final ArgParser argParser = ArgParser(); - argParser.addOption( - 'engine-root', - defaultsTo: path.join(flutterRoot.path, '..', 'engine', 'src', 'flutter'), - help: - 'The path to the root of the flutter/engine repository. This is used ' - 'to place the generated engine mapping files. If --engine-root is not ' - r'specified, it will default to $flutterRoot/../engine/src/flutter, ' - 'assuming the engine gclient folder is placed at the same folder as ' - 'the flutter/flutter repository.', - ); argParser.addOption( 'physical-data', defaultsTo: path.join(dataRoot, 'physical_key_data.g.json'), @@ -193,7 +183,7 @@ Future main(List rawArguments) async { exit(0); } - PlatformCodeGenerator.engineRoot = parsedArguments['engine-root'] as String; + PlatformCodeGenerator.engineRoot = path.join(flutterRoot.path, 'engine', 'src', 'flutter'); PhysicalKeyData physicalData; LogicalKeyData logicalData;