OSDN Git Service

Updated with provisional list of the changes for 1.6.2b and 2.2.1.7f.
[hengbandforosx/web.git] / HengbandSourceCode.html.en
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
2    "http://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd">
3 <HTML>
4   <HEAD lang="en">
5     <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
6     <TITLE>Hengband Application for macOS: Source Code</TITLE>
7   </HEAD>
8
9   <BODY>
10     <H1>Hengband Application for macOS</H1>
11     <P><A HREF="index.html.en">Binaries</A> | <A HREF="HengbandEnglishScreenshot.html.en">English screen shot</A> | <A HREF="HengbandJapaneseScreenshot.html.en">Japanese screen shot</A> | <A HREF="HengbandFeedback.html.en">Feedback</A> | Source code | <A HREF="HengbandChangeLog.html.en">2.2.1.7 Changes</A> | <A HREF="HengbandChangeLog-1-6-2.html.en">1.6.2 Changes</A>
12     <H1>Source Code</H1>
13       <P>If you want to compile the code yourself or examine the changes I
14         made, you can either get one of the packaged source code archives,
15         <A HREF="https://osdn.net/projects/hengbandforosx/downloads/73258/hengband-2.2.1.7e.tar.gz/">hengband-2.2.1.7e.tar.gz</A> is the latest for the
16         version based on Hengband 2.2.1.7 and
17         <A HREF="https://osdn.net/projects/hengbandforosx/downloads/72742/hengband-1.6.2a.tar.gz/">hengband-1.6.2a.tar.gz</A> is the latest for the
18         version based on Hengband 1.6.2, from
19         <A HREF="https://osdn.net/projects/hengbandforosx/releases/">https://osdn.net/projbects/hengbandforosx/releases/</A>
20         or clone the git repository, git://git.osdn.net/gitroot/hengbandforosx/hengbandosx.git .
21         Within the git repository, the version-2-2-1 branch corresponds to the
22         version based on 2.2.1.7 and the version-1-6-2 branch corresponds to
23         the version based on 1.6.2.
24       <P>If you cloned the git repository and want to compile the code, you'll
25        first need to create the configure script and some of the files it uses.
26        To do so, run this command in the top-level directory of the directory
27        tree with the source code (you'll need to have autoconf and automake
28        in the path):
29        <OL>
30          <LI><CODE>./bootstrap</CODE>
31        </OL>
32       <P>To compile the changed code and generate an English version of the game
33         which uses the Cocoa user interface for macOS, run these commands from
34         the top-level directory of the directory tree with the source code:
35         <OL>
36           <LI><CODE>./configure --disable-japanese --enable-cocoa</CODE>
37           <LI><CODE>make install</CODE>
38         </OL>
39       <P>That will create the full application, hengband.app, in the top-level
40         directory.  You can move that wherever you want.  If you want the
41         curses interface or, if you have the X11 libraries installed, the X11
42         interface, do not specify <CODE>--enable-cocoa</CODE> when
43         running configure.  The curses or X11 interface will not use
44         hengband.app.  Instead you'll get an executable, hengband, in the
45         directory where you ran configure and that executable will pull
46         information from the lib subdirectory there.  To get the Japanese
47         version, do not specify <CODE>--disable-japanese</CODE> when running
48         configure.  Compilation of the Japanese version requires the utility,
49         nkf, unless you are building the code based on Hengband 1.6.2.
50         Source code for that utility is available from
51         <A HREF="https://osdn.net/projects/nkf/">https://osdn.net/projects/nkf/</A>.
52       <P>To compile an English version that will run natively on either x86_64
53         or arm machines, you can use these commands from the top-level directory
54         of the directory tree with the source code:
55         <OL>
56           <LI><CODE>env CFLAGS="-arch x86_64 -arch arm64" OBJCFLAGS="-arch x86_64 -arch arm64" LDFLAGS="-arch x86_64 -arch arm64" ./configure --disable-dependency-tracking --enable-cocoa --disable-japanese</CODE>
57           <LI><CODE>make install</CODE>
58         </OL>
59       <P>For a Japanese version with a universal binary, the steps are much the
60         same.  The only difference is to omit <CODE>--disable-japanese</CODE>
61         when running configure.
62       <P>Eventually, the hope is that the changes made here will be
63         incorporated into the standard version of Hengband and you can get
64         both the source code and binaries from them.
65   </BODY>
66 </HTML>