diff --git a/Nuake/src/Core/OS.cpp b/Nuake/src/Core/OS.cpp index eb9bc215..a4d1636c 100644 --- a/Nuake/src/Core/OS.cpp +++ b/Nuake/src/Core/OS.cpp @@ -67,4 +67,9 @@ int OS::RenameDirectory(const Ref& dir, const std::string& newName) void OS::ShowInFileExplorer(const std::string& filePath) { ShellExecuteA(nullptr, "open", "explorer.exe", ("/select," + std::string(filePath)).c_str(), nullptr, SW_SHOWDEFAULT); +} + +void OS::OpenURL(const std::string& url) +{ + ShellExecute(nullptr, nullptr, std::wstring(url.begin(), url.end()).c_str(), 0, 0, SW_SHOW); } \ No newline at end of file diff --git a/Nuake/src/Core/OS.h b/Nuake/src/Core/OS.h index c1b5b8e3..fb96e018 100644 --- a/Nuake/src/Core/OS.h +++ b/Nuake/src/Core/OS.h @@ -15,5 +15,6 @@ namespace Nuake static int OS::RenameFile(const Ref& file, const std::string& newName); static int OS::RenameDirectory(const Ref& dir, const std::string& newName); static void ShowInFileExplorer(const std::string& filePath); + static void OpenURL(const std::string& url); }; }