Binaries | English screen shot | Japanese screen shot | Feedback | Source code | 3.0.0 Changes | 2.2.1.7 Changes | 1.6.2 Changes
If you want to compile the code yourself or examine the changes I made, you can get one of the packaged source code archives, hengband-3.0.1-Beta17.tar.gz, hengband-2.2.1.7i.tar.gz, or hengband-1.6.2e.tar.gz from https://github.com/backwardsEric/hengband/releases . The first of those is based on Hengband's current development branch. The second is based on Hengband's development branch from 2019. The third is based on Hengband's last stable release. Alternately, you can clone the git repository, https://github.com/backwardsEric/hengband.git . Within the git repository, the macos-develop branch tracks Hengband's most recent upstream development (available as the develop branch). The macos-3-0-0 branch corresponds to the releases made for macOS with the 3.0.0 development code. The macos-2-2-1 branch corresponds to the version based on 2.2.1.7. The macos-1-6-2 branch corresponds to the version based on 1.6.2.
If you cloned the git repository and want to compile the code, you'll first need to create the configure script and some of the files it uses. If you're using the master, develop, or macos-develop branches, you'll need to set up the submodule that's used to handle the lib/xtra directory before creating the configure script. To do that, run this in the top-level directory of the directory tree with the source code (also note that because the macos-develop branch uses a different version of the submodule and the macos-2-2-1 and macos-1-6-2 branches do not use the submodule, switching to or from those branches or branches based on them can require updating the submodule or moving the existing lib/xtra out of the way):
git submodule init
git submodule update
Now run this in the top-level directory of the directory tree with the source code to create the configure script (you'll need to have autoconf and automake in the path; at least for macOS 11 or 12 it is recommended to use autoconf 2.69 since the version of m4, GNU M4 1.4.6, included with macOS doesn't work well with autoconf 2.71):
./bootstrap
To compile the changed code and generate an English version of the game which uses the Cocoa user interface for macOS, run these commands from the top-level directory of the directory tree with the source code:
./configure --disable-japanese --enable-cocoa
make install
That will create the full application, hengband.app, in the top-level
directory. You can move that wherever you want. If you want the
curses interface or, if you have the X11 libraries installed, the X11
interface, do not specify --enable-cocoa
when
running configure. The curses or X11 interface will not use
hengband.app. Instead you'll get an executable, hengband, in the
directory where you ran configure and that executable will pull
information from the lib subdirectory there. To get the Japanese
version, do not specify --disable-japanese
when running
configure. Compilation of the Japanese version requires the utility,
nkf, unless you are building the code based on Hengband 1.6.2.
Source code for that utility is available from
https://osdn.net/projects/nkf/.
To compile an English version that will run natively on either x86_64 or arm machines, you can use these commands from the top-level directory of the directory tree with the source code if the source code is prior to the move to C++ (2021 March 6th; 3.0.0 Alpha 10):
env CFLAGS="-g -O2 -arch x86_64 -arch arm64" OBJCFLAGS="-g -O2 -arch x86_64 -arch arm64" LDFLAGS="-arch x86_64 -arch arm64" ./configure --disable-dependency-tracking --enable-cocoa --disable-japanese
make install
env CFLAGS="-g -O2 -arch x86_64 -arch arm64" CXXFLAGS="-g -O2 -arch x86_64 -arch arm64" OBJCXXFLAGS="-g -O2 -arch x86_64 -arch arm64" LDFLAGS="-arch x86_64 -arch arm64" ./configure --disable-dependency-tracking --disable-pch --enable-cocoa --disable-japanese
make install
For a Japanese version with a universal binary, the steps are much the
same. The only difference is to omit --disable-japanese
when running configure.
Eventually, the hope is that the changes made here will be incorporated into the standard version of Hengband and you can get both the source code and binaries from them.