557 {
558 dart::bin::SetExecutableName(
argv[0]);
559 dart::bin::SetExecutableArguments(argc - 1,
argv);
560
562
565 return EXIT_SUCCESS;
566 }
567
569 if (!command_line.positional_args().empty()) {
570
571
572 settings.application_kernel_asset = command_line.positional_args()[0];
573 }
574
575 if (settings.application_kernel_asset.empty()) {
576 FML_LOG(ERROR) <<
"Dart kernel file not specified.";
577 return EXIT_FAILURE;
578 }
579
580 settings.leak_vm = false;
581 settings.enable_platform_isolates = true;
582
583 if (settings.icu_data_path.empty()) {
584 settings.icu_data_path = "icudtl.dat";
585 }
586
587
588 settings.log_tag = "";
589
590 settings.log_message_callback = [](const std::string& tag,
592 if (!tag.empty()) {
593 std::cout << tag << ": ";
594 }
595 std::cout <<
message << std::endl;
596 };
597
602 return queue_id;
603 };
604
608 };
609
610 settings.unhandled_exception_callback = [](
const std::string&
error,
611 const std::string& stack_trace) {
612 FML_LOG(ERROR) <<
"Unhandled exception" << std::endl
613 <<
"Exception: " <<
error << std::endl
614 << "Stack trace: " << stack_trace;
615 ::exit(1);
616 return true;
617 };
618
619#if defined(FML_OS_WIN)
620 CoInitializeEx(nullptr, COINIT_MULTITHREADED);
621#endif
622
625 flutter::Switch::RunForever)),
627 flutter::Switch::ForceMultithreading)));
628}
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)