631 {
632 dart::bin::SetExecutableName(
argv[0]);
633 dart::bin::SetExecutableArguments(argc - 1,
argv);
634
636
639 return EXIT_SUCCESS;
640 }
641
643 if (!command_line.positional_args().empty()) {
644
645
646 settings.application_kernel_asset = command_line.positional_args()[0];
647 }
648
649 if (settings.application_kernel_asset.empty()) {
650 FML_LOG(ERROR) <<
"Dart kernel file not specified.";
651 return EXIT_FAILURE;
652 }
653
654 settings.leak_vm = false;
655 settings.enable_platform_isolates = true;
656
657 if (settings.icu_data_path.empty()) {
658 settings.icu_data_path = "icudtl.dat";
659 }
660
661
662 settings.log_tag = "";
663
664 settings.log_message_callback = [](const std::string& tag,
666 if (!tag.empty()) {
667 std::cout << tag << ": ";
668 }
669 std::cout <<
message << std::endl;
670 };
671
676 return queue_id;
677 };
678
682 };
683
684 settings.unhandled_exception_callback = [](
const std::string&
error,
685 const std::string& stack_trace) {
686 FML_LOG(ERROR) <<
"Unhandled exception" << std::endl
687 <<
"Exception: " <<
error << std::endl
688 << "Stack trace: " << stack_trace;
689 ::exit(1);
690 return true;
691 };
692
693#if defined(FML_OS_WIN)
694 CoInitializeEx(nullptr, COINIT_MULTITHREADED);
695#endif
696
699 flutter::Switch::RunForever)),
701 flutter::Switch::ForceMultithreading)));
702}
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)
G_BEGIN_DECLS GBytes * message
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)