From 2a6058a971e5ca18b31235c309584ba70b9ef431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 9 Aug 2010 23:56:28 +0200 Subject: [PATCH 1/3] Remove batch scripts for ancient MSVC versions --- build/generate-MSVC-2002.bat | 4 ---- build/generate-MSVC-2003.bat | 4 ---- 2 files changed, 8 deletions(-) delete mode 100644 build/generate-MSVC-2002.bat delete mode 100644 build/generate-MSVC-2003.bat diff --git a/build/generate-MSVC-2002.bat b/build/generate-MSVC-2002.bat deleted file mode 100644 index 4f6b68065..000000000 --- a/build/generate-MSVC-2002.bat +++ /dev/null @@ -1,4 +0,0 @@ -mkdir build-real -cd build-real -cmake ..\.. -G"Visual Studio 7" -pause \ No newline at end of file diff --git a/build/generate-MSVC-2003.bat b/build/generate-MSVC-2003.bat deleted file mode 100644 index c45e02e4f..000000000 --- a/build/generate-MSVC-2003.bat +++ /dev/null @@ -1,4 +0,0 @@ -mkdir build-real -cd build-real -cmake ..\.. -G"Visual Studio 7 .NET 2003" -pause \ No newline at end of file From 7aeafa01c9c1b16b96742826f7dbad5b6211e8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 10 Aug 2010 00:30:52 +0200 Subject: [PATCH 2/3] Move offset dumper and position tool to tools/supported. --- tools/examples/CMakeLists.txt | 5 ----- tools/playground/CMakeLists.txt | 5 ----- tools/supported/CMakeLists.txt | 10 ++++++++++ tools/{playground => supported}/dumpoffsets.cpp | 0 tools/{examples => supported}/position.cpp | 0 5 files changed, 10 insertions(+), 10 deletions(-) rename tools/{playground => supported}/dumpoffsets.cpp (100%) rename tools/{examples => supported}/position.cpp (100%) diff --git a/tools/examples/CMakeLists.txt b/tools/examples/CMakeLists.txt index ed2449c16..05d03e3d8 100644 --- a/tools/examples/CMakeLists.txt +++ b/tools/examples/CMakeLists.txt @@ -24,10 +24,6 @@ TARGET_LINK_LIBRARIES(dfcreaturedump dfhack) ADD_EXECUTABLE(dfmaterialtest materialtest.cpp) TARGET_LINK_LIBRARIES(dfmaterialtest dfhack) -# position - check the DF window and cursor parameters -ADD_EXECUTABLE(dfposition position.cpp) -TARGET_LINK_LIBRARIES(dfposition dfhack) - # itemdump - dump the item under the cursor ADD_EXECUTABLE(dfitemdump dfitemdump.cpp) TARGET_LINK_LIBRARIES(dfitemdump dfhack) @@ -59,7 +55,6 @@ dfbuildingsdump dfconstructiondump dfcreaturedump dfmaterialtest -dfposition dfitemdump dfhotkeynotedump dftreedump diff --git a/tools/playground/CMakeLists.txt b/tools/playground/CMakeLists.txt index 06a586c42..a799c7765 100644 --- a/tools/playground/CMakeLists.txt +++ b/tools/playground/CMakeLists.txt @@ -16,10 +16,6 @@ TARGET_LINK_LIBRARIES(dfmoodump dfhack) ADD_EXECUTABLE(dftest test.cpp) TARGET_LINK_LIBRARIES(dftest dfhack) -# just dump offsets of the current version -ADD_EXECUTABLE(dfdoffsets dumpoffsets.cpp) -TARGET_LINK_LIBRARIES(dfdoffsets dfhack) - # bauxite - turn all mechanisms into bauxite mechanisms # Author: Alex Legg #ADD_EXECUTABLE(dfbauxite dfbauxite.cpp) @@ -67,7 +63,6 @@ TARGET_LINK_LIBRARIES(dfcatsplosion dfhack) install(TARGETS dfmoodump dftest -dfdoffsets dfdigger dfdigger2 dfcatsplosion diff --git a/tools/supported/CMakeLists.txt b/tools/supported/CMakeLists.txt index 62100b52e..0a0d93f68 100644 --- a/tools/supported/CMakeLists.txt +++ b/tools/supported/CMakeLists.txt @@ -51,6 +51,14 @@ TARGET_LINK_LIBRARIES(dfflows dfhack) ADD_EXECUTABLE(dfliquids liquids.cpp) TARGET_LINK_LIBRARIES(dfliquids dfhack) +# position - check the DF window and cursor parameters +ADD_EXECUTABLE(dfposition position.cpp) +TARGET_LINK_LIBRARIES(dfposition dfhack) + +# just dump offsets of the current version +ADD_EXECUTABLE(dfdoffsets dumpoffsets.cpp) +TARGET_LINK_LIBRARIES(dfdoffsets dfhack) + IF(UNIX) SET(CURSES_NEED_WIDE "YES") SET(CURSES_NEED_NCURSES "NO") @@ -89,10 +97,12 @@ ENDIF(UNIX) install(TARGETS dfreveal dfprospector +dfposition dfvdig dfcleanmap dfunstuck dfprobe +dfdoffsets dfattachtest dfexpbench dfsuspend diff --git a/tools/playground/dumpoffsets.cpp b/tools/supported/dumpoffsets.cpp similarity index 100% rename from tools/playground/dumpoffsets.cpp rename to tools/supported/dumpoffsets.cpp diff --git a/tools/examples/position.cpp b/tools/supported/position.cpp similarity index 100% rename from tools/examples/position.cpp rename to tools/supported/position.cpp From dac7e45a4474e7f32872e73c3ab0c5db4f071076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 10 Aug 2010 01:21:47 +0200 Subject: [PATCH 3/3] Fix Readme and Compile documents. --- COMPILE.rst | 11 ++++++ Compile.html | 26 ++++++++++--- README.rst | 26 ++++++++----- Readme.html | 108 ++++++++++++++++++++++++++++----------------------- 4 files changed, 108 insertions(+), 63 deletions(-) diff --git a/COMPILE.rst b/COMPILE.rst index 82544b9d4..bb5bc1e3a 100644 --- a/COMPILE.rst +++ b/COMPILE.rst @@ -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 =========== diff --git a/Compile.html b/Compile.html index 1e4180548..06ab65b9d 100644 --- a/Compile.html +++ b/Compile.html @@ -425,11 +425,27 @@ compiler.

Build targets

dfhack has a few build targets:

-
    -
  • If you're only after the library run make dfhack.
  • -
  • make will build everything.
  • -
  • make expbench will build the expbench testing program and the -library.
  • +
      +
    • If you're only after the library run make dfhack.

      +
    • +
    • 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
      +
      +
diff --git a/README.rst b/README.rst index bbeb7c3db..c57396c8c 100644 --- a/README.rst +++ b/README.rst @@ -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 ;) diff --git a/Readme.html b/Readme.html index f7c3417b4..3b28d8c61 100644 --- a/Readme.html +++ b/Readme.html @@ -335,35 +335,37 @@ allow for easier development of new tools.

  • Tools
  • -
  • Using the library as a developer
  • @@ -399,7 +401,7 @@ fix it :)

    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.

    @@ -412,12 +414,8 @@ be useful and are cross-platform just like the library itself.

    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

    +

    dfliquids

    A command prompt for liquid creation and manipulation (the Moses effect included!) Also allows painting obsidian walls directly.

    @@ -427,44 +425,56 @@ temperatures (creating heat traps). You've been warned.

    -

    dfposition

    +

    dfposition

    Prints the current DF window properties and cursor position.

    -

    dfprospector

    +

    dfprospector

    Lists all available minerals on the map and how much of them there is.

    -

    dfreveal

    +

    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

    +

    dfunstuck

    Use if you prematurely close any of the tools and DF appears to be stuck.

    -

    dfvdig

    +

    dfvdig

    Designates a whole vein for digging. Point the cursor at a vein and run this thing :)

    -

    dfflows

    +

    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.

    +
    -

    Using the library as a developer

    +

    Using the library as a developer

    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.

    @@ -475,17 +485,17 @@ the dfhack repository is welcome and the right thing to do :)

    code does have a lot of comments though (and getting better all the time).

    -

    Contributing to DFHack

    +

    Contributing to DFHack

    Several things should be kept in mind when contributing to DFHack.

    -

    Coding style

    +

    Coding style

    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 ;)

    -

    How to get new code into DFHack

    +

    How to get new code into DFHack

    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.

    @@ -495,7 +505,7 @@ this is also a good place to dump new ideas and/or bugs that need fixing.

    -

    Layout for tools

    +

    Layout for tools

    Tools live in the tools/ folder. There, they are split into three categories.

    @@ -516,7 +526,7 @@ nasty business.
    -

    Modules - what are they?

    +

    Modules - what are they?

    DFHack uses modules to partition sets of features into manageable chunks. A module can have both client and server side.

    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.

    pretty fast, but needs quite a bit of care to not break.

    -

    Dependencies

    +

    Dependencies

    Internal
    either part of the codebase or statically linked.
    @@ -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.

    -

    Current internal dependencies

    +

    Current internal dependencies

    tinyxml
    used by core dfhack to read offset definitions from Memory.xml
    @@ -557,7 +567,7 @@ DF binaries on Linux.
    -

    Current external dependencies

    +

    Current external dependencies

    wide-character ncurses
    used for the veinlook tool on Linux.
    @@ -566,7 +576,7 @@ DF binaries on Linux.
    -

    Build-time dependencies

    +

    Build-time dependencies

    cmake
    you need cmake to generate the build system and some configuration @@ -577,7 +587,7 @@ headers
    -

    Memory offset definitions

    +

    Memory offset definitions

    The file with memory offset definitions used by dfhack can be found in the output folder.