Windows

PWMAngband source (Tangaria’s game engine) comes with several batch files that actually do the job. PWMAngband using Borland C++ builder (version 5 or 6 will do); makefiles are only compatible with Borland (you can use visual studio but you would need your own makefiles). Easiest is to download free command-line tools which is a free Borland compiler version 5 and use the makefiles.

Libraries (WIN client)

  1. Download and unzip ZLIB 1.2.11 in the same root directory as your \PWMAngband folder (not inside of PWMAngband folder, but in ../ folder!)
  2. Download and unzip LIBPNG 1.6.37 in the same root directory as your \PWMAngband folder
  3. Replace the pngwrite.c file by the one from the \PWMAngband\src\fix folder to fix a linker error
  4. Edit makefile.bc32 in the lpng1637\scripts directory:
    set ZLIB_DIR=..\zlib-1.2.11
  5. Run \PWMAngband\src\WIN.bat. This will generate the ZLIB and LIBPNG libraries.

Libraries (SDL client)

Prerequisite: Build the static libraries libpng.lib and zlib.lib (see previous paragraph).

  1. Create a \SDL directory in the same root directory as your \PWMAngband folder
  2. Download and unzip SDL 1.2.15 in the \SDL directory
  3. In \SDL\SDL-1.2.15, replace the following files by the ones in \PWMAngband\src\_SDL:
    \include\begin_code.h
    \include\SDL_stdinc.h
  4. Download and unzip FreeType 2.10.1 in the \SDL directory
  5. In \SDL\freetype-2.10.1, replace the following file by the one in \PWMAngband\src\fix:
    \include\freetype\config\ftconfig.h
  6. Download and unzip SDL_ttf 2.0.11 in the \SDL directory
  7. Download and unzip SDL_image 1.2.12 in the \SDL directory
  8. Download and unzip MAD 0.15.1b in the \SDL directory
  9. In \SDL\libmad-0.15.1b, replace layer3.c by the one in \PWMAngband\src\fix to remove compile errors
  10. Download and unzip SDL_mixer 1.2.12 in the \SDL directory
  11. Run \PWMAngband\src\SDL.bat. This will generate the SDL, FREETYPE, SDL_TTF, SDL_IMAGE, LIBMAD and SDL_MIXER libraries.

Client

To build client: run the client.bat file in the /src directory. This will generate the mangclient_gcu.exe, mangclient_sdl.exe and mangclient.exe executable files corresponding to the GCU, SDL and WIN client.

Server

To build server: run the server.bat file in the /src directory. This will generate the mangband.exe executable file corresponding to the server.

The clean.bat file will delete all generated binaries in case you want to recompile everything from scratch.

Setup

To build setup (all executables in one folder): run the setup.bat file in the /src directory. This will generate all the files required to run PWMAngband. Setup will appear in \PWMAngband\setup

The cleansetup.bat file will delete all generated files in case you want to regenerate everything from scratch.

Leave a Reply

Your email address will not be published. Required fields are marked *