From a8ddbda1d76870f4c405213175471364fd388f9d Mon Sep 17 00:00:00 2001 From: Nexius Date: Sat, 27 Jun 2026 20:09:51 +0300 Subject: [PATCH 1/2] Update readme about conan for macOS --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e168b5250..129063604 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,11 @@ cmake --build . --config RelWithDebInfo ## Building on Mac -If you install conan via brew you must ensure you get the correct version; however, the cmake-conan script will not detect it from the default install location. You must therefore also alias it elsewhere: +If you install conan via brew the cmake-conan script will not detect it from the default install location. You must therefore also alias it elsewhere: ```bash -brew install conan@1 -sudo ln -s /usr/local/opt/conan@1/bin/conan /usr/local/bin/conan +brew install conan +sudo ln -s /usr/local/opt/conan/bin/conan /usr/local/bin/conan cd open.mp mkdir build cd build From 2fcd4106e1d671fe075277a3c973f31f3310db83 Mon Sep 17 00:00:00 2001 From: Nexius Date: Sun, 28 Jun 2026 00:45:54 +0300 Subject: [PATCH 2/2] Fix latent crash when no components loaded fix `ghc::filesystem:filesystem_error` on macOS with unreachable '/proc/self/exe' path --- Server/Source/util.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Server/Source/util.hpp b/Server/Source/util.hpp index 0491a3e2d..4f18255fd 100644 --- a/Server/Source/util.hpp +++ b/Server/Source/util.hpp @@ -31,6 +31,9 @@ static LARGE_INTEGER yo; #include #include #include +#ifdef __APPLE__ +#include +#endif #define SET_TICKER_RESOLUTION(ms) #define LIBRARY_OPEN(path) dlopen(path, RTLD_LAZY | RTLD_LOCAL) #define LIBRARY_OPEN_GLOBAL(path) dlopen(path, RTLD_LAZY | RTLD_GLOBAL) @@ -153,6 +156,19 @@ ghc::filesystem::path GetExecutablePath() { return ghc::filesystem::path(); } +#elif defined(__APPLE__) + char path[4096] = { 0 }; + uint32_t size = sizeof(path); + if (_NSGetExecutablePath(path, &size) == 0) + { + std::error_code ec; + auto canonicalPath = ghc::filesystem::canonical(path, ec); + return ec ? ghc::filesystem::path(path) : canonicalPath; + } + else + { + return ghc::filesystem::path(); + } #else return ghc::filesystem::canonical("/proc/self/exe"); #endif