diff --git a/base/PCMain.cpp b/base/PCMain.cpp index de8be6db13..338316a57b 100644 --- a/base/PCMain.cpp +++ b/base/PCMain.cpp @@ -11,6 +11,7 @@ #else #include #include +#include #endif #include @@ -228,6 +229,9 @@ void LaunchBrowser(const char *url) { #ifdef _WIN32 ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); +#elif __linux__ + std::string command = std::string("xdg-open ") + url; + system(command.c_str()); #else ILOG("Would have gone to %s but LaunchBrowser is not implemented on this platform", url); #endif @@ -237,6 +241,9 @@ void LaunchMarket(const char *url) { #ifdef _WIN32 ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL); +#elif __linux__ + std::string command = std::string("xdg-open ") + url; + system(command.c_str()); #else ILOG("Would have gone to %s but LaunchMarket is not implemented on this platform", url); #endif @@ -246,6 +253,9 @@ void LaunchEmail(const char *email_address) { #ifdef _WIN32 ShellExecute(NULL, "open", (std::string("mailto:") + email_address).c_str(), NULL, NULL, SW_SHOWNORMAL); +#elif __linux__ + std::string command = std::string("xdg-open mailto:") + email_address; + system(command.c_str()); #else ILOG("Would have opened your email client for %s but LaunchEmail is not implemented on this platform", email_address); #endif