The Cygwin section might not be entirely accurate yet (and I haven't personally verified the DOS instructions), but most of this is now correct.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
MFNPES4L57UNCQTA6B6Y6XVENPHD4NASXK2K2LVQ4XDV45WEQUQQC
Q4TULVRLLNAHZNURPKNAR2K3GBVCEY6KY6ZXKPIJVWVSSZ6R7PEQC
YU5YPWFSNYHZ2FHVKLY2WFBZRDLK4LSJ3WLZLWCMR22S2W3D3U5AC
5EXHUBZ7PWP326556WP2VVFGY4IEJCZXULDFSAQ6LGPD2VKXE4RAC
74KN47HKXGYVOIJLRK7Z6NXJ3DOU3CPMAD7AEPEWTZOIUJ4CHRUAC
G5IEUQSGE4HKXACJA6W2JZFDETPSTGTDQ7JCHDEPZN6QAWRP4Z6QC
GYS5IM6FVZKFSFMT7K4SO5GHS4UULDY23JJRH5BQ2YOYDQYXVJAAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
GL5T36G3A2LUTTYSL7ZQVUYONUCXL5DK36532FM6XRAQCLYDWW2QC
RQWKV5SMOFJEKDBASJ6G262MDFIPUOTCUDZ7KQFIQBTXQBQOJKOAC
BOXKLHGUZFN6G4PCAZ7BEOW5IMUEVZPC7V3YY32HMR4EQ3TPU2UQC
HCTDAXFRE6LXGHLKOMM7GX3YXGWJYM4DLZS7ITWYTXC5NWZBB2OQC
FHMTFYXFX5OBWFLRH4PU4ZOWP5JGDCH4OBCJSAMPIC5SREHXM5AQC
SSPFGPVYFTWDK3ZMQQKOPVM5SVES62TL5KFEFC2PX4PMZDWHTIOQC
BBYPITW3Q474ZU6FVEPTER7WFQUKPCROEYEXGUUZW546CR32Z2EQC
I4WOENMOTUJ5AZ6U3WXPITHIEJFKDZMAW3XDBC22GGYKB3RVUSJAC
2N2G6L6FNJTEXC2DSC2OP64I7DNAGBL7CQ3WQZGNUCED3FQFOGSQC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
HXOYKQF6JLOELDE27O66U3Q7J6CP2YPRF42VSJD4LPTV7PZNT6PQC
EWFP6RFDHTEGD6SX36LYRLQB3APIKGAHNBKWPD56RGYBUE4FWJUQC
W2D7G5ARFVO2HKUPFITKCGFC6UKB6ZCZFIT6223QLQ7PU7UO7L5AC
Z6QGDJGSRPZAC4O5PA7MPWPRQLJAFBQBQXHUAO5QUAXQD2JGPDLQC
BLGPVQN4B4IZ7O56BQGPSOPDKVHJXYNMWQ5QRNC564XRBL3DP2KQC
QYDFLJPRJ3GKULPAMHDSTR4JFASE5T45FPQYXJ25PWVN77KFKPGAC
YRTMOMVMYSROOIO4YKAJLDW4AIO7KWYZ6RNLMY3M4VULN2NGYCCQC
PL6I2CMSTHY5ZHWVMIQE5YTM5S5VPKBNZM6QJVHZSSKOJGIJ5W4AC
DR2DDPGRMZXKH3427HL4X5KLXLHUS5KNFBGQ3HO7X7QCJQIKTAGQC
LS3DAZVRDCXVN2BKBC6RGCKO3R43Z7HKG4GXJWLBK4AKBL2G6QDQC
VGTQD4PW3FSNBHTUBBRRI24WNIZU6VPDYUQGO2SO53P6J5WJO5XQC
XIX6ZCEVOKWNKTWBRM4QTQ4OPQSANM7XNAKQJHIYCIOF4JOKBSGAC
XHUIZHV755IGVKJ7HMHXEMHORHTH5RUGAINRUN6LA5ZIF7Z4CZ3QC
DSEHSGOZ75YFYOVHTBE7JKA26A6ZFRSF7CYVBBPNGE7SZEZPSDJAC
3DMAYDA3C6SBPOEOLKV33FNEUTXV43BHQFXBZIJ6CT5P4QFZJT5QC
DEFINES_L += -DUSE_TILE
INCLUDES_L += -I$(RLTILES)
ifdef NEED_APPKIT
LIB += -framework OpenGL -framework AppKit
endif
ifdef APPLE_GCC
# SDL has a goof in the stock SDL_config.h which checks whether
# __MACOSX__ is defined. It's not one of Apple's stock markers,
# so we define it ourselves here.
#
DEFINES += -D__MACOSX__
EXTRA_OBJECTS += SDLMain.o
# If the /Library/Frameworks folder exists, add a -F flag
#
ifneq ($(shell ls -a /Library/Frameworks 2> /dev/null),)
LIB += -F/Library/Frameworks/ -Fcontrib/Frameworks
endif
# Check if our dependencies exist as frameworks. If so, use their
# headers and link to them.
#
ifneq ($(shell ls /Library/Frameworks/SDL.framework 2> /dev/null),)
INCLUDES_L += -I/Library/Frameworks/SDL.framework/Headers
LIB += -framework SDL
ifeq ($(uname_S),Darwin)
ifndef UNSUPPORTED_BUILD
$(warning Using this makefile to build a tiles build on Mac OS X is NOT OFFICIALLY SUPPORTED.)
$(warning You should have no expectation of stability if you choose to continue anyway!)
$(warning Please use the Xcode project instead.)
$(error To build anyway, add the flag UNSUPPORTED_BUILD=y to the command-line)
ifneq ($(shell ls /Library/Frameworks/Freetype2.framework 2> /dev/null),)
INCLUDES_L += -I/Library/Frameworks/Freetype2.framework/Headers
LIB += -framework Freetype2
endif
ifneq ($(shell ls /Library/Frameworks/libpng.framework 2> /dev/null),)
INCLUDES_L += -I/Library/Frameworks/libpng.framework/Headers
LIB += -framework libpng
endif
[ -d $(INSTALLDIR) ] || mkdir -p $(INSTALLDIR)
$(COPY) $(GAME) $(INSTALLDIR)
chown $(INSTALL_UGRP) $(INSTALLDIR)/$(GAME)
chmod $(MCHMOD) $(INSTALLDIR)/$(GAME)
mkdir -p $(DATADIR)/dat
mkdir -p $(DATADIR)/dat/lua
mkdir -p $(DATADIR)/dat/clua
mkdir -p $(DATADIR)/dat/descript
mkdir -p $(DATADIR)/dat/database
$(COPY) dat/*.des $(DATADIR)/dat
$(COPY) dat/lua/*.lua $(DATADIR)/dat/lua
$(COPY) dat/clua/*.lua $(DATADIR)/dat/clua
$(COPY) dat/descript/*.txt $(DATADIR)/dat/descript
$(COPY) dat/database/*.txt $(DATADIR)/dat/database
[ -d $(prefix) ] || mkdir -p $(prefix)
$(COPY) $(GAME) $(prefix)
chown $(INSTALL_UGRP) $(prefix)/$(GAME)
chmod $(MCHMOD) $(prefix)/$(GAME)
mkdir -p $(prefix)/$(DATADIR)/dat/lua
mkdir -p $(prefix)/$(DATADIR)/dat/clua
mkdir -p $(prefix)/$(DATADIR)/dat/descript
mkdir -p $(prefix)/$(DATADIR)/dat/database
$(COPY) dat/*.des $(prefix)/$(DATADIR)/dat
$(COPY) dat/lua/*.lua $(prefix)/$(DATADIR)/dat/lua
$(COPY) dat/clua/*.lua $(prefix)/$(DATADIR)/dat/clua
$(COPY) dat/descript/*.txt $(prefix)/$(DATADIR)/dat/descript
$(COPY) dat/database/*.txt $(prefix)/$(DATADIR)/dat/database
This file describes how to compile a runtime executable of DCSS from the
source code. If you're trying to compile Crawl yourself, skip ahead to the
next section, "Building Dungeon Crawl Stone Soup".
This file describes how to compile a runtime executable of DCSS from the source
code. If you're trying to compile Crawl yourself, skip ahead to the next
section, "Building Dungeon Crawl Stone Soup".
- Any Unix with a recent gcc (and g++), GNU make and libncurses,
including Linux and Mac OS X. "Recent" is defined as gcc 3.3 or
newer.
- Microsoft Windows NT/2000/XP. The game will also run on Windows 9X
and ME. DOS binaries can also be compiled on Windows NT+.
- Any Unix with a recent gcc (and g++), GNU make and libncurses, including Linux
and Mac OS X. "Recent" is defined as gcc 3.3 or newer.
- Microsoft Windows NT/2000/XP. The game will also run on Windows 9X and ME. DOS
binaries can also be compiled on Windows NT+.
Other platforms are unsupported, but you should be able to build Crawl
on pretty much any operating system with a modern C++ compiler (full
support for the standard C++ library, in particular <string>, the
collection classes and <algorithm> is necessary) and the curses
library.
Other platforms are unsupported, but you should be able to build Crawl on pretty
much any operating system with a modern C++ compiler (full support for the
standard C++ library, in particular <string>, the collection classes and
<algorithm> is necessary) and the curses library.
definitions; to make changes to the level compiler, you'll need the
flex and bison/byacc tools (Other lex/yaccs may also work). More
details are available below.
definitions; to make changes to the level compiler, you'll need the flex and
bison/byacc tools (Other lex/yaccs may also work). More details are available
below.
Regular expressions require libpcre on non-Unix operating systems. On
Unixes, the standard POSIX regular expression support is adequate for
Crawl's needs.
Regular expressions require libpcre on non-Unix operating systems. On Unixes,
the standard POSIX regular expression support is adequate for Crawl's needs.
Stone Soup 0.3 includes Lua 5.1.2 in its source tree. Crawl uses Lua
for dungeon generation. In addition, Crawl has a (rudimentary) Lua
interface for users to run scripts which can do things such as
conditionalise parts of the .crawlrc/init.txt. Such user Lua scripts
are enabled by default, but can be turned off by removing
-DCLUA_BINDINGS from your makefile.
Stone Soup 0.3 includes Lua 5.1.2 in its source tree. Crawl uses Lua for dungeon
generation. In addition, Crawl has a (rudimentary) Lua interface for users to
run scripts which can do things such as conditionalise parts of the
.crawlrc/init.txt. Such user Lua scripts are enabled by default, but can be
turned off by removing -DCLUA_BINDINGS from your makefile.
Unicode support needs libncursesw and its header files; these are
usually available in your operating system's package-management
system. Unicode is not supported on Windows or DOS. Some systems, such
as Mac OS X, may have Unicode support available in libncurses itself
(i.e., without a separate libncursesw).
Unicode support needs libncursesw and its header files; these are usually
available in your operating system's package-management system. Unicode is not
supported on Windows or DOS. Some systems, such as Mac OS X, may have Unicode
support available in libncurses itself (i.e., without a separate libncursesw).
Crawl uses a selector makefile (under source/makefile) to control what
platform it's building for. Your first step in building Crawl should be
to edit source/makefile and point it at the correct platform makefile.
For instance, if you're building for Windows, you'd use
MAKEFILE=makefile.mgw to build with MinGW for Windows (# is used for
comments in makefiles).
Crawl uses a selector makefile (under source/makefile) to control what platform
it's building for. Your first step in building Crawl should be to edit
source/makefile and point it at the correct platform makefile. For instance, if
you're building for Windows, you'd use MAKEFILE=makefile.mgw to build with MinGW
for Windows (# is used for comments in makefiles).
Consult the operating-system specific sections for detailed
information on building Crawl. When you're done building Crawl, look
at the section "Data files" for important information on what files
Crawl needs as it starts up.
Consult the operating-system specific sections for detailed information on
building Crawl. When you're done building Crawl, look at the section "Data
files" for important information on what files Crawl needs as it starts up.
If you have untrusted local users, we highly recommend you do not
install Crawl setgid or setuid. Just running "make install" will install
Crawl setgid games, do *not* do this unless you're sure you trust your
users.
If you have untrusted local users, we highly recommend you do not install Crawl
setgid or setuid. Just running "make install" will install Crawl setgid games,
do *not* do this unless you're sure you trust your users.
If you have untrusted users, the correct way to install a multiplayer
Crawl is using a chrooted game launcher such as dgamelaunch.
If you have untrusted users, the correct way to install a multiplayer Crawl is
using a chrooted game launcher such as dgamelaunch.
If only one user on the system (you) is going to be playing Crawl, you
do not need to use "make install". A simple "make" will build Crawl in
the source directory, where you can run it as "./crawl".
If only one user on the system (you) is going to be playing Crawl, you do not
need to use "make install". A simple "make" will build Crawl in the source
directory, where you can run it as "./crawl".
GNU gcc and g++, GNU make, libncurses or libcurses. You need the
development headers for ncurses - they may not be installed by default
on some Unixes.
GNU gcc and g++, GNU make, libncurses or libcurses. You need the development
headers for ncurses - they may not be installed by default on some Unixes.
flex and bison are optional but highly recommended. Recent versions of
byacc are also fine (edit your makefile appropriately).
flex and bison are optional but highly recommended. Recent versions of byacc are
also fine (edit your makefile appropriately).
understands Unicode characters, usually named libncursesw (the
development headers for libncursesw are usually in
/usr/include/ncursesw.) You also need to have a UTF-8 locale installed.
You can then build Crawl with support for Unicode by setting
UNICODE_GLYPHS = y in makefile.unix.
understands Unicode characters, usually named libncursesw (the development
headers for libncursesw are usually in /usr/include/ncursesw.) You also need to
have a UTF-8 locale installed. You can then build Crawl with support for Unicode
by setting UNICODE_GLYPHS = y in makefile.unix.
* Edit makefile and make sure that MAKEFILE=makefile.unix is
uncommented and all other MAKEFILE= lines are commented out.
* If you want to install Crawl for multiple users, edit makefile.unix
and set SAVEDIR and DATADIR to appropriate directories. This is not
necessary if only one user is going to play Crawl. Also check
INSTALLDIR and change it if necessary.
* Edit AppHdr.h and check that SAVE_PACKAGE_CMD and LOAD_UNPACKAGE_CMD
are set correctly for your system. If you do not want your saves
packaged in a zip archive, it's safe to comment out SAVE_PACKAGE_CMD
and LOAD_UNPACKAGE_CMD.
* Most users can simply type 'make' without any extra flags, and get a working
build as a result. If just typing 'make' works for you, then you shouldn't
need to read any further. BSD and Solaris users may have to use 'gmake'
instead of 'make'.
* If you don't have (or don't want to use) flex or bison, edit
makefile.unix and set DOYACC := n. If you want to use byacc instead
of bison, edit makefile.unix and set YACC := byacc. On some Unixes,
you may not have flex (but have some other lex), in which case
you'll have to set LEX := lex in makefile.unix.
* If you want a graphical (tiled) build, then you should add 'TILES=y' to the
'make' command-line, like so:
* If you're installing Crawl for multiple users, run make install.
Crawl will be copied into the directory specified by INSTALLDIR. The
save and data directories will be created if necessary, and the
level layout (.des) and help files will be copied to the data
directory.
Note that the graphical build requires that you have development libraries
installed for SDL, SDL_image, libpng, zlib, and freetype. If your system
doesn't have these installed, you can usually get them via your package
manager (apt-get, emerge, yum, etc).
* If you do not want players to be able to script Crawl with Lua,
edit makefile.unix and remove -DCLUA_BINDINGS from the CFOTHERS line.
If you would rather, you can go to the source/contrib directory and type
'make', and the required libraries should be built for you.
Note that the Unix instructions will build Crawl assuming that your
terminal can display 16 colours. If you're planning to use
Terminal.app (which supports only 8 colours), or you want a tiles
build, you should follow the Mac build instructions below.
Of course, you should make sure that SAVEDIR and DATADIR reference the
appropriate directories. This is not necessary if only one user is going to
play Crawl.
* Crawl has been tested to build under Xcode 3.2 on OS X 10.6.1, but
is likely to be buildable with earlier versions.
* Edit AppHdr.h and check that SAVE_PACKAGE_CMD and LOAD_UNPACKAGE_CMD are set
correctly for your system. If you do not want your saves packaged in a zip
archive, it's safe to comment out SAVE_PACKAGE_CMD and LOAD_UNPACKAGE_CMD.
* Make sure Xcode is installed. Xcode should be available on the OS X
install DVD if you haven't already installed it.
* If you're installing Crawl for multiple users, run 'make install' as root.
Crawl will be copied into the directory specified by 'prefix' (see above). The
save and data directories will be created if necessary, and the level layout
and help files will be copied to the data directory.
- libpng and Freetype2 need to be built from source to be compiled
as frameworks. Let's start with libpng. Check out the source from
git://git.uplinklabs.net/pub/scm/git/tycho/libpng.git
and build it using the Xcode project in projects/xcode.
Building on Mac OS X
--------------------
- You've now got the necessary dependencies installed and you can
proceed to build Crawl.
* Make sure Xcode is installed. Xcode should be available on the Mac OS X
install DVD if you haven't already installed it. You can also download Xcode
from Apple's website (note that their website often has versions of Xcode
that are newer than the versions distributed on their Mac OS X DVDs):
http://developer.apple.com/TOOLS/Xcode/
* Hit Build in Xcode.
* Hit Build in Xcode. This should build all the necessary dependencies,
including libpng, freetype, SDL, and SDL_image, and then finally build Crawl
itself. The process may take quite a while, so go grab a coke or a cup of
coffee.
* The default build configuration, Release, will build a ppc/i386
Universal binary suitable for play on all OS X 10.4 or newer
systems. The other build configurations are intended for development
and may not result in a binary that can be distributed to others.
* You can also use makefile.osx, which will run xcodebuild from the
command line.
* The default build configuration, Release, will build a ppc/i386 Universal
binary suitable for play on all OS X 10.4 or newer systems. The other build
configurations are intended for development and may not result in a binary
that can be distributed to others.
NOTE: You cannot build Windows binaries on Windows 9x/ME using the
MinGW makefile supplied (which needs the cmd.exe shell of the Windows
NT family). If you're on 9x/ME, you can use the Cygwin build
instructions, or build a binary on a Windows NT/2k/XP system (the
binary will run on 9x), or build a DOS binary.
NOTE: You cannot build Windows binaries on Windows 9x/ME using the MinGW
makefile supplied (which needs the cmd.exe shell of the Windows NT family). If
you're on 9x/ME, you can use the Cygwin build instructions, or build a binary on
a Windows NT/2k/XP system (the binary will run on 9x), or build a DOS binary.
* Install MinGW from http://www.mingw.org. The MinGW installer
is best so you don't have to fiddle with individual packages (you can
mess with the individual packages if you like to, of course). If you
want to edit the level compiler, also get the flex and bison packages
(available from the GnuWin32 project on Sourceforge:
http://gnuwin32.sourceforge.net/).
* To install MinGW, you have two options. You can install via the installer
provided by the MinGW project (http://www.mingw.org), but this is not
officially supported by the Crawl team. If you have problems with it, we will
not help you until you get a supported version of MinGW, which can be obtained
from the msysgit project. msysgit is a full MinGW setup that even includes Git
(which happens to be the source code management system used by the Crawl team).
To get msysgit, be sure to download the 'netinstall' from here:
* Make sure you have g++ and mingw32-make in your path.
http://code.google.com/p/msysgit/downloads/list
NOTE: Do NOT get any of the versions that do not have 'netinstall' in the
filename. The 'netinstall' is the only one used by the Crawl team.
* If you intend to build a graphical (tiled) build of Crawl, you will need to
upgrade the version of GNU Make included with MinGW. FreeType's build system
requires a minimum of GNU Make v3.80. You can obtain this from here, under the
GNU Make category:
https://sourceforge.net/projects/mingw/files/
To install it, simply extract it with an unarchiver (such as WinRAR) to
c:\msysgit (or wherever you installed msysgit).
* Get Cygwin from http://www.cygwin.com/. When installing, ensure that
the following packages are selected: gcc, g++, make, flex, bison,
libncurses-devel. If you'd like to build from svn, install the svn
client. You may also want to install diff and patch if you'd like to
apply third party patches, or create your own.
* Get Cygwin from http://www.cygwin.com/. When installing, ensure that the
following packages are selected: gcc, g++, make, flex, bison,
libncurses-devel. If you'd like to build from git, install the git-core
package. You may also want to install diff, patch, and other such tools.
menu, do not double-click bash.exe in Explorer). cd to the Crawl
source directory.
menu or desktop icon, do not double-click bash.exe in Explorer).
* cd to the the Crawl source directory. For instance, if you have the crawl
sources in c:\crawl\source, you would type 'cd /cygdrive/c/crawl/source'.
* For Windows builds, run
make MAKEFILE=makefile_tiles.mgw
See the next section for step-by-step instructions.
* For Linux builds, run
make MAKEFILE=makefile_tiles.unix
* On most platforms, you can simply type:
make TILES=y
On Windows, they should be installed, compiled, and the headers and libs
placed in a location that the compiler can find them via its default include
and library paths.
On Windows (MinGW or Cygwin), these will be compiled as needed when you run
'make TILES=y'.
Building Tiles on Windows (MinGW)
---------------------------------
The following instructions were submitted by zebez.
The following assumes you have a working install of MinGW and is only tested
on 4.4.0. See "Building on Windows (MinGW)" above to find out where to get it.
You need:
* freetype-2.3.5-1-bin.zip
(http://gnuwin32.sourceforge.net/packages/freetype.htm)
Get the Binaries zip file.
Extract it to your MinGW folder.
In your MinGW include/ folder go into "freetype2" and move "freetype" to your
MinGW include/ folder. Delete the "freetyp2" folder.
* libpng-1.2.37-bin.zip
* libpng-1.2.37-lib.zip
* zlib-1.2.3-lib.zip
(http://sourceforge.net/projects/gnuwin32/files/)
Extract them to your MinGW folder.
* SDL-devel-1.2.13-mingw32.tar.gz
(http://www.libsdl.org/download-1.2.php)
Extract to your MinGW folder.
If there is a folder named SDL-1.2.13 in your MinGW folder now, move all its
contents to your MinGW root folder.
* SDL_image-devel-1.2.7-VC9.zip
(http://www.libsdl.org/projects/SDL_image/)
Extract to your MinGW folder.
If there is a folder named SDL_image-1.2.7 in your MinGW folder now, move all
its contents to your MinGW root folder.
Move these dll files from your MinGW lib/ folder to your MinGW bin/ folder:
libpng12-0.dll, SDL_image.dll and zlib1.dll.
Then run, from Stonesoup source folder:
mingw32-make -f makefile_tiles.mgw install
After a while it should have compiled to source/rel/. Now to actually run it
you need to copy these dlls from MinGW bin/ to the source/rel/ folder:
freetype6.dll, SDL.dll, libpng12-0.dll, SDL_image.dll and zlib1.dll.
Depending on your compiler options you might also need libgcc_s_dw2-1.dll,
also from the MinGW bin/ folder. You can disable the latter by adding
-static-libgcc to the compiler options in the makefile.
Crawl will also look for documentation files when players invoke the
help system. These files are available under the docs directory.
Crawl will also look for documentation files when players invoke the help
system. These files are available under the docs directory.
If Crawl is built without an explicit DATA_DIR_PATH (this is the most
common setup), it will search for its data files under the current
directory, and if it can't find them there, one level above the
current directory. In short, it uses these search paths: ., ./dat,
./docs, .., ../dat, ../docs.
If Crawl is built with an explicit DATA_DIR_PATH (for multiuser
installs on Unix), it will look for its startup files strictly under
that directory: $DIR, $DIR/dat, $DIR/docs.
If Crawl is built without an explicit DATA_DIR_PATH (this is the most common
setup), it will search for its data files under the current directory, and if it
can't find them there, one level above the current directory. In short, it uses
these search paths: ., ./dat, ./docs, .., ../dat, ../docs.
As Crawl loads its startup files, it will convert them to a binary
format (so that future startups will be faster) and store these binary
files in the saves directory. These binary files (with extensions .db,
.dsc, .idx, .lk) can be safely deleted as long as there is no running
Crawl, and they will be regenerated the next time Crawl starts.
The level compiler source is in the source/util directory (levcomp.lpp
and levcomp.ypp). The steps involved in building the level compiler
are:
The level compiler source is in the source/util directory (levcomp.lpp and
levcomp.ypp). The steps involved in building the level compiler are:
Enabling Lua user scripts is unsuitable for Crawl installed setuid or
setgid - we have not audited the user scripting interface for
security. If you're not planning to install Crawl setuid/setgid (not
running set[ug]id is a good idea in general), you can enable the Lua
user-script bindings safely.
Enabling Lua user scripts is unsuitable for Crawl installed setuid or setgid -
we have not audited the user scripting interface for security. If you're not
planning to install Crawl setuid/setgid (not running set[ug]id is a good idea in
general), you can enable the Lua user-script bindings safely.
As of 0.3, the Lua source is included with Crawl. The only step needed
to enable user-scripts is to uncomment CLUA_BINDINGS in AppHdr.h.
As of 0.3, the Lua source is included with Crawl. The only step needed to enable
user-scripts is to uncomment CLUA_BINDINGS in AppHdr.h.
As of 0.4.2, PCRE 7.7 source is included with Crawl. It is enabled
by default. The sources in pcre/util are identical to the 7.7 distro
except for removed cmake, doc, and testdata folders (unused by Crawl)
and a hand-rolled Makefile.
As of 0.4.2, PCRE 7.7 source is included with Crawl. It is enabled by default.
The sources in pcre/util are identical to the 7.7 distro except for removed
cmake, doc, and testdata folders (unused by Crawl) and a hand-rolled Makefile.
On Unixes, you're better served by the existing POSIX regular expression
support. If you want PCRE, your package management system is again your best
bet. Remember to install development headers, not just the plain library.
Modern Unixes may support Unicode terminals (particularly xterms). If
you have a terminal that can display Unicode characters, and an
ncurses library that can handle Unicode (libncursesw, and its devel
headers), you can build Crawl to display Unicode in the map: set
UNICODE_GLYPHS = y in makefile.unix.
Modern Unixes may support Unicode terminals (particularly xterms). If you have a
terminal that can display Unicode characters, and an ncurses library that can
handle Unicode (libncursesw, and its devel headers), you can build Crawl to
display Unicode in the map: set 'USE_UNICODE=y' when running 'make'.
On Mac OS X, libncurses includes Unicode support; makefile.unix should
detect Mac OS automatically and link to libncurses when
UNICODE_GLYPHS=y.
NOTE: You may have libncursesw, but not have the header files; check that you
have the header files installed as well, or you'll get a lot of errors. Crawl
expects the ncursesw headers to be in /usr/include/ncursesw.
NOTE: You may have libncursesw, but not have the header files; check
that you have the header files installed as well, or you'll get a lot
of errors. Crawl expects the ncursesw headers to be in
/usr/include/ncursesw.
After compiling Crawl with Unicode support, you still need to add the line
"char_set = unicode" in your .crawlrc to tell Crawl to use Unicode. You may also
need to set the locale in your terminal if the encoding does not default to
UTF-8. To check this, run "locale charmap", which should say "UTF-8". If your
encoding is not UTF-8, you can force it to UTF-8 on most systems by doing
"export LC_ALL=en_US.UTF-8" or the equivalent, depending on your language locale
and what shell you're using.
After compiling Crawl with Unicode support, you still need to add the
line "char_set = unicode" in your .crawlrc to tell Crawl to use
Unicode. You may also need to set the locale in your terminal (notably
on Mac OS) if the encoding does not default to UTF-8. To check this,
run "locale charmap", which should say "UTF-8". If your encoding is
not UTF-8, you can force it to UTF-8 on most systems by doing "export
LC_ALL=en_US.UTF-8" or the equivalent, depending on your language
locale and what shell you're using.
Crawl tries to use en_US.UTF-8 as its default Unicode locale. If you
do not have this locale installed, but do have some other UTF-8 locale,
you can tell Crawl to use your preferred UTF-8 locale by setting
UNICODE_LOCALE = ${foo}.UTF-8 in makefile.unix, where ${foo} is your
locale name.
Crawl tries to use en_US.UTF-8 as its default Unicode locale. If you do not have
this locale installed, but do have some other UTF-8 locale, you can tell Crawl
to use your preferred UTF-8 locale by setting UNICODE_LOCALE=${foo}.UTF-8 on
the 'make' command line, where ${foo} is your locale name.
You may not want to embed the locale in Crawl itself, but have Crawl
use the locale as set in the environment LC_* variables. In such
cases, you can use UNICODE_LOCALE = . in makefile.unix. Crawl will
then use the locale as set in your environment.
You may not want to embed the locale in Crawl itself, but have Crawl use the
locale as set in the environment LC_* variables. In such cases, you can omit the
UNICODE_LOCALE option from the 'make' command line. Crawl will then use the
locale as set in your environment.
If you're playing Crawl on a remote machine, the remote Crawl should be
built with Unicode support, it needs to have a UTF-8 locale installed,
*and* your local terminal (where you're running telnet/ssh) needs to be
able to decode UTF-8.
If you're playing Crawl on a remote machine, the remote Crawl should be built
with Unicode support, it needs to have a UTF-8 locale installed, *and* your
local terminal (where you're running telnet/ssh) needs to be able to decode
UTF-8.