|
|
|
@ -5,6 +5,18 @@ First, there is one dependency, regardless of the OS you use:
|
|
|
|
|
cmake - it's the build system
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dependencies
|
|
|
|
|
============
|
|
|
|
|
|
|
|
|
|
You'll need cmake and 'a' compiler for building the main lib and the various tools.
|
|
|
|
|
To build the libdfconnect on Linux, you'll have to make a 32bit build.
|
|
|
|
|
To build the fake SDL.dll on Windows, you'll have to use MSVC 2008 Express and make
|
|
|
|
|
a Release or RelWithDebInfo build.
|
|
|
|
|
|
|
|
|
|
The python bindings require SWIG and the python devel libs for building.
|
|
|
|
|
|
|
|
|
|
(Linux only) Veinlook requires the wide-character ncurses library (libncursesw)
|
|
|
|
|
|
|
|
|
|
Building on Linux:
|
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
|
@ -36,9 +48,11 @@ See the section on the shared memory hook library (SHM).
|
|
|
|
|
Building on Windows:
|
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
|
|
You need cmake. Get the win32 installer version from the official site: http://www.cmake.org/cmake/resources/software.html
|
|
|
|
|
You need cmake. Get the win32 installer version from the official site:
|
|
|
|
|
http://www.cmake.org/cmake/resources/software.html
|
|
|
|
|
It has the usual installer wizard thing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Using mingw:
|
|
|
|
|
|
|
|
|
|
You also need a compiler. I build dfhack using mingw. You can get it from the mingw site:
|
|
|
|
@ -51,16 +65,22 @@ You'll have to add C:\MinGW\ to your PATH variable.
|
|
|
|
|
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Release
|
|
|
|
|
mingw32-make
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Using MSVC
|
|
|
|
|
|
|
|
|
|
open up cmd and navigate to the dfhack\build folder, run cmake:
|
|
|
|
|
cd build
|
|
|
|
|
cmake ..
|
|
|
|
|
|
|
|
|
|
This will generate MSVC solution and project files. Note that: you are working in the /build folder.
|
|
|
|
|
Files added to projects will end up there! (and that's wrong). Any changes to the build system should
|
|
|
|
|
This will generate MSVC solution and project files.
|
|
|
|
|
Note that: you are working in the /build folder. Files added to projects will
|
|
|
|
|
end up there! (and that's wrong). Any changes to the build system should
|
|
|
|
|
be done by changing cmake configs and running cmake on them!
|
|
|
|
|
|
|
|
|
|
Alo, you'll have to copy the Memory.xml file to the build output folders
|
|
|
|
|
MSVC generates. For example from 'output/' to 'output/Release/'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Using some other compiler:
|
|
|
|
|
|
|
|
|
|
I'm afraid you are on your own. dfhack wasn't tested with any other compiler.
|
|
|
|
@ -70,19 +90,22 @@ Try using a different cmake generator that's intended for your tools.
|
|
|
|
|
Building the shared memory hook library (SHM)
|
|
|
|
|
---------------------------------------------
|
|
|
|
|
|
|
|
|
|
Unlike the rest of DFHack, The SHM needs special treatment when it comes to compilation.
|
|
|
|
|
Because it shares the memory space with DF itself, it has to be built with the same tools as DF
|
|
|
|
|
and use the same C and C++/STL libraries.
|
|
|
|
|
Unlike the rest of DFHack, The SHM needs special treatment when it comes to
|
|
|
|
|
compilation. Because it shares the memory space with DF itself, it has to be
|
|
|
|
|
built with the same tools as DF and use the same C and C++/STL libraries.
|
|
|
|
|
|
|
|
|
|
For DF 40d15 - 40d17 on Windows, use MSVC 2008. You can get the Express edition for free from Microsoft.
|
|
|
|
|
For DF 40d15 - 40d19_2 on Windows, use MSVC 2008. You can get the Express
|
|
|
|
|
edition for free from Microsoft.
|
|
|
|
|
|
|
|
|
|
Windows dependencies can be determined by a tool like depends.exe (google it). Both the fake SDL.dll
|
|
|
|
|
and DF have to use the same version of the C runtime (MSVCRT).
|
|
|
|
|
The SHM can't be debugged, because debug builds in MSVC use a different CRT!
|
|
|
|
|
Windows dependencies can be determined by a tool like depends.exe (google it).
|
|
|
|
|
Both the fake SDL.dll and DF have to use the same version of the C runtime
|
|
|
|
|
(MSVCRT).
|
|
|
|
|
The SHM can only be debugged using a RelWithDebInfo build!
|
|
|
|
|
|
|
|
|
|
Linux dependencies can be determined by setting the LD_DEBUG variable and running ./df:
|
|
|
|
|
export LD_DEBUG=versions
|
|
|
|
|
./df
|
|
|
|
|
Linux dependencies can be determined by setting the LD_DEBUG variable and
|
|
|
|
|
running ./df:
|
|
|
|
|
$export LD_DEBUG=versions
|
|
|
|
|
$./df
|
|
|
|
|
|
|
|
|
|
Example of (a part of a) relevant output from a working SHM installation:
|
|
|
|
|
24472: checking for version `GLIBC_2.0' in file /opt/lib32/lib/libpthread.so.0 [0] required by file ./dwarfort.exe [0]
|
|
|
|
@ -104,26 +127,30 @@ Example of (a part of a) relevant output from a working SHM installation:
|
|
|
|
|
24472: checking for version `GLIBC_2.3.4' in file /opt/lib32/lib/libc.so.6 [0] required by file ./libs/libdfconnect.so [0]
|
|
|
|
|
24472: checking for version `GLIBC_2.0' in file /opt/lib32/lib/libc.so.6 [0] required by file ./libs/libdfconnect.so [0]
|
|
|
|
|
|
|
|
|
|
libdfconnect is the SHM. Both are compiled against the same C++ library and share the same CXXABI version.
|
|
|
|
|
libdfconnect is the SHM. Both are compiled against the same C++ library and
|
|
|
|
|
share the same CXXABI version.
|
|
|
|
|
|
|
|
|
|
Precompiled SHM libraries are provided in binary releases.
|
|
|
|
|
|
|
|
|
|
* Checking strings support
|
|
|
|
|
|
|
|
|
|
Strings are one of the important C++ types and a great indicator that the SHM works. Tools like Dwarf Therapist depend
|
|
|
|
|
on string support. Reading of strings can be checked by running any of the tools that deal with materials.
|
|
|
|
|
Strings are one of the important C++ types and a great indicator that the SHM
|
|
|
|
|
works. Tools like Dwarf Therapist depend on string support. Reading of strings
|
|
|
|
|
can be checked by running any of the tools that deal with materials.
|
|
|
|
|
|
|
|
|
|
String writing is best tested with a fresh throw-away fort and dfrenamer. Embark, give one dwarf a very long name using dfrenamer
|
|
|
|
|
and save/exit. If DF crashes during the save sequence, your SHM is not compatible with DF and the throw-away fort is lost.
|
|
|
|
|
String writing is best tested with a fresh throw-away fort and dfrenamer.
|
|
|
|
|
Embark, give one dwarf a very long name using dfrenamer and save/exit.
|
|
|
|
|
If DF crashes during the save sequence, your SHM is not compatible with DF and
|
|
|
|
|
the throw-away fort is most probably lost.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Build targets
|
|
|
|
|
-------------
|
|
|
|
|
|
|
|
|
|
dfhack has a few build targets. If you're only after the library run 'make dfhack'.
|
|
|
|
|
dfhack has a few build targets.
|
|
|
|
|
If you're only after the library run 'make dfhack'.
|
|
|
|
|
'make' will build everything.
|
|
|
|
|
'make expbench' will build the expbench throughput testing program and the library.
|
|
|
|
|
|
|
|
|
|
'make expbench' will build the expbench testing program and the library.
|
|
|
|
|
|
|
|
|
|
Build types
|
|
|
|
|
-----------
|
|
|
|
@ -132,7 +159,9 @@ cmake allows you to pick a build type by changing this variable: CMAKE_BUILD_TYP
|
|
|
|
|
|
|
|
|
|
cmake .. -DCMAKE_BUILD_TYPE:string=BUILD_TYPE
|
|
|
|
|
|
|
|
|
|
Without specifying a build type or 'None', cmake uses the CMAKE_CXX_FLAGS variable for building.
|
|
|
|
|
Valid build types include 'Release' and 'Debug'. There are others, but they aren't really that useful.
|
|
|
|
|
Without specifying a build type or 'None', cmake uses the CMAKE_CXX_FLAGS
|
|
|
|
|
variable for building.
|
|
|
|
|
Valid an useful build types include 'Release', 'Debug' and 'RelWithDebInfo'.
|
|
|
|
|
There are others, but they aren't really that useful.
|
|
|
|
|
|
|
|
|
|
Have fun.
|
|
|
|
|