On Linux, DFHack acts as a library that shadows parts of the SDL API using LD_PRELOAD.
On Linux, DFHack acts as a library that shadows parts of the SDL API using LD_PRELOAD.
How to get the code
===================
DFHack doesn't have any kind of system of code snapshots in place, so you will have to get code from the github repository using git.
Having a 'git' package installed is the minimal requirement, but some sort of git gui or git integration for your favorite text editor/IDE will certainly help.
The code resides here: https://github.com/peterix/dfhack
If you just want to compile DFHack or work on it by contributing patches, it's quite enough to clone from the read-only address::
git clone git://github.com/peterix/dfhack.git
cd dfhack
git submodule init
git submodule update
If you want to get really involved with the development, create an account on github, make a clone there and then use that as your remote repository instead. Detailed instructions are beyond the scope of this document. If you need help, join us on IRC (#dfhack channel on freenode).
Dependencies
Dependencies
============
============
DFHack is meant to be installed into an existing DF folder, so get one ready.
DFHack is meant to be installed into an existing DF folder, so get one ready.
@ -45,9 +63,34 @@ extra options.
You can also use a cmake-friendly IDE like KDevelop 4 or the cmake-gui
You can also use a cmake-friendly IDE like KDevelop 4 or the cmake-gui
program.
program.
=======
Windows
=======
On Linux, DFHack replaces the SDL library distributed with DF.
How to get the code
===================
===================
Building on Windows
DFHack doesn't have any kind of system of code snapshots in place, so you will have to get code from the github repository using git.
===================
You will need some sort of Windows port of git, or a GUI. Some examples:
* http://code.google.com/p/msysgit/ - this is a command line version of git for windows. Most tutorials on git usage will apply.
* http://code.google.com/p/tortoisegit/ - this puts a pretty, graphical face on top of msysgit :)
The code resides here: https://github.com/peterix/dfhack
If you just want to compile DFHack or work on it by contributing patches, it's quite enough to clone from the read-only address::
git clone git://github.com/peterix/dfhack.git
cd dfhack
git submodule init
git submodule update
The tortoisegit GUI should have the equivalent options included.
If you want to get really involved with the development, create an account on github, make a clone there and then use that as your remote repository instead. Detailed instructions are beyond the scope of this document. If you need help, join us on IRC (#dfhack channel on freenode).
Dependencies
============
First, you need ``cmake``. Get the win32 installer version from the official
First, you need ``cmake``. Get the win32 installer version from the official
<p>On Linux, DFHack acts as a library that shadows parts of the SDL API using LD_PRELOAD.</p>
<p>On Linux, DFHack acts as a library that shadows parts of the SDL API using LD_PRELOAD.</p>
<divclass="section"id="how-to-get-the-code">
<h2><aclass="toc-backref"href="#id5">How to get the code</a></h2>
<p>DFHack doesn't have any kind of system of code snapshots in place, so you will have to get code from the github repository using git.
Having a 'git' package installed is the minimal requirement, but some sort of git gui or git integration for your favorite text editor/IDE will certainly help.</p>
<p>If you just want to compile DFHack or work on it by contributing patches, it's quite enough to clone from the read-only address:</p>
<preclass="literal-block">
git clone git://github.com/peterix/dfhack.git
cd dfhack
git submodule init
git submodule update
</pre>
<p>If you want to get really involved with the development, create an account on github, make a clone there and then use that as your remote repository instead. Detailed instructions are beyond the scope of this document. If you need help, join us on IRC (#dfhack channel on freenode).</p>
<p>On Linux, DFHack replaces the SDL library distributed with DF.</p>
<divclass="section"id="id1">
<h2><aclass="toc-backref"href="#id9">How to get the code</a></h2>
<p>DFHack doesn't have any kind of system of code snapshots in place, so you will have to get code from the github repository using git.
You will need some sort of Windows port of git, or a GUI. Some examples:</p>
<blockquote>
<ulclass="simple">
<li><aclass="reference external"href="http://code.google.com/p/msysgit/">http://code.google.com/p/msysgit/</a> - this is a command line version of git for windows. Most tutorials on git usage will apply.</li>
<li><aclass="reference external"href="http://code.google.com/p/tortoisegit/">http://code.google.com/p/tortoisegit/</a> - this puts a pretty, graphical face on top of msysgit :)</li>
<p>If you just want to compile DFHack or work on it by contributing patches, it's quite enough to clone from the read-only address:</p>
<preclass="literal-block">
git clone git://github.com/peterix/dfhack.git
cd dfhack
git submodule init
git submodule update
</pre>
<p>The tortoisegit GUI should have the equivalent options included.</p>
<p>If you want to get really involved with the development, create an account on github, make a clone there and then use that as your remote repository instead. Detailed instructions are beyond the scope of this document. If you need help, join us on IRC (#dfhack channel on freenode).</p>
<p>It has the usual installer wizard. Make sure you let it add its binary folder
<p>It has the usual installer wizard. Make sure you let it add its binary folder
@ -392,8 +433,9 @@ Grab it from Microsoft's site.</p>
<li>Same with "cpan XML::LibXSLT".</li>
<li>Same with "cpan XML::LibXSLT".</li>
</ul>
</ul>
<p>If you already have a different version of perl (for example the one from cygwin), you can run into some trouble. Either remove the other perl install from PATH, or install libxml and libxslt for it instead. Strawberry perl works though and has all the required packages.</p>
<p>If you already have a different version of perl (for example the one from cygwin), you can run into some trouble. Either remove the other perl install from PATH, or install libxml and libxslt for it instead. Strawberry perl works though and has all the required packages.</p>
<p>There are several different batch files in the <ttclass="docutils literal">build</tt> folder along with a script that's used for picking the DF path.</p>
<p>There are several different batch files in the <ttclass="docutils literal">build</tt> folder along with a script that's used for picking the DF path.</p>
<p>First, run set_df_path.vbs and point the dialog that pops up at your DF folder that you want to use for development.
<p>First, run set_df_path.vbs and point the dialog that pops up at your DF folder that you want to use for development.
Next, run one of the scripts with <ttclass="docutils literal">generate</tt> prefix. These create the MSVC solution file(s):</p>
Next, run one of the scripts with <ttclass="docutils literal">generate</tt> prefix. These create the MSVC solution file(s):</p>
@ -415,7 +457,7 @@ So pick either Release or RelWithDebInfo build and build the INSTALL target.</p>