From 516f36a9d2698a4f6efcb5827fa2b47d96f9dc80 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 15 Jun 2020 00:23:33 -0400 Subject: [PATCH] Added changes for building on Catalina --- README.md | 20 +++++++++++++++++++- src/gui/update_checker.cpp | 6 +++++- src/util/io/get_member.cpp | 2 ++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed85097f..5233665d 100644 --- a/README.md +++ b/README.md @@ -73,4 +73,22 @@ Use `CMAKE_BUILD_TYPE=Debug` for a debug build ## Building on Mac -It should be possible to use wxWidgets on mac as well, but this is untested so far. +Install the dependencies, for example using Homebrew +```` +brew install boost wxwidgets hunspell +```` +Note: Tested with boost 1.72.0_3, wxmac (wxwidgets) 3.0.5.1_1, hunspell 1.7.0_2 +Then use cmake to build +```` +mkdir build && cd build +cmake -DCMAKE_BUILD_TYPE=Release .. +cmake --build .. +```` +Use `CMAKE_BUILD_TYPE=Debug` for a debug build + +Finally, copy the resources to a SharedSupport directory and run the executable +```` +mkdir SharedSupport && cd SharedSupport +cp -r ../resource SharedSupport/ +./magicseteditor +```` diff --git a/src/gui/update_checker.cpp b/src/gui/update_checker.cpp index 5c7f2c98..a921d12c 100644 --- a/src/gui/update_checker.cpp +++ b/src/gui/update_checker.cpp @@ -131,11 +131,15 @@ void check_updates() { check_updates_now(); } else if (settings.check_updates == CHECK_IF_CONNECTED) { // only if internet connection exists - wxDialUpManager* dum = wxDialUpManager::Create(); +#if wxUSE_DIALUP_MANAGER + wxDialUpManager* dum = wxDialUpManager::Create(); if (dum->IsOk() && dum->IsOnline()) { check_updates_now(); } delete dum; +#else + check_updates_now(); +#endif } } diff --git a/src/util/io/get_member.cpp b/src/util/io/get_member.cpp index eba0c8ad..fb0a7428 100644 --- a/src/util/io/get_member.cpp +++ b/src/util/io/get_member.cpp @@ -22,6 +22,8 @@ template <> void GetDefaultMember::handle(const int& v) { value = to_sc template <> void GetDefaultMember::handle(const unsigned int& v) { value = to_script((int)v); } template <> void GetDefaultMember::handle(const uint64_t& v) { value = to_script((int)v); } template <> void GetDefaultMember::handle(const double& v) { value = to_script(v); } +template <> void GetDefaultMember::handle(const long& v) { value = to_script((long)v); } +template <> void GetDefaultMember::handle(const unsigned long& v) { value = to_script((long)v); } template <> void GetDefaultMember::handle(const bool& v) { value = to_script(v); } template <> void GetDefaultMember::handle(const tribool& v) { value = to_script((bool)v); } template <> void GetDefaultMember::handle(const Vector2D& v) { value = to_script(String::Format(_("(%.10lf,%.10lf)"), v.x, v.y)); }