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
to your binary search PATH so the tool can be later run from anywhere.
@ -241,24 +221,30 @@ install libxml and libxslt for it instead. Strawberry perl works though and has
all the required packages.
Build
=====
There are several different batch files in the ``build`` folder along with a script that's used for picking the DF path.
-----
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.
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):
* ``all`` will create a solution with everything enabled (and the kitchen sink).
* ``gui`` will pop up the cmake gui and let you pick and choose what to build. This is probably what you want most of the time. Set the options you are interested in, then hit configure, then generate. More options can appear after the configure step.
* ``minimal`` will create a minimal solution with just the bare necessities - the main library and standard plugins.
* ``gui`` will pop up the cmake gui and let you pick and choose what to build.
This is probably what you want most of the time. Set the options you are interested
in, then hit configure, then generate. More options can appear after the configure step.
* ``minimal`` will create a minimal solution with just the bare necessities -
the main library and standard plugins.
Then you can either open the solution with MSVC or use one of the msbuild scripts:
* Scripts with ``build`` prefix will only build.
* Scripts with ``build`` prefix will only build DFHack.
* Scripts with ``install`` prefix will build DFHack and install it to the previously selected DF path.
* Scripts with ``package`` prefix will build and create a .zip package of DFHack.
When you open the solution in MSVC, make sure you never use the Debug builds. Those aren't
binary-compatible with DF. If you try to use a debug build with DF, you'll only get crashes.
So pick either Release or RelWithDebInfo build and build the INSTALL target.
The ``debug`` scripts actually do RelWithDebInfo builds.
For this reason the Windows "debug" scripts actually do RelWithDebInfo builds,
so pick either Release or RelWithDebInfo build and build the INSTALL target.