620 {
623
625
628 return EXIT_SUCCESS;
629 }
630
632 if (!command_line.positional_args().empty()) {
633
634
635 settings.application_kernel_asset = command_line.positional_args()[0];
636 }
637
638 if (
settings.application_kernel_asset.empty()) {
640 return EXIT_FAILURE;
641 }
642
644 settings.enable_platform_isolates =
true;
645
646 if (
settings.icu_data_path.empty()) {
647 settings.icu_data_path =
"icudtl.dat";
648 }
649
650
652
653 settings.log_message_callback = [](
const std::string& tag,
655 if (!tag.empty()) {
656 std::cout << tag << ": ";
657 }
658 std::cout <<
message << std::endl;
659 };
660
663 };
664
667 };
668
669 settings.unhandled_exception_callback = [](
const std::string&
error,
670 const std::string& stack_trace) {
672 <<
"Exception: " <<
error << std::endl
673 << "Stack trace: " << stack_trace;
675 return true;
676 };
677
678#if defined(FML_OS_WIN)
679 CoInitializeEx(nullptr, COINIT_MULTITHREADED);
680#endif
681
684 flutter::Switch::RunForever)),
686 flutter::Switch::ForceMultithreading)));
687}
void RemoveTaskObserver(intptr_t key)
void AddTaskObserver(intptr_t key, const fml::closure &callback)
static FML_EMBEDDER_ONLY MessageLoop & GetCurrent()
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
const uint8_t uint32_t uint32_t GError ** error
#define FML_LOG(severity)
void SetExecutableName(const char *executable_name)
void SetExecutableArguments(int script_index, char **argv)
int RunTester(const flutter::Settings &settings, bool run_forever, bool multithreaded)
void PrintUsage(const std::string &executable_name)
Settings SettingsFromCommandLine(const fml::CommandLine &command_line)
const std::string_view FlagForSwitch(Switch swtch)
std::function< void()> closure
CommandLine CommandLineFromPlatformOrArgcArgv(int argc, const char *const *argv)