Fixed building error

This commit is contained in:
Antoine Pilote
2023-10-15 16:31:09 -04:00
parent 9d87236662
commit 8d04a81846
4 changed files with 15 additions and 3 deletions

View File

@@ -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>& file, const std::string& newName)
{
std::string extension = !String::EndsWith(newName, file->GetExtension().c_str()) ? file->GetExtension() : "";