You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
437B

  1. #include "util/util.hpp"
  2. #if ARCH_WIN
  3. #include <windows.h>
  4. #include <shellapi.h>
  5. #endif
  6. namespace rack {
  7. void openBrowser(std::string url) {
  8. #if ARCH_LIN
  9. std::string command = "xdg-open " + url;
  10. (void)system(command.c_str());
  11. #endif
  12. #if ARCH_MAC
  13. std::string command = "open " + url;
  14. system(command.c_str());
  15. #endif
  16. #if ARCH_WIN
  17. ShellExecute(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
  18. #endif
  19. }
  20. } // namespace rack