Windows

PWMAngband source (Tangaria’s game engine) comes with several batch files that actually do the job.

First you need to decide which version of Borland C++ builder you would use. Makefiles are only compatible with Borland (you can use Visual Studio, but you would need your own makefiles). There are two different options:

1) Borland C++ Compiler 7.x (bcc32c)
// won’t work for initial SDL compilation! Use Borland 6 for it (in case if you need, as pre-compiled SDL included in src)

run .bat files in PWMAngband\src\bcc32c

Libraries (WIN client)

Shortcut: all libs archives in one place

  1. After you’ve installed Borland command line compiler – you must download libraries and compile them.
  2. Download and unzip ZLIB 1.2.11 in the same root directory as your \PWMAngband folder (not inside of PWMAngband folder, but in ../ folder!)
  3. Copy \PWMAngband\src\bcc32c\Makefile.zlib into \zlib-1.2.11\win32
  4. Download and unzip LIBPNG 1.6.37 in the same root directory as your \PWMAngband folder
  5. Copy \PWMAngband\src\bcc32c\Makefile.libpng into \lpng1637\scripts
  6. Run \PWMAngband\src\WIN.bat. This will generate the ZLIB and LIBPNG libraries.

2) Borland C++ Compiler 6 (bcc32)
// works for initial SDL compilation 😉

Attention! BCC 5 / 5.5 doesn’t work! Only 6 version.

run .bat files inside of PWMAngband\src folder

Libraries (WIN client)

  1. After you’ve installed Borland command line compiler (one of 2 variants above 5.x or 7.x version) – you must download libraries and compile them.
  2. Download and unzip ZLIB 1.2.11 in the same root directory as your \PWMAngband folder (not inside of PWMAngband folder, but in ../ folder!)
  3. Download and unzip LIBPNG 1.6.37 in the same root directory as your \PWMAngband folder
  4. In lpng1637 folder – replace the pngwrite.c file by the one from the \PWMAngband\src\fix folder to fix a linker error
  5. Edit makefile.bc32 in the lpng1637\scripts directory:
    ZLIB_DIR=..\zlib-1.2.11
  6. 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 – so you will have there:
    \SDL\SDL-1.2.15
  3. In \SDL\SDL-1.2.15\include, replace the following files by the ones from \PWMAngband\src\_SDL:
    begin_code.h
    SDL_stdinc.h
  4. Download and unzip FreeType 2.10.2 in the \SDL directory
  5. In \SDL\freetype-2.10.2\include\freetype\config, replace the ftconfig.h by the one in \PWMAngband\src\fix
  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. In \SDL\SDL_mixer-1.2.12\VisualC\external\include\vorbis\, replace vorbisfile.h by the one in \PWMAngband\src\fix
  12. 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.


Archive (outdated):

Easiest is to download free command-line tools which is a free Borland compiler version 5 and use the makefiles.

After you will download free command-line tools, unpack it to C:\BCC55 and:

1. Add “C:\BCC55\bin” to the Windows OS PATH
2. Create a bcc32.cfg file which will set the compiler options for the Include
and Lib paths (-I and -L switches to compiler) by adding these lines:
-I"C:\BCC55\include"
-L"C:\BCC55\lib"
3. Create an ilink32.cfg file which will set the linker option for the Lib path by
adding this line:
-L"C:\BCC55\lib"

To report typo, error or make suggestion: select text and press Ctrl+Enter.

Leave a Reply

🇬🇧 Attention! Comments with URLs/email are not allowed.
🇷🇺 Комментарии со ссылками/email удаляются автоматически.