From cb86f5299366afeb85cd12a8f4bce76f051d0699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 13 Mar 2011 19:38:32 +0100 Subject: [PATCH] minor liquids bugfix, added typedef for planecoord so that stonesense builds. Build system bits. Doxygen bits. --- CMakeLists.txt | 1 + COMPILE.rst | 131 ++++++++++++++++++ Compile.html | 184 +++++++++++++++++++++++--- README.rst | 134 +------------------ Readme.html | 145 +------------------- build/auto.bat | 5 + build/buildremote.expect | 39 ++++++ build/linux-MSVC-2008.sh | 49 +++++++ build/linux-remote-MSVC-2008.sh | 20 +++ doc/CMakeLists.txt | 3 +- doc/Doxyfile.in | 10 +- doc/index.dxgen | 2 +- library/include/dfhack/modules/Maps.h | 10 ++ output/doxygen/.keep | 0 tools/supported/liquids.cpp | 6 +- 15 files changed, 438 insertions(+), 301 deletions(-) create mode 100644 build/auto.bat create mode 100644 build/buildremote.expect create mode 100755 build/linux-MSVC-2008.sh create mode 100755 build/linux-remote-MSVC-2008.sh create mode 100644 output/doxygen/.keep diff --git a/CMakeLists.txt b/CMakeLists.txt index e03a5727a..e4f4a0c5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ ENDIF(NOT DEFINED CMAKE_BUILD_TYPE) SET( LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack library" ) SET( EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack tools" ) SET( DATA_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack data (offset files)" ) +SET( DOXYGEN_OUTPUT_DIR ${CMAKE_SOURCE_DIR}/output/doxygen CACHE PATH "Output directory for doxygen") OPTION(BUILD_DFHACK_DOCUMENTATION "Create doxygen documentation for developers" OFF) OPTION(BUILD_DFHACK_EXAMPLES "Build example tools" OFF) diff --git a/COMPILE.rst b/COMPILE.rst index 8e1ec2645..45e1972be 100644 --- a/COMPILE.rst +++ b/COMPILE.rst @@ -26,6 +26,16 @@ is simple. Enter the build folder, run the tools. Like this:: make This will build the library and its tools and place them in ``/output``. + +Alternatively, you can use ccmake instead of cmake: + + cd build + ccmake .. + make + +This will show a curses-based interface that lets you set all of the +extra options. + You can also use a cmake-friendly IDE like KDevelop 4 or the cmake GUI program. @@ -133,3 +143,124 @@ Valid an useful build types include 'Release', 'Debug' and 'RelWithDebInfo'. There are others, but they aren't really that useful. Have fun. + +================================ +Using the library as a developer +================================ +DFHack is using the zlib/libpng license. This makes it easy to link to +it, use it in-source or add your own extensions. Contributing back to +the dfhack repository is welcome and the right thing to do :) + +Rudimentary API documentation can be built using doxygen. + +Contributing to DFHack +====================== + +Several things should be kept in mind when contributing to DFHack. + +------------ +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 +------------------------------- +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. + +Fixes are higher in priority. If you want to work on something, but +don't know what, check out http://github.com/peterix/dfhack/issues -- +this is also a good place to dump new ideas and/or bugs that need +fixing. + +---------------- +Layout for tools +---------------- +Tools live in the tools/ folder. There, they are split into three +categories. + +distributed + these tools get distributed with binary releases and are installed + by doing 'make install' on linux. They are supposed to be stable + and supported. Experimental, useless, buggy or untested stuff + doesn't belong here. +examples + examples are tools that aren't very useful, but show how DF and + DFHack work. They should use only DFHack API functions. No actual + hacking or 'magic offsets' are allowed. +playground + This is a catch-all folder for tools that aren't ready to be + examples or be distributed in binary releases. All new tools should + start here. They can contain actual hacking, magic values and other + nasty business. + +------------------------ +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 +generally written in C++. It is exposed to the users of DFHack. + +Server side is used inside DF and serves to accelerate the client +modules. This is written mostly in C style. + +There's a Core module that shouldn't be changed, because it defines the +basic commands like reading and writing raw data. The client parts for +the Core module are the various implementations of the Process +interface. + +A good example of a module is Maps. Named the same in both client and +server, it allows accelerating the reading of map blocks. + +Communication between modules happens by using shared memory. This is +pretty fast, but needs quite a bit of care to not break. + +------------ +Dependencies +------------ +Internal + either part of the codebase or statically linked. +External + linked as dynamic loaded libraries (.dll, .so, etc.) + +If you want to add dependencies, think twice about it. All internal +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 +----------------------------- +tinyxml + used by core dfhack to read offset definitions from Memory.xml +md5 + an implementation of the MD5 hash algorithm. Used for identifying + DF binaries on Linux. +argstream + Allows reading terminal application arguments. GPL! + +Current external dependencies +----------------------------- +wide-character ncurses + used for the veinlook tool on Linux. +x11 libraries + used for sending key events on linux + +Build-time dependencies +----------------------- +cmake + you need cmake to generate the build system and some configuration + headers + +========================= +Memory offset definitions +========================= +The files with memory offset definitions used by dfhack can be found in the +data folder. + diff --git a/Compile.html b/Compile.html index b4a252ccb..8e91e15f2 100644 --- a/Compile.html +++ b/Compile.html @@ -312,28 +312,49 @@ ul.auto-toc {

Compiling DFHACK

-

Here's how you build dfhack!

+
+

Here's how you build dfhack!

-

Dependencies

+

Dependencies

  • cmake
  • A compiler for building the main lib and the various tools.
  • @@ -342,7 +363,7 @@ ul.auto-toc {
-

Building on Linux

+

Building on Linux

To run in the output folder (without installing) building the library is simple. Enter the build folder, run the tools. Like this:

@@ -350,8 +371,15 @@ cd build
 cmake .. -DCMAKE_BUILD_TYPE:string=Release
 make
 
-

This will build the library and its tools and place them in /output. -You can also use a cmake-friendly IDE like KDevelop 4 or the cmake GUI +

This will build the library and its tools and place them in /output.

+

Alternatively, you can use ccmake instead of cmake:

+
+cd build +ccmake .. +make
+

This will show a curses-based interface that lets you set all of the +extra options.

+

You can also use a cmake-friendly IDE like KDevelop 4 or the cmake GUI program.

To be installed into the system or packaged:

@@ -370,19 +398,19 @@ make install
 
 
-

Building on Windows

+

Building on Windows

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 thing.

-

Using mingw

+

Using mingw

You also need a compiler. I build dfhack using mingw. You can get it from the mingw site: http://www.mingw.org/

Get the automated installer, it will download newest version of mingw and set things up nicely.

You'll have to add C:\MinGW\ to your PATH variable.

-

Building

+

Building

open up cmd and navigate to the dfhack\build folder, run cmake and the mingw version of make:

@@ -393,7 +421,7 @@ mingw32-make
 
-

Using MSVC

+

Using MSVC

open up cmd and navigate to the dfhack\build folder, run cmake:

@@ -410,14 +438,14 @@ by changing cmake configs and running cmake on
 
-

Using some other compiler

+

Using some other compiler

I'm afraid you are on your own. dfhack wasn't tested with any other compiler.

Try using a different cmake generator that's intended for your tools.

-

Build targets

+

Build targets

dfhack has a few build targets:

  • If you're only after the library run make dfhack.

    @@ -443,7 +471,7 @@ cmake .. -DBUILD_DFHACK_EXAMPLES=ON
-

Build types

+

Build types

cmake allows you to pick a build type by changing this variable: CMAKE_BUILD_TYPE

@@ -456,5 +484,119 @@ cmake .. -DCMAKE_BUILD_TYPE:string=BUILD_TYPE
 

Have fun.

+
+

Using the library as a developer

+

DFHack is using the zlib/libpng license. This makes it easy to link to +it, use it in-source or add your own extensions. Contributing back to +the dfhack repository is welcome and the right thing to do :)

+

Rudimentary API documentation can be built using doxygen.

+
+

Contributing to DFHack

+

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

+
+

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

+

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.

+

Fixes are higher in priority. If you want to work on something, but +don't know what, check out http://github.com/peterix/dfhack/issues -- +this is also a good place to dump new ideas and/or bugs that need +fixing.

+
+
+

Layout for tools

+

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

+
+
distributed
+
these tools get distributed with binary releases and are installed +by doing 'make install' on linux. They are supposed to be stable +and supported. Experimental, useless, buggy or untested stuff +doesn't belong here.
+
examples
+
examples are tools that aren't very useful, but show how DF and +DFHack work. They should use only DFHack API functions. No actual +hacking or 'magic offsets' are allowed.
+
playground
+
This is a catch-all folder for tools that aren't ready to be +examples or be distributed in binary releases. All new tools should +start here. They can contain actual hacking, magic values and other +nasty business.
+
+
+
+

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 +generally written in C++. It is exposed to the users of DFHack.

+

Server side is used inside DF and serves to accelerate the client +modules. This is written mostly in C style.

+

There's a Core module that shouldn't be changed, because it defines the +basic commands like reading and writing raw data. The client parts for +the Core module are the various implementations of the Process +interface.

+

A good example of a module is Maps. Named the same in both client and +server, it allows accelerating the reading of map blocks.

+

Communication between modules happens by using shared memory. This is +pretty fast, but needs quite a bit of care to not break.

+
+
+

Dependencies

+
+
Internal
+
either part of the codebase or statically linked.
+
External
+
linked as dynamic loaded libraries (.dll, .so, etc.)
+
+

If you want to add dependencies, think twice about it. All internal +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

+
+
tinyxml
+
used by core dfhack to read offset definitions from Memory.xml
+
md5
+
an implementation of the MD5 hash algorithm. Used for identifying +DF binaries on Linux.
+
argstream
+
Allows reading terminal application arguments. GPL!
+
+
+
+

Current external dependencies

+
+
wide-character ncurses
+
used for the veinlook tool on Linux.
+
x11 libraries
+
used for sending key events on linux
+
+
+
+

Build-time dependencies

+
+
cmake
+
you need cmake to generate the build system and some configuration +headers
+
+
+
+
+
+
+

Memory offset definitions

+

The files with memory offset definitions used by dfhack can be found in the +data folder.

+
+ diff --git a/README.rst b/README.rst index 4e31a115c..5d980df29 100644 --- a/README.rst +++ b/README.rst @@ -45,12 +45,17 @@ Windows fix it :) 0.31.01 - 0.31.03 legacy + 0.31.04 - 0.31.21 SDL -There are missing offsets but Map tools should be OK. Wait for updates... + +You need have the MSVC 2010 redistributable_ package installed! The tools will fail to run otherwise. + +.. _redistributable: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84 Linux ===== 0.31.05 - 0.31.19 native. + There are missing offsets but Map tools should be OK. Linux support is a bit lacking, I'm working on it. Slowly. All supported Windows versions running in wine can be used with native DFHack binaries. @@ -150,130 +155,3 @@ I take no responsibility of anything that happens as a result of using this tool Your tool here ============== Write one ;) - -================================ -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. - -DFHack is using the zlib/libpng license. This makes it easy to link to -it, use it in-source or add your own extensions. Contributing back to -the dfhack repository is welcome and the right thing to do :) - -At the time of writing there's no API reference or documentation. The -code does have a lot of comments though (and getting better all the -time). - -Contributing to DFHack -====================== - -Several things should be kept in mind when contributing to DFHack. - ------------- -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 -------------------------------- -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. - -Fixes are higher in priority. If you want to work on something, but -don't know what, check out http://github.com/peterix/dfhack/issues -- -this is also a good place to dump new ideas and/or bugs that need -fixing. - ----------------- -Layout for tools ----------------- -Tools live in the tools/ folder. There, they are split into three -categories. - -distributed - these tools get distributed with binary releases and are installed - by doing 'make install' on linux. They are supposed to be stable - and supported. Experimental, useless, buggy or untested stuff - doesn't belong here. -examples - examples are tools that aren't very useful, but show how DF and - DFHack work. They should use only DFHack API functions. No actual - hacking or 'magic offsets' are allowed. -playground - This is a catch-all folder for tools that aren't ready to be - examples or be distributed in binary releases. All new tools should - start here. They can contain actual hacking, magic values and other - nasty business. - ------------------------- -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 -generally written in C++. It is exposed to the users of DFHack. - -Server side is used inside DF and serves to accelerate the client -modules. This is written mostly in C style. - -There's a Core module that shouldn't be changed, because it defines the -basic commands like reading and writing raw data. The client parts for -the Core module are the various implementations of the Process -interface. - -A good example of a module is Maps. Named the same in both client and -server, it allows accelerating the reading of map blocks. - -Communication between modules happens by using shared memory. This is -pretty fast, but needs quite a bit of care to not break. - ------------- -Dependencies ------------- -Internal - either part of the codebase or statically linked. -External - linked as dynamic loaded libraries (.dll, .so, etc.) - -If you want to add dependencies, think twice about it. All internal -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 ------------------------------ -tinyxml - used by core dfhack to read offset definitions from Memory.xml -md5 - an implementation of the MD5 hash algorithm. Used for identifying - DF binaries on Linux. -argstream - Allows reading terminal application arguments. GPL! - -Current external dependencies ------------------------------ -wide-character ncurses - used for the veinlook tool on Linux. -x11 libraries - used for sending key events on linux - -Build-time dependencies ------------------------ -cmake - you need cmake to generate the build system and some configuration - headers - -========================= -Memory offset definitions -========================= -The files with memory offset definitions used by dfhack can be found in the -data folder. - diff --git a/Readme.html b/Readme.html index 0c8c7af3c..670d13f12 100644 --- a/Readme.html +++ b/Readme.html @@ -353,23 +353,6 @@ allow for easier development of new tools.

  • Your tool here
  • -
  • Using the library as a developer -
  • -
  • Memory offset definitions
  • @@ -397,14 +380,14 @@ in AUR and the arch-games repository.

    functionality. If you know how to easily suspend processes, you can fix it :)

    -

    0.31.01 - 0.31.03 legacy -0.31.04 - 0.31.21 SDL -There are missing offsets but Map tools should be OK. Wait for updates...

    +

    0.31.01 - 0.31.03 legacy

    +

    0.31.04 - 0.31.21 SDL

    +

    You need have the MSVC 2010 redistributable package installed! The tools will fail to run otherwise.

    Linux

    -

    0.31.05 - 0.31.19 native. -There are missing offsets but Map tools should be OK. Linux support is +

    0.31.05 - 0.31.19 native.

    +

    There are missing offsets but Map tools should be OK. Linux support is a bit lacking, I'm working on it. Slowly. All supported Windows versions running in wine can be used with native DFHack binaries.

    @@ -503,124 +486,6 @@ You just lost a fortress and gained an adventurer.

    Write one ;)

    -
    -

    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.

    -

    DFHack is using the zlib/libpng license. This makes it easy to link to -it, use it in-source or add your own extensions. Contributing back to -the dfhack repository is welcome and the right thing to do :)

    -

    At the time of writing there's no API reference or documentation. The -code does have a lot of comments though (and getting better all the -time).

    -
    -

    Contributing to DFHack

    -

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

    -
    -

    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

    -

    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.

    -

    Fixes are higher in priority. If you want to work on something, but -don't know what, check out http://github.com/peterix/dfhack/issues -- -this is also a good place to dump new ideas and/or bugs that need -fixing.

    -
    -
    -

    Layout for tools

    -

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

    -
    -
    distributed
    -
    these tools get distributed with binary releases and are installed -by doing 'make install' on linux. They are supposed to be stable -and supported. Experimental, useless, buggy or untested stuff -doesn't belong here.
    -
    examples
    -
    examples are tools that aren't very useful, but show how DF and -DFHack work. They should use only DFHack API functions. No actual -hacking or 'magic offsets' are allowed.
    -
    playground
    -
    This is a catch-all folder for tools that aren't ready to be -examples or be distributed in binary releases. All new tools should -start here. They can contain actual hacking, magic values and other -nasty business.
    -
    -
    -
    -

    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 -generally written in C++. It is exposed to the users of DFHack.

    -

    Server side is used inside DF and serves to accelerate the client -modules. This is written mostly in C style.

    -

    There's a Core module that shouldn't be changed, because it defines the -basic commands like reading and writing raw data. The client parts for -the Core module are the various implementations of the Process -interface.

    -

    A good example of a module is Maps. Named the same in both client and -server, it allows accelerating the reading of map blocks.

    -

    Communication between modules happens by using shared memory. This is -pretty fast, but needs quite a bit of care to not break.

    -
    -
    -

    Dependencies

    -
    -
    Internal
    -
    either part of the codebase or statically linked.
    -
    External
    -
    linked as dynamic loaded libraries (.dll, .so, etc.)
    -
    -

    If you want to add dependencies, think twice about it. All internal -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

    -
    -
    tinyxml
    -
    used by core dfhack to read offset definitions from Memory.xml
    -
    md5
    -
    an implementation of the MD5 hash algorithm. Used for identifying -DF binaries on Linux.
    -
    argstream
    -
    Allows reading terminal application arguments. GPL!
    -
    -
    -
    -

    Current external dependencies

    -
    -
    wide-character ncurses
    -
    used for the veinlook tool on Linux.
    -
    x11 libraries
    -
    used for sending key events on linux
    -
    -
    -
    -

    Build-time dependencies

    -
    -
    cmake
    -
    you need cmake to generate the build system and some configuration -headers
    -
    -
    -
    -
    -
    -
    -

    Memory offset definitions

    -

    The files with memory offset definitions used by dfhack can be found in the -data folder.

    -
    diff --git a/build/auto.bat b/build/auto.bat new file mode 100644 index 000000000..6ce36433a --- /dev/null +++ b/build/auto.bat @@ -0,0 +1,5 @@ +mkdir build-real +cd build-real +cmake ..\.. -G"Visual Studio 10" +msbuild ALL_BUILD.vcxproj /p:Configuration=Release +echo FINISHED_BUILD \ No newline at end of file diff --git a/build/buildremote.expect b/build/buildremote.expect new file mode 100644 index 000000000..4b5b6425b --- /dev/null +++ b/build/buildremote.expect @@ -0,0 +1,39 @@ +#!/usr/bin/expect +# procedure to attempt connecting; result 0 if OK, 1 otherwise +proc connect {} { + expect "login:" + send "kitteh\r" + expect "password:" + send "a\r" +expect { + kitteh {return 0} + failed return 1 + "invalid password" return 1 + timeout return 1 + connected +} + # timed out + return 1 +} + +spawn telnet win7 + +set rez [connect] +if { $rez == 0 } { + send "net use X: \\\\vboxsvr\\projects\r\n" + expect "The command completed successfully." + send "X:\r\n" + expect "X:" + send "cd X:\\dfhack\\build\r\n" + expect "build" + send "\"C:\\Program Files (x86)\\MSVC10\\VC\\vcvarsall.bat\" x86\r\n" + expect "build" + set timeout -1 + send "auto.bat\r\n" + expect "FINISHED_BUILD" + send "exit\r" + expect eof + exit 0 +} +puts "\nError connecting to server!\n" +exit 1 diff --git a/build/linux-MSVC-2008.sh b/build/linux-MSVC-2008.sh new file mode 100755 index 000000000..d953de5f8 --- /dev/null +++ b/build/linux-MSVC-2008.sh @@ -0,0 +1,49 @@ +#/bin/sh + +# VARS +export WINEARCH=win32 +export WINEPREFIX=$HOME/.wine-mscv/ +export WINEDEBUG=-all +export DFHACK_VER=0.5.6 +export PKG=dfhack-bin-$DFHACK_VER +export VCBUILD="/home/peterix/.wine-mscv/drive_c/Program Files/Microsoft Visual Studio 9.0/VC/vcpackages/vcbuild.exe" +export TARGET=Release +export PROJECTS="library\\dfhack.vcproj +tools\\supported\\dfattachtest.vcproj +tools\\supported\\dfautosearch.vcproj +tools\\supported\\dfcleanmap.vcproj +tools\\supported\\dfcleartask.vcproj +tools\\supported\\dfdoffsets.vcproj +tools\\supported\\dfexpbench.vcproj +tools\\supported\\dfflows.vcproj +tools\\supported\\dfincremental.vcproj +tools\\supported\\dfliquids.vcproj +tools\\supported\\dfmode.vcproj +tools\\supported\\dfpause.vcproj +tools\\supported\\dfposition.vcproj +tools\\supported\\dfprobe.vcproj +tools\\supported\\dfprospector.vcproj +tools\\supported\\dfreveal.vcproj +tools\\supported\\dfsuspend.vcproj +tools\\supported\\dfunstuck.vcproj +tools\\supported\\dfvdig.vcproj +tools\\supported\\dfweather.vcproj" + +# let's build it all +rm -r build-real +mkdir build-real +cd build-real +wine cmake ..\\.. -G"Visual Studio 9 2008" +for proj in $PROJECTS +do +wine "$VCBUILD" $proj $TARGET +done + +echo "Creating package..." +cd ../../output/$TARGET +rm -r $PKG +rm $PKG.zip +mkdir $PKG +mv *.exe *.dll *.html *.txt *.xml $PKG +zip -r $PKG.zip $PKG +echo "DONE" \ No newline at end of file diff --git a/build/linux-remote-MSVC-2008.sh b/build/linux-remote-MSVC-2008.sh new file mode 100755 index 000000000..274436e5d --- /dev/null +++ b/build/linux-remote-MSVC-2008.sh @@ -0,0 +1,20 @@ +#/bin/sh + +# VARS +export DFHACK_VER=0.5.6 +export PKG=dfhack-bin-$DFHACK_VER +export TARGET=Release + +# let's build it all +VBoxManage startvm "7 Prof" +sleep 5 +expect buildremote.expect $TARGET + +echo "Creating package..." +cd ../output/$TARGET +rm -r $PKG +rm $PKG.zip +mkdir $PKG +mv *.exe *.dll *.html *.txt *.xml $PKG +zip -r $PKG.zip $PKG +echo "DONE" \ No newline at end of file diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index c1f2cdaca..7f569fc27 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -47,7 +47,6 @@ IF(DOXYGEN_FOUND) # "${CMAKE_SOURCE_DIR}/library/private" ) - SET(DOXYGEN_OUTPUT_DIR html) STRING(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${DOXYGEN_SOURCE_DIR}") CONFIGURE_FILE(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) @@ -57,7 +56,7 @@ IF(DOXYGEN_FOUND) /usr/bin/doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) - INSTALL( DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "/usr/share/doc/dfhack-${DFHACK_VERSION}" ) + # INSTALL( DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "/usr/share/doc/dfhack-${DFHACK_VERSION}" ) ELSE(DOXYGEN_FOUND) MESSAGE (FATAL_ERROR "doxygen binary couldn't be found") diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 4d62b0a17..64cb1a4de 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -38,7 +38,7 @@ PROJECT_NUMBER = @DFHACK_VERSION@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = . +OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT_DIR@ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -60,7 +60,7 @@ CREATE_SUBDIRS = NO # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. -OUTPUT_LANGUAGE = English +OUTPUT_LANGUAGE = @DOXYGEN_LANGUAGE@ # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in @@ -225,7 +225,7 @@ EXTENSION_MAPPING = # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. -BUILTIN_STL_SUPPORT = NO +BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. @@ -521,7 +521,7 @@ LAYOUT_FILE = # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. -QUIET = NO +QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank @@ -775,7 +775,7 @@ GENERATE_HTML = YES # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. -HTML_OUTPUT = html +HTML_OUTPUT = . # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank diff --git a/doc/index.dxgen b/doc/index.dxgen index d356131f6..2a2a29084 100644 --- a/doc/index.dxgen +++ b/doc/index.dxgen @@ -51,7 +51,7 @@ PLACEHOLDER TERRITORY! Second part has some details on DFHack development: The third part describes how to use the supported DFHack utilities diff --git a/library/include/dfhack/modules/Maps.h b/library/include/dfhack/modules/Maps.h index 47a61c115..17d2d8c74 100644 --- a/library/include/dfhack/modules/Maps.h +++ b/library/include/dfhack/modules/Maps.h @@ -65,16 +65,26 @@ namespace DFHack // x,y,z share the same space with comparate. comparate can be used for fast comparisons union { + // new shiny DFCoord struct. notice the ludicrous space for Z-levels struct { uint16_t x; uint16_t y; uint32_t z; }; + // old planeccord struct for compatibility + struct + { + uint16_t x; + uint16_t y; + } dim; + // comparing thing uint64_t comparate; }; }; + typedef DFCoord planecoord; + struct t_feature { e_feature type; diff --git a/output/doxygen/.keep b/output/doxygen/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/tools/supported/liquids.cpp b/tools/supported/liquids.cpp index 2efa2f5ff..7fa2b96ca 100644 --- a/tools/supported/liquids.cpp +++ b/tools/supported/liquids.cpp @@ -1,5 +1,3 @@ -// TO BE DEPRECATED SOON. - #include #include #include @@ -20,7 +18,7 @@ public: virtual coord_vec points(MapCache & mc,DFHack::DFCoord start) = 0; }; /** - * generic 2D rectangle brush. you can specify the dimensions of + * generic 3D rectangle brush. you can specify the dimensions of * the rectangle and optionally which tile is its 'center' */ class RectangleBrush : public Brush @@ -37,7 +35,7 @@ public: else cy_ = centery; if(centerz == -1) - cz_ = y/2; + cz_ = z/2; else cz_ = centerz; x_ = x;