mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Merge branch 'pr74'
This commit is contained in:
+13
-4
@@ -8,11 +8,20 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
find_package(wxWidgets 3 REQUIRED COMPONENTS core base net html)
|
||||
find_package(Boost REQUIRED COMPONENTS regex)
|
||||
|
||||
# find hunspell
|
||||
#find_package(HUNSPELL)
|
||||
find_path(HUNSPELL_INCLUDE_DIRS hunspell/hunspell.hxx)
|
||||
find_library(HUNSPELL_LIBRARIES NAMES hunspell libhunspell)
|
||||
find_package(PkgConfig)
|
||||
|
||||
# find hunspell
|
||||
pkg_check_modules(HUNSPELL hunspell)
|
||||
if( NOT HUNSPELL_FOUND )
|
||||
message("-- Cannot find Hunspell via pkg-config, checking directly...")
|
||||
find_path(HUNSPELL_INCLUDE_DIRS hunspell/hunspell.hxx)
|
||||
find_library(HUNSPELL_LIBRARIES NAMES hunspell libhunspell)
|
||||
if ( ${HUNSPELL_INCLUDE_DIRS} STREQUAL "HUNSPELL_INCLUDE_DIRS-NOTFOUND" )
|
||||
message(FATAL_ERROR "Hunspell cannot be found")
|
||||
else()
|
||||
message("-- Found Hunspell at ${HUNSPELL_LIBRARIES}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories("${PROJECT_BINARY_DIR}/src")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/src")
|
||||
|
||||
@@ -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
|
||||
````
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ using boost::tribool;
|
||||
template <> void GetDefaultMember::handle(const String& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const int& v) { value = to_script(v); }
|
||||
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 size_t& v) { value = to_script((int)v); }
|
||||
template <> void GetDefaultMember::handle(const double& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const bool& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const tribool& v) { value = to_script((bool)v); }
|
||||
|
||||
Reference in New Issue
Block a user