From 38d46b2dda0243cfa60bc6945859ebd587e0a851 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Mon, 27 Jun 2022 17:45:44 -0400 Subject: Update MacOS to compile w/ Boost MacOS seems to rely on an older/different C++ stdlib than Windows or Linux. So replacing those with Boost equivalents. Mostly contained to the Resources thankfully! --- src/resources/macos/MacResources.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/resources/macos/MacResources.cpp') diff --git a/src/resources/macos/MacResources.cpp b/src/resources/macos/MacResources.cpp index 2b41daa..9ae3499 100644 --- a/src/resources/macos/MacResources.cpp +++ b/src/resources/macos/MacResources.cpp @@ -26,28 +26,26 @@ //======================================================================== #include "MacResources.h" -namespace fs = std::experimental::filesystem; MacResources::MacResources() : Resources() { - this->workingDir = std::filesystem::current_path(); - this->exeDir = std::filesystem::canonical("/proc/self/exe").remove_filename(); + this->workingDir = filesystem::current_path(); + this->exeDir = filesystem::canonical("/proc/self/exe").remove_filename(); // set an initial value - will get hardset in load if found - std::filesystem::path f = - workingDir / "res" / DEFAULT_FONT; // default as fallback - this->font = std::make_shared(f); - this->defaultsLua = std::make_shared(); + filesystem::path f = workingDir / "res" / DEFAULT_FONT; // default as fallback + this->font = std::make_shared(f); + this->defaultsLua = std::make_shared(); } -std::vector MacResources::levelSearchDirs() { +std::vector MacResources::levelSearchDirs() { return {workingDir / "maps", exeDir / "maps"}; } -std::vector MacResources::defaultsSearchDirs() { +std::vector MacResources::defaultsSearchDirs() { return {workingDir / "dnglib", exeDir / "dnglib"}; } -std::vector MacResources::fontSearchDirs() { +std::vector MacResources::fontSearchDirs() { return {workingDir / "res", exeDir / "res"}; } -const char *MacResources::convert_to_str(std::filesystem::path &path) { +const char *MacResources::convert_to_str(filesystem::path &path) { return path.c_str(); } -- cgit v1.2.3-54-g00ecf