5#include "flutter/shell/platform/windows/flutter_project_bundle.h"
9#include "flutter/fml/logging.h"
10#include "flutter/shell/platform/common/engine_switches.h"
11#include "flutter/shell/platform/common/path_utils.h"
17 : assets_path_(properties.assets_path),
18 icu_path_(properties.icu_data_path) {
28 dart_entrypoint_arguments_.push_back(
33 if (assets_path_.is_relative() || icu_path_.is_relative() ||
34 (!aot_library_path_.empty() && aot_library_path_.is_relative())) {
36 if (executable_location.empty()) {
38 <<
"Unable to find executable location to resolve resource paths.";
44 if (!aot_library_path_.empty()) {
53 return !assets_path_.empty() && !icu_path_.empty();
60 if (aot_library_path_.empty()) {
62 <<
"Attempted to load AOT data, but no aot_library_path was provided.";
65 if (!std::filesystem::exists(aot_library_path_)) {
67 << aot_library_path_.u8string() <<
"; no such file.";
70 std::string path_string = aot_library_path_.u8string();
73 source.elf_path = path_string.c_str();
77 FML_LOG(
ERROR) <<
"Failed to load AOT data from: " << path_string;
86 const std::vector<std::string>& switches) {
87 engine_switches_ = switches;
91 if (engine_switches_.size() == 0) {
94 std::vector<std::string> switches;
95 switches.insert(switches.end(), engine_switches_.begin(),
96 engine_switches_.end());
99 switches.insert(switches.end(), env_switches.begin(), env_switches.end());
const std::vector< std::string > GetSwitches()
FlutterProjectBundle(const FlutterDesktopEngineProperties &properties)
UniqueAotDataPtr LoadAotData(const FlutterEngineProcTable &engine_procs)
void SetSwitches(const std::vector< std::string > &switches)
@ kFlutterEngineAOTDataSourceTypeElfPath
#define FML_LOG(severity)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
std::vector< std::string > GetSwitchesFromEnvironment()
std::filesystem::path GetExecutableDirectory()
std::unique_ptr< _FlutterEngineAOTData, FlutterEngineCollectAOTDataFnPtr > UniqueAotDataPtr
const char * dart_entrypoint
const char * aot_library_path
const char ** dart_entrypoint_argv
Function-pointer-based versions of the APIs above.
FlutterEngineCreateAOTDataFnPtr CreateAOTData
FlutterEngineCollectAOTDataFnPtr CollectAOTData