update for flutter 3.7.0 (#158)
Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
19a1b05ea2
commit
51a1d68590
@@ -1 +1 @@
|
||||
3316dd8728419ad3534e3f6112aa6291f587078a
|
||||
b24591ed328a2d4ce6505819e2f5898a78132f7f
|
||||
|
||||
@@ -1 +1 @@
|
||||
135454af32477f815a7525073027a3ff9eff1bfd
|
||||
b06b8b2710955028a6b562f5aa6fe62941d6febf
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
// Copyright 2021 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2020 Samsung Electronics Co., Ltd. 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.8
|
||||
|
||||
import 'package:flutter_tools/src/commands/attach.dart';
|
||||
|
||||
import '../elinux_plugins.dart';
|
||||
|
||||
class ELinuxAttachCommand extends AttachCommand with ELinuxExtension {
|
||||
ELinuxAttachCommand({bool verboseHelp = false})
|
||||
: super(verboseHelp: verboseHelp);
|
||||
ELinuxAttachCommand({
|
||||
super.verboseHelp,
|
||||
super.hotRunnerFactory,
|
||||
required super.artifacts,
|
||||
required super.stdio,
|
||||
required super.logger,
|
||||
required super.terminal,
|
||||
required super.signals,
|
||||
required super.platform,
|
||||
required super.processInfo,
|
||||
required super.fileSystem,
|
||||
});
|
||||
}
|
||||
|
||||
+13
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
@@ -22,7 +22,14 @@ import '../elinux_plugins.dart';
|
||||
|
||||
class ELinuxBuildCommand extends BuildCommand {
|
||||
ELinuxBuildCommand({bool verboseHelp = false})
|
||||
: super(verboseHelp: verboseHelp) {
|
||||
: super(
|
||||
fileSystem: globals.fs,
|
||||
buildSystem: globals.buildSystem,
|
||||
osUtils: globals.os,
|
||||
verboseHelp: verboseHelp,
|
||||
androidSdk: globals.androidSdk,
|
||||
logger: globals.logger,
|
||||
) {
|
||||
addSubcommand(BuildPackageCommand(verboseHelp: verboseHelp));
|
||||
}
|
||||
}
|
||||
@@ -31,7 +38,10 @@ class BuildPackageCommand extends BuildSubCommand
|
||||
with ELinuxExtension, ELinuxRequiredArtifacts {
|
||||
/// See: [BuildApkCommand] in `build_apk.dart`
|
||||
BuildPackageCommand({bool verboseHelp = false})
|
||||
: super(verboseHelp: verboseHelp) {
|
||||
: super(
|
||||
verboseHelp: verboseHelp,
|
||||
logger: globals.logger,
|
||||
) {
|
||||
addCommonDesktopBuildOptions(verboseHelp: verboseHelp);
|
||||
argParser.addOption(
|
||||
'target-arch',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
@@ -19,5 +19,6 @@ class ELinuxDriveCommand extends DriveCommand
|
||||
fileSystem: globals.fs,
|
||||
logger: globals.logger,
|
||||
platform: globals.platform,
|
||||
signals: globals.signals,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2014 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.
|
||||
@@ -16,6 +16,7 @@ import 'package:flutter_tools/src/cache.dart';
|
||||
import 'package:flutter_tools/src/commands/upgrade.dart';
|
||||
import 'package:flutter_tools/src/dart/pub.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/runner/flutter_command.dart';
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
@@ -315,9 +316,9 @@ class ELinuxUpgradeCommandRunner {
|
||||
globals.printStatus('');
|
||||
await pub.get(
|
||||
context: PubContext.pubUpgrade,
|
||||
directory: projectRoot,
|
||||
project:
|
||||
FlutterProject.fromDirectory(globals.fs.directory(projectRoot)),
|
||||
upgrade: true,
|
||||
generateSyntheticPackage: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
@@ -6,23 +6,16 @@
|
||||
import 'package:file/file.dart';
|
||||
import 'package:flutter_tools/src/artifacts.dart';
|
||||
import 'package:flutter_tools/src/base/os.dart';
|
||||
import 'package:flutter_tools/src/base/platform.dart';
|
||||
import 'package:flutter_tools/src/build_info.dart';
|
||||
import 'package:flutter_tools/src/cache.dart';
|
||||
|
||||
class ELinuxArtifacts extends CachedArtifacts {
|
||||
ELinuxArtifacts({
|
||||
required FileSystem fileSystem,
|
||||
required Platform platform,
|
||||
required Cache cache,
|
||||
required OperatingSystemUtils operatingSystemUtils,
|
||||
}) : _cache = cache,
|
||||
super(
|
||||
fileSystem: fileSystem,
|
||||
platform: platform,
|
||||
cache: cache,
|
||||
operatingSystemUtils: operatingSystemUtils,
|
||||
);
|
||||
required super.fileSystem,
|
||||
required super.platform,
|
||||
required super.cache,
|
||||
required super.operatingSystemUtils,
|
||||
}) : _cache = cache;
|
||||
|
||||
final Cache _cache;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import 'package:flutter_tools/src/build_system/targets/android.dart';
|
||||
import 'package:flutter_tools/src/build_system/targets/assets.dart';
|
||||
import 'package:flutter_tools/src/build_system/targets/common.dart';
|
||||
import 'package:flutter_tools/src/build_system/targets/icon_tree_shaker.dart';
|
||||
import 'package:flutter_tools/src/build_system/targets/shader_compiler.dart';
|
||||
import 'package:flutter_tools/src/cache.dart';
|
||||
import 'package:flutter_tools/src/cmake.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
@@ -95,6 +96,7 @@ abstract class ELinuxAssetBundle extends Target {
|
||||
outputDirectory,
|
||||
targetPlatform: tp,
|
||||
buildMode: buildMode,
|
||||
shaderTarget: ShaderTarget.sksl,
|
||||
);
|
||||
final DepfileService depfileService = DepfileService(
|
||||
fileSystem: environment.fileSystem,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
@@ -12,6 +12,7 @@ import 'package:flutter_tools/src/cache.dart';
|
||||
import 'package:flutter_tools/src/features.dart';
|
||||
import 'package:flutter_tools/src/flutter_cache.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
import 'package:flutter_tools/src/runner/flutter_command.dart';
|
||||
|
||||
mixin ELinuxRequiredArtifacts on FlutterCommand {
|
||||
@@ -46,11 +47,13 @@ class ELinuxFlutterCache extends FlutterCache {
|
||||
required FileSystem fileSystem,
|
||||
required Platform platform,
|
||||
required OperatingSystemUtils osUtils,
|
||||
required FlutterProjectFactory projectFactory,
|
||||
}) : super(
|
||||
logger: logger,
|
||||
fileSystem: fileSystem,
|
||||
platform: platform,
|
||||
osUtils: osUtils) {
|
||||
osUtils: osUtils,
|
||||
projectFactory: projectFactory) {
|
||||
registerArtifact(ELinuxEngineArtifacts(this, platform: platform));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2014 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.
|
||||
@@ -6,11 +6,9 @@
|
||||
// @dart = 2.8
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_tools/src/android/android_device.dart';
|
||||
import 'package:flutter_tools/src/base/common.dart';
|
||||
import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/base/os.dart';
|
||||
import 'package:flutter_tools/src/base/process.dart';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -54,7 +54,6 @@ class ELinuxDeviceManager extends FlutterDeviceManager {
|
||||
macOSWorkflow: context.get<MacOSWorkflow>(),
|
||||
fuchsiaSdk: globals.fuchsiaSdk,
|
||||
operatingSystemUtils: globals.os,
|
||||
terminal: globals.terminal,
|
||||
customDevicesConfig: CustomDevicesConfig(
|
||||
fileSystem: globals.fs,
|
||||
logger: globals.logger,
|
||||
|
||||
+19
-5
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Group Corporation. All rights reserved.
|
||||
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -45,11 +45,11 @@ import 'commands/precache.dart';
|
||||
import 'commands/run.dart';
|
||||
import 'commands/test.dart';
|
||||
import 'commands/upgrade.dart';
|
||||
import 'elinux_artifacts.dart';
|
||||
import 'elinux_cache.dart';
|
||||
import 'elinux_device_discovery.dart';
|
||||
import 'elinux_doctor.dart';
|
||||
import 'elinux_package.dart';
|
||||
import 'elinux_artifacts.dart';
|
||||
|
||||
/// Main entry point for commands.
|
||||
///
|
||||
@@ -92,15 +92,27 @@ Future<void> main(List<String> args) async {
|
||||
GenerateLocalizationsCommand(
|
||||
fileSystem: globals.fs,
|
||||
logger: globals.logger,
|
||||
artifacts: globals.artifacts,
|
||||
processManager: globals.processManager,
|
||||
),
|
||||
InstallCommand(),
|
||||
InstallCommand(verboseHelp: verboseHelp),
|
||||
LogsCommand(),
|
||||
ScreenshotCommand(),
|
||||
ScreenshotCommand(fs: globals.fs),
|
||||
SymbolizeCommand(stdio: globals.stdio, fileSystem: globals.fs),
|
||||
ELinuxUpgradeCommand(verboseHelp: verboseHelp),
|
||||
// Commands extended for ELinux.
|
||||
ELinuxAnalyzeCommand(verboseHelp: verboseHelp),
|
||||
ELinuxAttachCommand(verboseHelp: verboseHelp),
|
||||
ELinuxAttachCommand(
|
||||
verboseHelp: verboseHelp,
|
||||
artifacts: globals.artifacts,
|
||||
stdio: globals.stdio,
|
||||
logger: globals.logger,
|
||||
terminal: globals.terminal,
|
||||
signals: globals.signals,
|
||||
platform: globals.platform,
|
||||
processInfo: globals.processInfo,
|
||||
fileSystem: globals.fs,
|
||||
),
|
||||
ELinuxBuildCommand(verboseHelp: verboseHelp),
|
||||
ELinuxCleanCommand(verbose: verbose),
|
||||
ELinuxCreateCommand(verboseHelp: verboseHelp),
|
||||
@@ -126,6 +138,7 @@ Future<void> main(List<String> args) async {
|
||||
logger: globals.logger,
|
||||
platform: globals.platform,
|
||||
osUtils: globals.os,
|
||||
projectFactory: globals.projectFactory,
|
||||
),
|
||||
TemplateRenderer: () => const MustacheTemplateRenderer(),
|
||||
ApplicationPackageFactory: () => ELinuxApplicationPackageFactory(),
|
||||
@@ -151,6 +164,7 @@ Future<void> main(List<String> args) async {
|
||||
outputPreferences: globals.outputPreferences,
|
||||
)),
|
||||
},
|
||||
shutdownHooks: globals.shutdownHooks,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 Sony Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Corporation. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -22,17 +22,21 @@ class FlutterEmbedderOptions {
|
||||
"Window rotation(degree) [0(default)|90|180|270]", 0,
|
||||
false);
|
||||
options_.AddDouble("force-scale-factor", "s",
|
||||
"Force a scale factor instead using default value", 1.0,
|
||||
false);
|
||||
"Force a scale factor instead using default value", 1.0,
|
||||
false);
|
||||
#if defined(FLUTTER_TARGET_BACKEND_GBM) || \
|
||||
defined(FLUTTER_TARGET_BACKEND_EGLSTREAM)
|
||||
// no more options.
|
||||
#elif defined(FLUTTER_TARGET_BACKEND_X11)
|
||||
options_.AddString("title", "t", "Window title", "Flutter", false);
|
||||
options_.AddWithoutValue("fullscreen", "f", "Always full-screen display",
|
||||
false);
|
||||
options_.AddInt("width", "w", "Window width", 1280, false);
|
||||
options_.AddInt("height", "h", "Window height", 720, false);
|
||||
#else // FLUTTER_TARGET_BACKEND_WAYLAND
|
||||
options_.AddString("title", "t", "Window title", "Flutter", false);
|
||||
options_.AddString("app-id", "a", "XDG App ID", "dev.flutter.elinux",
|
||||
false);
|
||||
options_.AddWithoutValue("onscreen-keyboard", "k",
|
||||
"Enable on-screen keyboard", false);
|
||||
options_.AddWithoutValue("window-decoration", "d",
|
||||
@@ -91,6 +95,7 @@ class FlutterEmbedderOptions {
|
||||
#elif defined(FLUTTER_TARGET_BACKEND_X11)
|
||||
use_onscreen_keyboard_ = false;
|
||||
use_window_decoration_ = false;
|
||||
window_title_ = options_.GetValue<std::string>("title");
|
||||
window_view_mode_ =
|
||||
options_.Exist("fullscreen")
|
||||
? flutter::FlutterViewController::ViewMode::kFullscreen
|
||||
@@ -98,6 +103,8 @@ class FlutterEmbedderOptions {
|
||||
window_width_ = options_.GetValue<int>("width");
|
||||
window_height_ = options_.GetValue<int>("height");
|
||||
#else // FLUTTER_TARGET_BACKEND_WAYLAND
|
||||
window_title_ = options_.GetValue<std::string>("title");
|
||||
window_app_id_ = options_.GetValue<std::string>("app-id");
|
||||
use_onscreen_keyboard_ = options_.Exist("onscreen-keyboard");
|
||||
use_window_decoration_ = options_.Exist("window-decoration");
|
||||
window_view_mode_ =
|
||||
@@ -112,6 +119,8 @@ class FlutterEmbedderOptions {
|
||||
}
|
||||
|
||||
std::string BundlePath() const { return bundle_path_; }
|
||||
std::string WindowTitle() const { return window_title_; }
|
||||
std::string WindowAppID() const { return window_app_id_; }
|
||||
bool IsUseMouseCursor() const { return use_mouse_cursor_; }
|
||||
bool IsUseOnscreenKeyboard() const { return use_onscreen_keyboard_; }
|
||||
bool IsUseWindowDecoraation() const { return use_window_decoration_; }
|
||||
@@ -130,6 +139,8 @@ class FlutterEmbedderOptions {
|
||||
commandline::CommandOptions options_;
|
||||
|
||||
std::string bundle_path_;
|
||||
std::string window_title_;
|
||||
std::string window_app_id_;
|
||||
bool use_mouse_cursor_ = true;
|
||||
bool use_onscreen_keyboard_ = false;
|
||||
bool use_window_decoration_ = false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 Sony Corporation. All rights reserved.
|
||||
// Copyright 2023 Sony Corporation. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -30,6 +30,8 @@ int main(int argc, char** argv) {
|
||||
view_properties.height = options.WindowHeight();
|
||||
view_properties.view_mode = options.WindowViewMode();
|
||||
view_properties.view_rotation = options.WindowRotation();
|
||||
view_properties.title = options.WindowTitle();
|
||||
view_properties.app_id = options.WindowAppID();
|
||||
view_properties.use_mouse_cursor = options.IsUseMouseCursor();
|
||||
view_properties.use_onscreen_keyboard = options.IsUseOnscreenKeyboard();
|
||||
view_properties.use_window_decoration = options.IsUseWindowDecoraation();
|
||||
|
||||
Reference in New Issue
Block a user