Fix Readme and Compile documents.

develop
Petr Mrázek 2010-08-10 01:21:47 +02:00
parent 7aeafa01c9
commit dac7e45a44
4 changed files with 108 additions and 63 deletions

@ -111,6 +111,17 @@ dfhack has a few build targets:
* ``make`` will build everything.
* ``make expbench`` will build the expbench testing program and the
library.
* Some of the utilities and the doxygen documentation won't be
normally built. You can enable them by specifying some extra
CMake variables::
BUILD_DFHACK_DOCUMENTATION - generate the documentation (really bad)
BUILD_DFHACK_EXAMPLES - build tools from tools/examples
BUILD_DFHACK_PLAYGROUND - build tools from tools/playground
Example::
cmake .. -DBUILD_DFHACK_EXAMPLES=ON
Build types
===========

@ -425,11 +425,27 @@ compiler.</p>
<div class="section" id="build-targets">
<h1><a class="toc-backref" href="#id8">Build targets</a></h1>
<p>dfhack has a few build targets:</p>
<ul class="simple">
<li>If you're only after the library run <tt class="docutils literal">make dfhack</tt>.</li>
<li><tt class="docutils literal">make</tt> will build everything.</li>
<li><tt class="docutils literal">make expbench</tt> will build the expbench testing program and the
library.</li>
<ul>
<li><p class="first">If you're only after the library run <tt class="docutils literal">make dfhack</tt>.</p>
</li>
<li><p class="first"><tt class="docutils literal">make</tt> will build everything.</p>
</li>
<li><p class="first"><tt class="docutils literal">make expbench</tt> will build the expbench testing program and the
library.</p>
</li>
<li><p class="first">Some of the utilities and the doxygen documentation won't be
normally built. You can enable them by specifying some extra
CMake variables:</p>
<pre class="literal-block">
BUILD_DFHACK_DOCUMENTATION - generate the documentation (really bad)
BUILD_DFHACK_EXAMPLES - build tools from tools/examples
BUILD_DFHACK_PLAYGROUND - build tools from tools/playground
</pre>
<p>Example:</p>
<pre class="literal-block">
cmake .. -DBUILD_DFHACK_EXAMPLES=ON
</pre>
</li>
</ul>
</div>
<div class="section" id="build-types">

@ -52,7 +52,7 @@ Linux
0.31.04 - 0.31.12 native.
There are missing offsets but Map tools should be OK. Linux support is
a bit lacking, I'm working on it. All supported Windows versions
running in wine can be used with DFHack.
running in wine can be used with native DFHack binaries.
=====
Tools
@ -66,10 +66,6 @@ dfcleanmap
Cleans all the splatter that get scattered all over the map.
Only exception is mud. It leaves mud alone.
dfexpbench
==========
Just a simple benchmark of the data export speed.
dfliquids
=========
A command prompt for liquid creation and manipulation (the Moses
@ -93,10 +89,6 @@ dfreveal
Reveals the whole map, waits for input and hides it again. If you close
the tool while it waits, the map remains revealed.
dfsuspend
=========
Test of the process suspend/resume mechanism.
dfunstuck
=========
Use if you prematurely close any of the tools and DF appears to be
@ -112,6 +104,22 @@ dfflows
A tool for checking how many liquid tiles are actively checked for
flows.
dfattachtest
============
Test of the process attach/detach mechanism.
dfsuspend
=========
Test of the process suspend/resume mechanism.
dfexpbench
==========
Just a simple benchmark of the data export speed.
dfdoffsets
==========
Dumps the offsets for the currently running DF version into the terminal.
Your tool here
==============
Write one ;)

@ -335,35 +335,37 @@ allow for easier development of new tools.</p>
</li>
<li><a class="reference internal" href="#tools" id="id7">Tools</a><ul>
<li><a class="reference internal" href="#dfcleanmap" id="id8">dfcleanmap</a></li>
<li><a class="reference internal" href="#dfexpbench" id="id9">dfexpbench</a></li>
<li><a class="reference internal" href="#dfliquids" id="id10">dfliquids</a></li>
<li><a class="reference internal" href="#dfposition" id="id11">dfposition</a></li>
<li><a class="reference internal" href="#dfprospector" id="id12">dfprospector</a></li>
<li><a class="reference internal" href="#dfreveal" id="id13">dfreveal</a></li>
<li><a class="reference internal" href="#dfsuspend" id="id14">dfsuspend</a></li>
<li><a class="reference internal" href="#dfunstuck" id="id15">dfunstuck</a></li>
<li><a class="reference internal" href="#dfvdig" id="id16">dfvdig</a></li>
<li><a class="reference internal" href="#dfflows" id="id17">dfflows</a></li>
<li><a class="reference internal" href="#your-tool-here" id="id18">Your tool here</a></li>
<li><a class="reference internal" href="#dfliquids" id="id9">dfliquids</a></li>
<li><a class="reference internal" href="#dfposition" id="id10">dfposition</a></li>
<li><a class="reference internal" href="#dfprospector" id="id11">dfprospector</a></li>
<li><a class="reference internal" href="#dfreveal" id="id12">dfreveal</a></li>
<li><a class="reference internal" href="#dfunstuck" id="id13">dfunstuck</a></li>
<li><a class="reference internal" href="#dfvdig" id="id14">dfvdig</a></li>
<li><a class="reference internal" href="#dfflows" id="id15">dfflows</a></li>
<li><a class="reference internal" href="#dfattachtest" id="id16">dfattachtest</a></li>
<li><a class="reference internal" href="#dfsuspend" id="id17">dfsuspend</a></li>
<li><a class="reference internal" href="#dfexpbench" id="id18">dfexpbench</a></li>
<li><a class="reference internal" href="#dfdoffsets" id="id19">dfdoffsets</a></li>
<li><a class="reference internal" href="#your-tool-here" id="id20">Your tool here</a></li>
</ul>
</li>
<li><a class="reference internal" href="#using-the-library-as-a-developer" id="id19">Using the library as a developer</a><ul>
<li><a class="reference internal" href="#contributing-to-dfhack" id="id20">Contributing to DFHack</a><ul>
<li><a class="reference internal" href="#coding-style" id="id21">Coding style</a></li>
<li><a class="reference internal" href="#how-to-get-new-code-into-dfhack" id="id22">How to get new code into DFHack</a></li>
<li><a class="reference internal" href="#layout-for-tools" id="id23">Layout for tools</a></li>
<li><a class="reference internal" href="#modules-what-are-they" id="id24">Modules - what are they?</a></li>
<li><a class="reference internal" href="#dependencies" id="id25">Dependencies</a><ul>
<li><a class="reference internal" href="#current-internal-dependencies" id="id26">Current internal dependencies</a></li>
<li><a class="reference internal" href="#current-external-dependencies" id="id27">Current external dependencies</a></li>
<li><a class="reference internal" href="#build-time-dependencies" id="id28">Build-time dependencies</a></li>
<li><a class="reference internal" href="#using-the-library-as-a-developer" id="id21">Using the library as a developer</a><ul>
<li><a class="reference internal" href="#contributing-to-dfhack" id="id22">Contributing to DFHack</a><ul>
<li><a class="reference internal" href="#coding-style" id="id23">Coding style</a></li>
<li><a class="reference internal" href="#how-to-get-new-code-into-dfhack" id="id24">How to get new code into DFHack</a></li>
<li><a class="reference internal" href="#layout-for-tools" id="id25">Layout for tools</a></li>
<li><a class="reference internal" href="#modules-what-are-they" id="id26">Modules - what are they?</a></li>
<li><a class="reference internal" href="#dependencies" id="id27">Dependencies</a><ul>
<li><a class="reference internal" href="#current-internal-dependencies" id="id28">Current internal dependencies</a></li>
<li><a class="reference internal" href="#current-external-dependencies" id="id29">Current external dependencies</a></li>
<li><a class="reference internal" href="#build-time-dependencies" id="id30">Build-time dependencies</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#memory-offset-definitions" id="id29">Memory offset definitions</a></li>
<li><a class="reference internal" href="#memory-offset-definitions" id="id31">Memory offset definitions</a></li>
</ul>
</div>
</div>
@ -399,7 +401,7 @@ fix it :)</p>
<p>0.31.04 - 0.31.12 native.
There are missing offsets but Map tools should be OK. Linux support is
a bit lacking, I'm working on it. All supported Windows versions
running in wine can be used with DFHack.</p>
running in wine can be used with native DFHack binaries.</p>
</div>
</div>
<div class="section" id="tools">
@ -412,12 +414,8 @@ be useful and are cross-platform just like the library itself.</p>
<p>Cleans all the splatter that get scattered all over the map.
Only exception is mud. It leaves mud alone.</p>
</div>
<div class="section" id="dfexpbench">
<h2><a class="toc-backref" href="#id9">dfexpbench</a></h2>
<p>Just a simple benchmark of the data export speed.</p>
</div>
<div class="section" id="dfliquids">
<h2><a class="toc-backref" href="#id10">dfliquids</a></h2>
<h2><a class="toc-backref" href="#id9">dfliquids</a></h2>
<p>A command prompt for liquid creation and manipulation (the Moses
effect included!) Also allows painting obsidian walls directly.</p>
<div class="note">
@ -427,44 +425,56 @@ temperatures (creating heat traps). You've been warned.</p>
</div>
</div>
<div class="section" id="dfposition">
<h2><a class="toc-backref" href="#id11">dfposition</a></h2>
<h2><a class="toc-backref" href="#id10">dfposition</a></h2>
<p>Prints the current DF window properties and cursor position.</p>
</div>
<div class="section" id="dfprospector">
<h2><a class="toc-backref" href="#id12">dfprospector</a></h2>
<h2><a class="toc-backref" href="#id11">dfprospector</a></h2>
<p>Lists all available minerals on the map and how much of them there is.</p>
</div>
<div class="section" id="dfreveal">
<h2><a class="toc-backref" href="#id13">dfreveal</a></h2>
<h2><a class="toc-backref" href="#id12">dfreveal</a></h2>
<p>Reveals the whole map, waits for input and hides it again. If you close
the tool while it waits, the map remains revealed.</p>
</div>
<div class="section" id="dfsuspend">
<h2><a class="toc-backref" href="#id14">dfsuspend</a></h2>
<p>Test of the process suspend/resume mechanism.</p>
</div>
<div class="section" id="dfunstuck">
<h2><a class="toc-backref" href="#id15">dfunstuck</a></h2>
<h2><a class="toc-backref" href="#id13">dfunstuck</a></h2>
<p>Use if you prematurely close any of the tools and DF appears to be
stuck.</p>
</div>
<div class="section" id="dfvdig">
<h2><a class="toc-backref" href="#id16">dfvdig</a></h2>
<h2><a class="toc-backref" href="#id14">dfvdig</a></h2>
<p>Designates a whole vein for digging. Point the cursor at a vein and run
this thing :)</p>
</div>
<div class="section" id="dfflows">
<h2><a class="toc-backref" href="#id17">dfflows</a></h2>
<h2><a class="toc-backref" href="#id15">dfflows</a></h2>
<p>A tool for checking how many liquid tiles are actively checked for
flows.</p>
</div>
<div class="section" id="dfattachtest">
<h2><a class="toc-backref" href="#id16">dfattachtest</a></h2>
<p>Test of the process attach/detach mechanism.</p>
</div>
<div class="section" id="dfsuspend">
<h2><a class="toc-backref" href="#id17">dfsuspend</a></h2>
<p>Test of the process suspend/resume mechanism.</p>
</div>
<div class="section" id="dfexpbench">
<h2><a class="toc-backref" href="#id18">dfexpbench</a></h2>
<p>Just a simple benchmark of the data export speed.</p>
</div>
<div class="section" id="dfdoffsets">
<h2><a class="toc-backref" href="#id19">dfdoffsets</a></h2>
<p>Dumps the offsets for the currently running DF version into the terminal.</p>
</div>
<div class="section" id="your-tool-here">
<h2><a class="toc-backref" href="#id18">Your tool here</a></h2>
<h2><a class="toc-backref" href="#id20">Your tool here</a></h2>
<p>Write one ;)</p>
</div>
</div>
<div class="section" id="using-the-library-as-a-developer">
<h1><a class="toc-backref" href="#id19">Using the library as a developer</a></h1>
<h1><a class="toc-backref" href="#id21">Using the library as a developer</a></h1>
<p>The library is compilable under Linux with GCC and under Windows with
MinGW32 and MSVC compilers. It is using the cmake build system. See
COMPILE for details.</p>
@ -475,17 +485,17 @@ the dfhack repository is welcome and the right thing to do :)</p>
code does have a lot of comments though (and getting better all the
time).</p>
<div class="section" id="contributing-to-dfhack">
<h2><a class="toc-backref" href="#id20">Contributing to DFHack</a></h2>
<h2><a class="toc-backref" href="#id22">Contributing to DFHack</a></h2>
<p>Several things should be kept in mind when contributing to DFHack.</p>
<div class="section" id="coding-style">
<h3><a class="toc-backref" href="#id21">Coding style</a></h3>
<h3><a class="toc-backref" href="#id23">Coding style</a></h3>
<p>DFhack uses ANSI formatting and four spaces as indentation. Line
endings are UNIX. The files use UTF-8 encoding. Code not following this
won't make me happy, because I'll have to fix it. There's a good chance
I'll make <em>you</em> fix it ;)</p>
</div>
<div class="section" id="how-to-get-new-code-into-dfhack">
<h3><a class="toc-backref" href="#id22">How to get new code into DFHack</a></h3>
<h3><a class="toc-backref" href="#id24">How to get new code into DFHack</a></h3>
<p>You can send patches or make a clone of the github repo and ask me on
the IRC channel to pull your code in. I'll review it and see if there
are any problems. I'll fix them if they are minor.</p>
@ -495,7 +505,7 @@ this is also a good place to dump new ideas and/or bugs that need
fixing.</p>
</div>
<div class="section" id="layout-for-tools">
<h3><a class="toc-backref" href="#id23">Layout for tools</a></h3>
<h3><a class="toc-backref" href="#id25">Layout for tools</a></h3>
<p>Tools live in the tools/ folder. There, they are split into three
categories.</p>
<dl class="docutils">
@ -516,7 +526,7 @@ nasty business.</dd>
</dl>
</div>
<div class="section" id="modules-what-are-they">
<h3><a class="toc-backref" href="#id24">Modules - what are they?</a></h3>
<h3><a class="toc-backref" href="#id26">Modules - what are they?</a></h3>
<p>DFHack uses modules to partition sets of features into manageable
chunks. A module can have both client and server side.</p>
<p>Client side is the part that goes into the main library and is
@ -533,7 +543,7 @@ server, it allows accelerating the reading of map blocks.</p>
pretty fast, but needs quite a bit of care to not break.</p>
</div>
<div class="section" id="dependencies">
<h3><a class="toc-backref" href="#id25">Dependencies</a></h3>
<h3><a class="toc-backref" href="#id27">Dependencies</a></h3>
<dl class="docutils">
<dt>Internal</dt>
<dd>either part of the codebase or statically linked.</dd>
@ -545,7 +555,7 @@ dependencies for core dfhack should be either public domain or require
attribution at most. External dependencies for tools can be either
that, or any Free Software licenses.</p>
<div class="section" id="current-internal-dependencies">
<h4><a class="toc-backref" href="#id26">Current internal dependencies</a></h4>
<h4><a class="toc-backref" href="#id28">Current internal dependencies</a></h4>
<dl class="docutils">
<dt>tinyxml</dt>
<dd>used by core dfhack to read offset definitions from Memory.xml</dd>
@ -557,7 +567,7 @@ DF binaries on Linux.</dd>
</dl>
</div>
<div class="section" id="current-external-dependencies">
<h4><a class="toc-backref" href="#id27">Current external dependencies</a></h4>
<h4><a class="toc-backref" href="#id29">Current external dependencies</a></h4>
<dl class="docutils">
<dt>wide-character ncurses</dt>
<dd>used for the veinlook tool on Linux.</dd>
@ -566,7 +576,7 @@ DF binaries on Linux.</dd>
</dl>
</div>
<div class="section" id="build-time-dependencies">
<h4><a class="toc-backref" href="#id28">Build-time dependencies</a></h4>
<h4><a class="toc-backref" href="#id30">Build-time dependencies</a></h4>
<dl class="docutils">
<dt>cmake</dt>
<dd>you need cmake to generate the build system and some configuration
@ -577,7 +587,7 @@ headers</dd>
</div>
</div>
<div class="section" id="memory-offset-definitions">
<h1><a class="toc-backref" href="#id29">Memory offset definitions</a></h1>
<h1><a class="toc-backref" href="#id31">Memory offset definitions</a></h1>
<p>The file with memory offset definitions used by dfhack can be found in the
output folder.</p>
</div>