Add Linux stubs.

This commit is contained in:
Dario 2024-12-16 14:05:46 -03:00
parent 0481d3f539
commit 32d9d52d5e
5 changed files with 52 additions and 0 deletions

View file

@ -91,6 +91,13 @@ if (WIN32)
"os/win32/process_win32.cpp" "os/win32/process_win32.cpp"
"os/win32/version_win32.cpp" "os/win32/version_win32.cpp"
) )
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
list(APPEND SWA_OS_CXX_SOURCES
"os/linux/logger_linux.cpp"
"os/linux/media_linux.cpp"
"os/linux/process_linux.cpp"
"os/linux/version_linux.cpp"
)
endif() endif()
set(SWA_CPU_CXX_SOURCES set(SWA_CPU_CXX_SOURCES

View file

@ -0,0 +1,11 @@
#include <os/logger_detail.h>
void os::logger::detail::Init()
{
assert(false && "Unimplemented.");
}
void os::logger::detail::Log(const std::string_view str, detail::ELogType type, const char* func)
{
assert(false && "Unimplemented.");
}

View file

@ -0,0 +1,7 @@
#include <os/media_detail.h>
bool os::media::detail::IsExternalMediaPlaying()
{
// This functionality is not supported in Linux.
return false;
}

View file

@ -0,0 +1,20 @@
#include <os/process_detail.h>
std::filesystem::path os::process::detail::GetExecutablePath()
{
assert(false && "Unimplemented.");
return std::filesystem::path();
}
std::filesystem::path os::process::detail::GetWorkingDirectory()
{
// TODO: There's a cross platform way to retrieve this which is just getting it from argv[0].
assert(false && "Unimplemented.");
return std::filesystem::path();
}
bool os::process::detail::StartProcess(const std::filesystem::path path, const std::vector<std::string> args, std::filesystem::path work)
{
assert(false && "Unimplemented.");
return false;
}

View file

@ -0,0 +1,7 @@
#include <os/version_detail.h>
os::version::detail::OSVersion os::version::detail::GetOSVersion()
{
assert(false && "Unimplemented.");
return os::version::detail::OSVersion();
}