diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d54532cb..3b0fe42f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,8 +14,6 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "In-source builds are not allowed.")
endif()
-
-set(DEVEL_RELEASE "-dev")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "5")
set(CPACK_PACKAGE_VERSION_PATCH "8")
@@ -76,9 +74,17 @@ IF(${DFHACK_INSTALL} STREQUAL "linux")
ENDIF()
## some options for the user/developer to play with
-OPTION(BUILD_DFHACK_SUPPORTED "Build the supported tools." ON)
-OPTION(BUILD_DFHACK_C_BINDINGS "Build the C portion of the library" ON)
+OPTION(BUILD_DFHACK_LIBRARY "Build the library. Needed for all the tools." ON)
+OPTION(BUILD_DFHACK_C_BINDINGS "Build the C portion of the library." ON)
+OPTION(BUILD_DFHACK_PYTHON_BINDINGS "Build/install the python wrapper." ON)
+IF(WIN32)
+ OPTION(BUILD_DFHACK_DEVEL "Build the developer stuff." OFF)
+ENDIF()
+IF(UNIX)
+ OPTION(BUILD_DFHACK_DEVEL "Build the developer stuff." ON)
+ENDIF()
OPTION(BUILD_DFHACK_DOXYGEN "Create doxygen documentation for developers" ON)
+OPTION(BUILD_DFHACK_SUPPORTED "Build the supported tools." ON)
OPTION(BUILD_DFHACK_EXAMPLES "Build example tools" OFF)
OPTION(BUILD_DFHACK_PLAYGROUND "Build tools from the playground folder" OFF)
@@ -86,11 +92,6 @@ include_directories (${CMAKE_SOURCE_DIR}/library/include/)
include_directories (${CMAKE_SOURCE_DIR}/library/shm/)
include_directories (${CMAKE_SOURCE_DIR}/library/depends/argstream/)
-add_subdirectory (library)
-
-## install the default documentation files
-install(FILES Readme.html Compile.html DESTINATION ${DFHACK_USERDOC_DESTINATION})
-
# macro to save on typing in the tool subdirs
# builds a tool, links it to the dfhack lib and makes sure the dependency
# LOCAL_DEPNAME is built first, in case there is one
@@ -105,19 +106,30 @@ MACRO(DFHACK_TOOL TOOL_NAME TOOL_SOURCES)
RUNTIME DESTINATION ${DFHACK_BINARY_DESTINATION})
ENDMACRO()
-IF(BUILD_DFHACK_SUPPORTED)
- add_subdirectory (tools/supported)
-ENDIF()
+IF(BUILD_DFHACK_LIBRARY)
-IF(BUILD_DFHACK_EXAMPLES)
- add_subdirectory (tools/examples)
-ENDIF()
+ add_subdirectory (library)
-IF(BUILD_DFHACK_PLAYGROUND)
- add_subdirectory (tools/playground)
-ENDIF()
+ IF(BUILD_DFHACK_PYTHON_BINDINGS)
+ MESSAGE("TODO: write CMakeLists.txt for the python things.")
+ ENDIF()
+ IF(BUILD_DFHACK_SUPPORTED)
+ add_subdirectory (tools/supported)
+ ENDIF()
+
+ IF(BUILD_DFHACK_EXAMPLES)
+ add_subdirectory (tools/examples)
+ ENDIF()
+
+ IF(BUILD_DFHACK_PLAYGROUND)
+ add_subdirectory (tools/playground)
+ ENDIF()
+
+ ## install the default documentation files
+ install(FILES LICENSE Readme.html DESTINATION ${DFHACK_USERDOC_DESTINATION})
+endif()
-IF(BUILD_DFHACK_DOXYGEN)
+IF(BUILD_DFHACK_DOXYGEN AND BUILD_DFHACK_DEVEL)
add_subdirectory (doc)
ENDIF()
diff --git a/README.rst b/README.rst
index 5d980df29..372d8d269 100644
--- a/README.rst
+++ b/README.rst
@@ -11,7 +11,6 @@ allow for easier development of new tools.
.. contents::
-
==============
Getting DFHack
==============
@@ -48,10 +47,6 @@ Windows
0.31.04 - 0.31.21 SDL
-You need have the MSVC 2010 redistributable_ package installed! The tools will fail to run otherwise.
-
-.. _redistributable: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
-
Linux
=====
0.31.05 - 0.31.19 native.
diff --git a/Readme.html b/Readme.html
index 670d13f12..522050a23 100644
--- a/Readme.html
+++ b/Readme.html
@@ -382,7 +382,6 @@ fix it :)
0.31.01 - 0.31.03 legacy
0.31.04 - 0.31.21 SDL
-You need have the MSVC 2010 redistributable package installed! The tools will fail to run otherwise.
diff --git a/build/build-MinGW32-debug.bat b/build/build-MinGW32-debug.bat
index 63f6fffb5..a20cb905c 100644
--- a/build/build-MinGW32-debug.bat
+++ b/build/build-MinGW32-debug.bat
@@ -1,5 +1,6 @@
mkdir MINGW32-debug
cd MINGW32-debug
cmake ..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Debug
-mingw32-make
+cmake-gui .
+mingw32-make 2> ..\mingw-build-log.txt
pause
\ No newline at end of file
diff --git a/build/build-MinGW32-release.bat b/build/build-MinGW32-release.bat
index 2617002d2..af1dd060b 100644
--- a/build/build-MinGW32-release.bat
+++ b/build/build-MinGW32-release.bat
@@ -1,5 +1,7 @@
mkdir MINGW32-release
cd MINGW32-release
cmake ..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Release
-mingw32-make 2> log.txt
+
+cmake-gui .
+mingw32-make 2> ..\mingw-build-log.txt
pause
\ No newline at end of file
diff --git a/build/generate-MSVC-2005.bat b/build/generate-MSVC-2005.bat
index 080cb61a7..40aca9e01 100644
--- a/build/generate-MSVC-2005.bat
+++ b/build/generate-MSVC-2005.bat
@@ -1,4 +1,5 @@
mkdir VC2005
cd VC2005
+echo Pre-generating a build folder
cmake ..\.. -G"Visual Studio 8 2005"
-pause
\ No newline at end of file
+cmake-gui .
\ No newline at end of file
diff --git a/build/generate-MSVC-2008.bat b/build/generate-MSVC-2008.bat
index 8a6722c25..f8b0fd040 100644
--- a/build/generate-MSVC-2008.bat
+++ b/build/generate-MSVC-2008.bat
@@ -1,4 +1,5 @@
mkdir VC2008
cd VC2008
+echo Pre-generating a build folder
cmake ..\.. -G"Visual Studio 9 2008"
-pause
\ No newline at end of file
+cmake-gui .
\ No newline at end of file
diff --git a/build/generate-MSVC-2010.bat b/build/generate-MSVC-2010.bat
index 3257c68e2..00c990083 100644
--- a/build/generate-MSVC-2010.bat
+++ b/build/generate-MSVC-2010.bat
@@ -1,4 +1,5 @@
mkdir VC2010
cd VC2010
+echo Pre-generating a build folder
cmake ..\.. -G"Visual Studio 10"
-pause
\ No newline at end of file
+cmake-gui .
\ No newline at end of file
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 947d0168f..1e7688b43 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -45,6 +45,7 @@ include/dfhack/DFTypes.h
include/dfhack/DFVector.h
include/dfhack/VersionInfoFactory.h
include/dfhack/VersionInfo.h
+include/dfhack/extra/MapExtras.h
include/dfhack/modules/Buildings.h
include/dfhack/modules/Constructions.h
include/dfhack/modules/Creatures.h
@@ -202,10 +203,11 @@ install(TARGETS dfhack
RUNTIME DESTINATION ${DFHACK_LIBRARY_DESTINATION}) #linux: lib
install(FILES ${CMAKE_SOURCE_DIR}/Memory.xml
DESTINATION ${DFHACK_DATA_DESTINATION}) #linux: share/dfhack
-if(WIN32)
+
+if(WIN32 AND BUILD_DFHACK_DEVEL)
install(TARGETS dfhack
ARCHIVE DESTINATION ${DFHACK_DEVLIB_DESTINATION})
+ install(DIRECTORY ${CMAKE_SOURCE_DIR}/library/include/
+ DESTINATION ${DFHACK_INCLUDES_DESTINATION}
+ FILES_MATCHING PATTERN "*.h" ) #linux: include
endif()
-install(DIRECTORY ${CMAKE_SOURCE_DIR}/library/include/
- DESTINATION ${DFHACK_INCLUDES_DESTINATION}
- FILES_MATCHING PATTERN "*.h" ) #linux: include
diff --git a/library/include/dfhack/modules/Maps.h b/library/include/dfhack/modules/Maps.h
index 98b0bffe5..41ba21166 100644
--- a/library/include/dfhack/modules/Maps.h
+++ b/library/include/dfhack/modules/Maps.h
@@ -482,13 +482,16 @@ namespace DFHack
I omitted resolving the layer matgloss in this API, because it would
introduce overhead by calling some method for each tile. You have to do it
- yourself. First get the stuff from ReadGeology and then for each block get
- the RegionOffsets. For each tile get the real region from RegionOffsets and
- cross-reference it with the geology stuff (region -- array of vectors, depth --
- vector). I'm thinking about turning that Geology stuff into a
- two-dimensional array with static size.
+ yourself.
+
+ First get the stuff from ReadGeology and then for each block get the RegionOffsets.
+ For each tile get the real region from RegionOffsets and cross-reference it with
+ the geology stuff (region -- array of vectors, depth -- vector).
+ I'm thinking about turning that Geology stuff into a two-dimensional array
+ with static size.
this is the algorithm for applying matgloss:
+ @code
void DfMap::applyGeoMatgloss(Block * b)
{
// load layer matgloss
@@ -503,6 +506,7 @@ namespace DFHack
}
}
}
+ @endcode
*/
bool ReadGeology( std::vector < std::vector
>& assign );
std::vector global_features;
@@ -515,12 +519,7 @@ namespace DFHack
/*
* BLOCK DATA
*/
- /*
- /// allocate and read pointers to map blocks
- bool InitMap();
- /// destroy the mapblock cache
- bool DestroyMap();
- */
+
/// get size of the map in tiles
void getSize(uint32_t& x, uint32_t& y, uint32_t& z);