18 : assets_path_(properties.assets_path),
19 icu_path_(properties.icu_data_path) {
29 dart_entrypoint_arguments_.push_back(
43 if (assets_path_.is_relative() || icu_path_.is_relative() ||
44 (!aot_library_path_.empty() && aot_library_path_.is_relative())) {
46 if (executable_location.empty()) {
48 <<
"Unable to find executable location to resolve resource paths.";
49 assets_path_ = std::filesystem::path();
50 icu_path_ = std::filesystem::path();
52 assets_path_ = std::filesystem::path(executable_location) / assets_path_;
53 icu_path_ = std::filesystem::path(executable_location) / icu_path_;
54 if (!aot_library_path_.empty()) {
56 std::filesystem::path(executable_location) / aot_library_path_;
63 return !assets_path_.empty() && !icu_path_.empty();
70 if (aot_library_path_.empty()) {
72 <<
"Attempted to load AOT data, but no aot_library_path was provided.";
75 if (!std::filesystem::exists(aot_library_path_)) {
76 FML_LOG(ERROR) <<
"Can't load AOT data from " << aot_library_path_
83 source.
elf_path = path_string.c_str();
87 FML_LOG(ERROR) <<
"Failed to load AOT data from: " << path_string;
96 const std::vector<std::string>& switches) {
97 engine_switches_ = switches;
101 if (engine_switches_.size() == 0) {
104 std::vector<std::string> switches;
105 switches.insert(switches.end(), engine_switches_.begin(),
106 engine_switches_.end());
109 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 data
std::vector< std::string > GetSwitchesFromEnvironment()
std::filesystem::path GetExecutableDirectory()
std::unique_ptr< _FlutterEngineAOTData, FlutterEngineCollectAOTDataFnPtr > UniqueAotDataPtr
std::string PathToUtf8(const std::filesystem::path &path)
const char * dart_entrypoint
const char * aot_library_path
FlutterDesktopAccessibilityMode accessibility_mode
const char ** dart_entrypoint_argv
FlutterDesktopUIThreadPolicy ui_thread_policy
FlutterDesktopGpuPreference gpu_preference
FlutterEngineAOTDataSourceType type
const char * elf_path
Absolute path to an ELF library file.
Function-pointer-based versions of the APIs above.
FlutterEngineCreateAOTDataFnPtr CreateAOTData
FlutterEngineCollectAOTDataFnPtr CollectAOTData