567 {
568 dart::bin::SetExecutableName(
argv[0]);
569 dart::bin::SetExecutableArguments(argc - 1,
argv);
570
572
575 return EXIT_SUCCESS;
576 }
577
579 if (!command_line.positional_args().empty()) {
580
581
582 settings.application_kernel_asset = command_line.positional_args()[0];
583 }
584
585 if (settings.application_kernel_asset.empty()) {
586 FML_LOG(ERROR) <<
"Dart kernel file not specified.";
587 return EXIT_FAILURE;
588 }
589
590 settings.leak_vm = false;
591 settings.enable_platform_isolates = true;
592
593 if (settings.icu_data_path.empty()) {
594 settings.icu_data_path = "icudtl.dat";
595 }
596
597
598 settings.log_tag = "";
599
600 settings.log_message_callback = [](const std::string& tag,
602 if (!tag.empty()) {
603 std::cout << tag << ": ";
604 }
605 std::cout <<
message << std::endl;
606 };
607
612 return queue_id;
613 };
614
618 };
619
620 settings.unhandled_exception_callback = [](
const std::string&
error,
621 const std::string& stack_trace) {
622 FML_LOG(ERROR) <<
"Unhandled exception" << std::endl
623 <<
"Exception: " <<
error << std::endl
624 << "Stack trace: " << stack_trace;
625 ::exit(1);
626 return true;
627 };
628
629#if defined(FML_OS_WIN)
630 CoInitializeEx(nullptr, COINIT_MULTITHREADED);
631#endif
632
635 flutter::Switch::RunForever)),
637 flutter::Switch::ForceMultithreading)));
638}
static TaskQueueId GetCurrentTaskQueueId()
static MessageLoopTaskQueues * GetInstance()
void AddTaskObserver(TaskQueueId queue_id, intptr_t key, const fml::closure &callback)
void RemoveTaskObserver(TaskQueueId queue_id, intptr_t key)
const uint8_t uint32_t uint32_t GError ** error
FlutterDesktopBinaryReply callback
#define FML_LOG(severity)
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, bool require_merged_platform_ui_thread)
const std::string_view FlagForSwitch(Switch swtch)
std::function< void()> closure
CommandLine CommandLineFromPlatformOrArgcArgv(int argc, const char *const *argv)