| 866 | |
| 867 | |
| 868 | void openBrowser(const std::string& url) { |
| 869 | if (url.empty()) |
| 870 | return; |
| 871 | |
| 872 | INFO("Opening browser URL %s", url.c_str()); |
| 873 | |
| 874 | std::string urlL = url; |
| 875 | std::thread t([=] { |
| 876 | #if defined ARCH_LIN |
| 877 | std::string command = "xdg-open \"" + urlL + "\""; |
| 878 | (void) std::system(command.c_str()); |
| 879 | #endif |
| 880 | #if defined ARCH_MAC |
| 881 | std::string command = "open \"" + urlL + "\""; |
| 882 | std::system(command.c_str()); |
| 883 | #endif |
| 884 | #if defined ARCH_WIN |
| 885 | ShellExecuteW(NULL, L"open", string::UTF8toUTF16(urlL).c_str(), NULL, NULL, SW_SHOWDEFAULT); |
| 886 | #endif |
| 887 | }); |
| 888 | t.detach(); |
| 889 | } |
| 890 | |
| 891 | |
| 892 | void openDirectory(const std::string& path) { |
no test coverage detected