From 1a8f60c03b171f3be5c00d4391c3f831a62a454b Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Fri, 6 Jan 2023 15:31:50 -0800 Subject: [PATCH] implement remaining review comments from #2517 --- .gitignore | 1 - docs/dev/{building => compile}/Compile.rst | 14 ++++----- .../{building => compile}/Dependencies.rst | 0 docs/dev/{building => compile}/Options.rst | 29 ++++++++++--------- docs/dev/{building => compile}/index.rst | 6 ++-- docs/dev/index.rst | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) rename docs/dev/{building => compile}/Compile.rst (97%) rename docs/dev/{building => compile}/Dependencies.rst (100%) rename docs/dev/{building => compile}/Options.rst (90%) rename docs/dev/{building => compile}/index.rst (69%) diff --git a/.gitignore b/.gitignore index a421d40ac..9b78fa31f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ # any build folders build*/ -!docs/dev/building/ nix buntu build/VC2010 diff --git a/docs/dev/building/Compile.rst b/docs/dev/compile/Compile.rst similarity index 97% rename from docs/dev/building/Compile.rst rename to docs/dev/compile/Compile.rst index 378ab6454..032eb7524 100644 --- a/docs/dev/building/Compile.rst +++ b/docs/dev/compile/Compile.rst @@ -89,8 +89,8 @@ assistance. All Platforms ============= Before you can compile the code you'll need to configure your build with cmake. Some IDEs can do this, -but from command line is the usual way to do this; thought the windows section below points out some -windows batch files that can be used to avoid opening a terminal/command-prompt. +but from command line is the usual way to do this; thought the Windows section below points out some +Windows batch files that can be used to avoid opening a terminal/command-prompt. You should seek cmake's documentation online or via ``cmake --help`` to see how the command works. See the `build-options` page for help finding the DFHack build options relevant to you. @@ -284,13 +284,13 @@ addition to the normal ``CC`` and ``CXX`` flags above:: export PATH=/usr/local/bin:$PATH -Docker -====== +Windows cross compiling from Linux +================================== .. highlight:: bash -You can use docker to build DFHack for windows. These instructions were developed -on a linux host system. +You can use docker to build DFHack for Windows. These instructions were developed +on a Linux host system. .. contents:: :local: @@ -326,7 +326,7 @@ container. Inside the container, run the following commands:: dfhack-make Inside the ``dfhack-*`` scripts there are several commands that set up the wine -server. Each invocation of a windows tool will cause wine to run in the container. +server. Each invocation of a Windows tool will cause wine to run in the container. Preloading the wineserver and telling it not to exit will speed configuration and compilation up considerably (approx. 10x). You can configure and build DFHack with regular ``cmake`` and ``ninja`` commands, but your build will go much slower. diff --git a/docs/dev/building/Dependencies.rst b/docs/dev/compile/Dependencies.rst similarity index 100% rename from docs/dev/building/Dependencies.rst rename to docs/dev/compile/Dependencies.rst diff --git a/docs/dev/building/Options.rst b/docs/dev/compile/Options.rst similarity index 90% rename from docs/dev/building/Options.rst rename to docs/dev/compile/Options.rst index 8de88a0e3..b314e9db2 100644 --- a/docs/dev/building/Options.rst +++ b/docs/dev/compile/Options.rst @@ -29,13 +29,13 @@ Typical usage may look like:: configuration utility ``ccmake``. Generator ---------- +========= For the uninitiated, the generator is what allows cmake to, of course, generate visual studio solution & project files, a makefile, or anything else. Your selection of generator comes down to preference and availability. Visual Studio -============= +------------- To generate visual studio project files, you'll need to select a particular version of visual studio, and match that to your system's generator list viewed with ``cmake --help`` @@ -44,7 +44,7 @@ example:: cmake .. -G "Visual Studio 17 2022" Ninja -===== +----- The generally preferred build system where available. example:: @@ -52,8 +52,8 @@ example:: cmake .. -G Ninja Install Location ----------------- -This of course uses the default cmake variable. +================ +This is the location where DFHack will be installed. Variable: ``CMAKE_INSTALL_PREFIX`` @@ -65,9 +65,9 @@ The path to df will of course depend on your system. If the directory exists it recommended to use ``~/.dwarffortress`` to avoid permission troubles. Build type ----------- -Release/Debug, this is the type of build you want. This controls what information -about symbols and line numbers the debugger will have available to it. +========== +This is the type of build you want. This controls what information about symbols and +line numbers the debugger will have available to it. Variable: ``CMAKE_BUILD_TYPE`` @@ -81,8 +81,9 @@ Options: * RelWithDebInfo Target architecture (32/64-bit) ---------------------------------------- -If need 32-bit binaries or are looking to be explicit about building 64-bit. +=============================== +You can set this if you need 32-bit binaries or are looking to be explicit about +building 64-bit. Variable: ``DFHACK_BUILD_ARCH`` @@ -96,7 +97,7 @@ Options: * '64' (default option) Library -------- +======= This will only be useful if you're looking to avoid building the library core, as it builds by default. Variable: ``BUILD_LIBRARY`` @@ -107,7 +108,7 @@ Usage:: cmake .. -DBUILD_LIBRARY=0 Testing -------- +======= Regression testing will be arriving in the future, but for now there are only tests written in lua. Variables: @@ -121,7 +122,7 @@ Usage:: cmake .. -DBUILD_TESTS=1 Plugins -------- +======= If you're doing plugin development. Variable: ``BUILD_PLUGINS`` @@ -134,7 +135,7 @@ Usage:: .. _building-documentation: Documentation -------------- +============= If you need to build documentation. Documentation can be built as HTML, and PDF, but there are also plain text files generated for in-game. diff --git a/docs/dev/building/index.rst b/docs/dev/compile/index.rst similarity index 69% rename from docs/dev/building/index.rst rename to docs/dev/compile/index.rst index 0a5758adf..0504bd8fb 100644 --- a/docs/dev/building/index.rst +++ b/docs/dev/compile/index.rst @@ -9,6 +9,6 @@ Those seeking to compile the source code for DFHack, and or plugins, can refer t .. toctree:: :maxdepth: 2 - /docs/dev/building/Dependencies - /docs/dev/building/Compile - /docs/dev/building/Options + /docs/dev/compile/Dependencies + /docs/dev/compile/Compile + /docs/dev/compile/Options diff --git a/docs/dev/index.rst b/docs/dev/index.rst index c96024055..01436033c 100644 --- a/docs/dev/index.rst +++ b/docs/dev/index.rst @@ -10,7 +10,7 @@ These are pages relevant to people developing for DFHack. :maxdepth: 1 /docs/dev/Dev-intro - /docs/dev/building/index + /docs/dev/compile/index /docs/dev/Contributing /docs/dev/Documentation /docs/api/index