PDA

View Full Version : How to build KeeperFX pre-release SVN from scratch ?



Chr!x
February 14th, 2011, 23:09
Hi !

Does anybody can help me to compile KeeperFX pre-release from official SVN, and from scratch ? Which tools may I install ? How to do ?

My goal is writing a complete tutorial for helping everybody having interest in KeeperFX development.

Thanks for help me.

Regards.

mefistotelis
February 15th, 2011, 06:40
Good idea.

1. Downloading repository - you may use the console tools, or some GUI, ie. TortoiseSVN. Developers would probably prefer Eclipse CDT, which has SVN plugin, but you must install it from inside eclipse - it's called Subversive.

2. Install libraries.
I think you only need MinGW - http://sourceforge.net/projects/mingw/files/
It would be nice to also install some UNIX utilities pack. A single compilation doesn't need this (I think), but they're quite useful; I may use them in the future. Also, they are used to "make clean".
There are many packs of GNU utilities; just decompress them somewhere (the good practice is to keep them in "bin" subfolder) and make sure PATH system variable contains the folder, so that every application can find these utilities.
You may even place them in the same place where MinGW is (just don't replace duplicates).
Such packs are: http://gnuwin32.sourceforge.net/ or http://unxutils.sourceforge.net/

When everything is installed and in PATH variable, just open command line in KeeperFX source folder (where Makefile is) and type "mingw32-make all". If you wish to build the debug executable, use "mingw32-make debug". But remember - between making standard version and debug one, you should run ""mingw32-make clean" - otherwise the produced EXE will be half-debug.

Summary of the make commands:
all - compile standard version EXE. Result is in BIN folder.
debug - compile debug version EXE. Result is in BIN folder.
clean - remove half-compiled files from previous execution.
docs - create code documentation for developers (requires doxygen installed)

Chr!x
February 15th, 2011, 13:38
Thanks for reply mefistotelis :)

Another question : if I follow your instructions, I'll obly get a new .EXE, it's right ? How to get a complete KeeperFX CCP distrib ?

mefistotelis
February 15th, 2011, 14:55
You'll get EXE and DLL.

There are no data files on SVN, so the only way to get complete release is to download "complete version" and replace files there. You can replace campaign configs and level scripts with those from "campgns" folder, and other config files with those from "config" folder.

Note that level scripts for original campaign (which should be placed in "levels" folder) are stored on SVN in "campgns/keeporig". Other files and folders (content of "campgns" and "config") are easy to match.

Chr!x
February 15th, 2011, 20:15
Perfect. It's works :)

Note : MinGW need C++ lib selected for compiling properly KeeperFX.

I get these files inside /bin :

15/02/2011 21:03 1*521*152 keeperfx.dll
15/02/2011 21:03 2*497*281 keeperfx.exe
15/02/2011 21:03 1*641*234 keeperfx.map

But in downloaded KeeperFX 0.38b, files size are not the same :

13/02/2011 18:38 1*521*152 keeperfx.dll
13/02/2011 18:46 2*493*603 keeperfx.exe
13/02/2011 19:23 1*572*547 keeperfx.map

Is it normal ? May be CPU options or some other details ?

mefistotelis
February 15th, 2011, 22:04
Hard to tell - maybe I'm using older version of some library, and maybe I've got different environment options.
Still, this shouldn't change anything.

Chr!x
February 16th, 2011, 16:33
Tutorial is done (http://dungeon-keeper.net/index.php?option=com_content&view=article&id=204&catid=45&Itemid=86). It's in french, but automatic translate inside website will be usefull :)

Thanks mefistotelis for help me.

Chr!x
February 20th, 2011, 21:57
@ mefistotelis : what IDE/sources editor do you use for KeeperFX development ?

mefistotelis
February 20th, 2011, 22:04
Eclipse CDT + Subversive.
IDA Pro for disassembly and reverse-engineering (IDA project files are on keeper.lubie.org).

Chr!x
February 21st, 2011, 06:56
Does Wascana (http://code.google.com/a/eclipselabs.org/p/wascana/) could be more usefull than CDT Elipse 7.01 package ?

mefistotelis
February 21st, 2011, 07:09
More useful? No. It's the same thing.

Wascana could be easier to install, but besides that, it's just Eclipse with some libraries in one pack.

Personally, I prefer to install packages which I want - separately. Also, Wascana is only for Windows, and I'm using Eclipse on other OSes too (not for KeeperFX development).

GoJoe
April 15th, 2011, 20:38
Thanks mefistotelis for pointing at this thread. Followed all instructions. I'm getting following result:

Generating: bj/ver_defs.h
mingw32-make: Interrupt/Exception caught (code = 0xc0000005, addr = 0x0x75b942ab)

I have no clue what that's supposed to mean.

Hopefully you have some advice.

Thanks alot

Jörg

mefistotelis
April 15th, 2011, 23:05
Generation of that file requires "echo" command from GNU utilities.

Try typing "echo --version". It should display information about version of the echo.exe. I'm using v5.97 from coreutils. If it will just display "--version", then you don't have any echo.exe and internal echo command is used, which is bad.

GoJoe
April 17th, 2011, 20:46
Thanks alot!

MfG Jörg

Mister Giggles
May 22nd, 2011, 01:36
Was finally able to build KeeperFX from source. I had to install the GNU utilities. I'm pretty pleased, since I've tried to compile the source code off and on ever since KeeperFX came into existence.

Never knew the GNU Utilities were a requirement.