diff --git a/COMPILE.rst b/COMPILE.rst index 273871142..9ef345fee 100644 --- a/COMPILE.rst +++ b/COMPILE.rst @@ -4,11 +4,29 @@ Building DFHACK .. contents:: -================= -Building on Linux -================= + + +===== +Linux +===== 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 ============ 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 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 site: http://www.cmake.org/cmake/resources/software.html diff --git a/Compile.html b/Compile.html index c6d7226d2..35054fbd5 100644 --- a/Compile.html +++ b/Compile.html @@ -320,32 +320,49 @@ ul.auto-toc {
Contents
On Linux, DFHack acts as a library that shadows parts of the SDL API using LD_PRELOAD.
+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).
+DFHack is meant to be installed into an existing DF folder, so get one ready.
For building, you need a 32-bit version of GCC. For example, to build DFHack on a 64-bit distribution like Arch, you'll need the multilib development tools and libraries.
@@ -355,7 +372,7 @@ a 64-bit distribution like Arch, you'll need the multilib development tools and You should be able to find them in your distro repositories (on Arch linux 'perl-xml-libxml' and 'perl-xml-libxslt').On Linux, DFHack replaces the SDL library distributed with DF.
+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).
+First, 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. Make sure you let it add its binary folder @@ -392,8 +433,9 @@ Grab it from Microsoft's site.
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.
-There are several different batch files in the build folder along with a script that's used for picking the DF path.
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 generate prefix. These create the MSVC solution file(s):
@@ -415,7 +457,7 @@ So pick either Release or RelWithDebInfo build and build the INSTALL target.cmake allows you to pick a build type by changing this variable: CMAKE_BUILD_TYPE
@@ -427,7 +469,7 @@ cmake .. -DCMAKE_BUILD_TYPE:string=BUILD_TYPE 'RelWithDebInfo'. 'Debug' is not available on Windows.
Currently, the only way to use the library is to write a plugin that can be loaded by it. All the plugins can be found in the 'plugins' folder. There's no in-depth documentation on how to write one yet, but it should be easy enough to copy one and just follow the pattern.
@@ -444,17 +486,17 @@ The main license is zlib/libpng, some bits are MIT licensed, and some are BSD liFeel free to add your own extensions and plugins. Contributing back to the dfhack repository is welcome and the right thing to do :)
Several things should be kept in mind when contributing to DFHack.
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 you fix it ;)
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.
@@ -464,7 +506,7 @@ this is also a good place to dump new ideas and/or bugs that need fixing.If you want to do memory research, you'll need some tools and some knowledge. In general, you'll need a good memory viewer and optionally something to look at machine code without getting crazy :)