diff --git a/Nuake/src/Application/Application.h b/Nuake/src/Application/Application.h index 5469e837..d166d458 100644 --- a/Nuake/src/Application/Application.h +++ b/Nuake/src/Application/Application.h @@ -60,9 +60,9 @@ namespace Nuake { auto resultFindIt = std::find_if( m_ApplicationModules.begin(), m_ApplicationModules.end(), - [](IApplicationModule& module) + [](IApplicationModule& appModule) { - return dynamic_cast(&module) != nullptr; + return dynamic_cast(&appModule) != nullptr; } ); diff --git a/Nuake/src/Core/OS.cpp b/Nuake/src/Core/OS.cpp index 2d33955a..e8c5ab83 100644 --- a/Nuake/src/Core/OS.cpp +++ b/Nuake/src/Core/OS.cpp @@ -53,6 +53,17 @@ namespace Nuake { #endif } + void OS::ExecuteCommand(const std::string& command) + { +#ifdef NK_WIN + ShellExecuteA(nullptr, command.c_str(), nullptr, nullptr, nullptr, SW_SHOWDEFAULT); +#endif + +#ifdef NK_LINUX + system(command.c_str()); +#endif + } + int OS::RenameFile(const Ref& file, const std::string& newName) { std::string extension = !String::EndsWith(newName, file->GetExtension().c_str()) ? file->GetExtension() : ""; diff --git a/Nuake/src/Core/OS.h b/Nuake/src/Core/OS.h index 1d73fe98..340ac2e4 100644 --- a/Nuake/src/Core/OS.h +++ b/Nuake/src/Core/OS.h @@ -12,6 +12,7 @@ namespace Nuake static std::string GetFromClipboard(); static int GetTime(); static void OpenIn(const std::string& filePath); + static void ExecuteCommand(const std::string& command); static int RenameFile(const Ref& file, const std::string& newName); static int RenameDirectory(const Ref& dir, const std::string& newName); static void ShowInFileExplorer(const std::string& filePath); diff --git a/Nuake/src/Physics/Rigidbody.cpp b/Nuake/src/Physics/Rigidbody.cpp index 464aa7b6..70a32e12 100644 --- a/Nuake/src/Physics/Rigidbody.cpp +++ b/Nuake/src/Physics/Rigidbody.cpp @@ -1,7 +1,7 @@ #include "PhysicsShapes.h" #include "Rigibody.h" #include "src/Core/Core.h" -#include "src/Core/Physics/PhysicsManager.h" +#include "src/Physics/PhysicsManager.h" #include #include