Small fixes to documentation and build scripts.

develop
Petr Mrázek 2011-03-18 16:47:55 +01:00
parent d75c940958
commit 7809ed6cd5
10 changed files with 58 additions and 45 deletions

@ -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,6 +106,13 @@ MACRO(DFHACK_TOOL TOOL_NAME TOOL_SOURCES)
RUNTIME DESTINATION ${DFHACK_BINARY_DESTINATION})
ENDMACRO()
IF(BUILD_DFHACK_LIBRARY)
add_subdirectory (library)
IF(BUILD_DFHACK_PYTHON_BINDINGS)
MESSAGE("TODO: write CMakeLists.txt for the python things.")
ENDIF()
IF(BUILD_DFHACK_SUPPORTED)
add_subdirectory (tools/supported)
ENDIF()
@ -117,7 +125,11 @@ IF(BUILD_DFHACK_PLAYGROUND)
add_subdirectory (tools/playground)
ENDIF()
IF(BUILD_DFHACK_DOXYGEN)
## install the default documentation files
install(FILES LICENSE Readme.html DESTINATION ${DFHACK_USERDOC_DESTINATION})
endif()
IF(BUILD_DFHACK_DOXYGEN AND BUILD_DFHACK_DEVEL)
add_subdirectory (doc)
ENDIF()

@ -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.

@ -382,7 +382,6 @@ fix it :)</p>
</div>
<p>0.31.01 - 0.31.03 legacy</p>
<p>0.31.04 - 0.31.21 SDL</p>
<p>You need have the MSVC 2010 <a class="reference external" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84">redistributable</a> package installed! The tools will fail to run otherwise.</p>
</div>
<div class="section" id="linux">
<h2><a class="toc-backref" href="#id6">Linux</a></h2>

@ -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

@ -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

@ -1,4 +1,5 @@
mkdir VC2005
cd VC2005
echo Pre-generating a build folder
cmake ..\.. -G"Visual Studio 8 2005"
pause
cmake-gui .

@ -1,4 +1,5 @@
mkdir VC2008
cd VC2008
echo Pre-generating a build folder
cmake ..\.. -G"Visual Studio 9 2008"
pause
cmake-gui .

@ -1,4 +1,5 @@
mkdir VC2010
cd VC2010
echo Pre-generating a build folder
cmake ..\.. -G"Visual Studio 10"
pause
cmake-gui .

@ -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})
endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/library/include/
DESTINATION ${DFHACK_INCLUDES_DESTINATION}
FILES_MATCHING PATTERN "*.h" ) #linux: include
endif()

@ -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 <uint16_t> >& assign );
std::vector <t_feature> 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);