From b57d9b76156c4b365ae024e87f721563185fffe4 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Mon, 11 May 2020 01:54:21 +0200 Subject: [PATCH] Enable 64 bit static build and fix linker error --- CMakeSettings.json | 12 ++++++++++++ README.md | 3 +++ src/util/io/get_member.cpp | 1 + 3 files changed, 16 insertions(+) diff --git a/CMakeSettings.json b/CMakeSettings.json index 3cd2c91b..13b08d17 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -59,6 +59,18 @@ "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x86" ], "variables": [] + }, + { + "name": "x64-Release-static", + "generator": "Ninja", + "configurationType": "Release", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static", + "buildCommandArgs": "-v", + "ctestCommandArgs": "", + "inheritEnvironments": [ "msvc_x64_x64" ], + "variables": [] } ] } \ No newline at end of file diff --git a/README.md b/README.md index 9bd703c7..ed85097f 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,17 @@ vcpkg install wxwidgets vcpkg install boost-smart-ptr vcpkg install boost-regex vcpkg install boost-logic +vcpkg install boost-pool vcpkg install hunspell vcpkg integrate install ```` * Then just use "Open Folder" from inside visual studio to open the Magic Set Editor source code root folder. + * Select the configuration that you want to build, and hit F7. Notes: * You may need to work around [this bug](https://github.com/microsoft/vcpkg/issues/4756) by replacing `$VCPATH\IDE\CommonExtensions\Microsoft\CMake\CMake\share\cmake-3.16\Modules\FindwxWidgets.cmake` with the file from https://github.com/CaeruleusAqua/vcpkg-wx-find (`$VCPATH` is usually `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7`) * vcpkg by default installs 32 bit versions of libraries, use `vcpkg install PACKAGENAME:x64-windows` if you want to enable a 64 bit build. + * Similarly, to use a static build, use `vcpkg install PACKAGENAME:x32-windows-static`. For running tests you will also need to * Download and install perl (For example [Strawberry perl](http://strawberryperl.com/) or using [MSYS2](https://www.msys2.org/)) diff --git a/src/util/io/get_member.cpp b/src/util/io/get_member.cpp index 3a82814e..eba0c8ad 100644 --- a/src/util/io/get_member.cpp +++ b/src/util/io/get_member.cpp @@ -20,6 +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 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); }