git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1218 c06c8d41-db1a-0410-9941-cceddc491573
HXOYKQF6JLOELDE27O66U3Q7J6CP2YPRF42VSJD4LPTV7PZNT6PQC - Any Unix with a recent gcc (and g++), GNU make and libncurses, includingLinux and Mac OS X.- Microsoft Windows NT/2000/XP. The game will also run on Windows 9X and ME.DOS binaries can also be compiled on Windows NT+.
Crawl Stone Soup is known to compile successfully on the followingplatforms as of version 0.2:
The only supported compiler is gcc (available on almost all Unixes, and as djgppfor DOS, and MinGW for Windows).
- 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 ornewer.- Microsoft Windows NT/2000/XP. The game will also run on Windows 9Xand ME. DOS binaries can also be compiled on Windows NT+.The only supported compiler is gcc (available on almost all Unixes,and as djgpp for DOS, and MinGW for Windows).
Other platforms are unsupported, but you should be able to build Crawl onpretty much any operating system with a modern C++ compiler (full support forthe 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 Crawlon pretty much any operating system with a modern C++ compiler (fullsupport for the standard C++ library, in particular <string>, thecollection classes and <algorithm> is necessary) and the curseslibrary.
definitions; to make changes to the level compiler, you'll need the flex andbison/byacc tools (Other lex/yaccs may also work). More details are availablebelow.
definitions; to make changes to the level compiler, you'll need theflex and bison/byacc tools (Other lex/yaccs may also work). Moredetails 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. OnUnixes, the standard POSIX regular expression support is adequate forCrawl's needs.
Lua support requires liblua, which you can build by downloading the sources fromwww.lua.org. On most Unixes, you can also use the native package managementsystem to easily install lua.
Lua support requires liblua, which you can build by downloading thesources from www.lua.org. On most Unixes, you can also use the nativepackage management system to easily install lua.
Crawl uses a selector makefile (under source/makefile) to control what platformit's building for. Your first step in building Crawl should be to editsource/makefile and point it at the correct platform makefile. For instance, ifyou're building for Windows, you'd use MAKEFILE=makefile.mgw to build with MinGWfor Windows (# is used for comments in makefiles).
Consult the operating-system specific sections for detailed information onbuilding Crawl.
Crawl uses a selector makefile (under source/makefile) to control whatplatform it's building for. Your first step in building Crawl shouldbe to edit source/makefile and point it at the correct platformmakefile. For instance, if you're building for Windows, you'd useMAKEFILE=makefile.mgw to build with MinGW for Windows (# is used forcomments in makefiles).Consult the operating-system specific sections for detailedinformation on building Crawl.
* Edit AppHdr.h and check that SAVE_DIR_PATH, SAVE_PACKAGE_CMD andLOAD_UNPACKAGE_CMD are set correctly for your system. If you do not want yoursaves packaged in a zip archive, it's safe to comment out SAVE_PACKAGE_CMD andLOAD_UNPACKAGE_CMD.
* If you want to install Crawl for multiple users, edit makefile.unixand set SAVEDIR and DATADIR to appropriate directories. This is notnecessary if only one user is going to play Crawl. Also checkINSTALLDIR and change it if necessary.* Edit AppHdr.h and check that SAVE_PACKAGE_CMD and LOAD_UNPACKAGE_CMDare set correctly for your system. If you do not want your savespackaged in a zip archive, it's safe to comment out SAVE_PACKAGE_CMDand LOAD_UNPACKAGE_CMD.* If you don't have flex or bison, edit makefile.unix and set DOYACC:= n. If you want to use byacc instead of bison, edit makefile.unixand set YACC := byacc. On some Linuxes you may not have lexsymlinked to flex, in which case you'll have to set LEX := flex inmakefile.unix.
* If you don't have flex or bison, edit makefile.unix and set DOYACC := n. Ifyou want to use byacc instead of bison, edit makefile.unix and set YACC :=byacc. On some Linuxes you may not have lex symlinked to flex, in which caseyou'll have to set LEX := flex in makefile.unix.
* Run make to build the normal (non-wizard) Crawl. On systems such asSolaris, you may have to use gmake for GNU make. Make sure your makeidentifies itself as GNU make when you do make --version.
* Run make to build the normal (non-wizard) Crawl. On systems such as Solaris,you may have to use gmake for GNU make. Make sure your make identifies itselfas GNU make when you do make --version.
* If you're installing Crawl for multiple users, run make install.Crawl will be copied into the directory specified by INSTALLDIR. Thesave and data directories will be created if necessary, and thelevel layout (.des) and help files will be copied to the datadirectory.
You can follow the Linux instructions to build Crawl (but note you still need toinstall Xcode to get gcc and make), or alternatively you can use Xcode.
You can follow the Unix instructions to build Crawl (but note youstill need to install Xcode to get gcc and make), or alternatively youcan use Xcode.Note that the Unix instructions will build Crawl assuming that yourterminal can display 16 colours. If you're planning to useTerminal.app (which supports only 8 colours), you should follow theMac build instructions below.
* Crawl has been tested with Xcode 2.4 under OS X 10.4.7 on both PPC and Intelmachines, but is likely to be buildable with earlier versions.
* Crawl has been tested with Xcode 2.4 under OS X 10.4.7 on both PPCand Intel machines, but is likely to be buildable with earlierversions.
* The default build configuration, Release, will build a ppc/i386 Universalbinary suitable for play on all OS X 10.3.9 or newer systems. The other buildconfigurations are intended for development and may not result in a binarythat can be distributed to others.
* The default build configuration, Release, will build a ppc/i386Universal binary suitable for play on all OS X 10.3.9 or newersystems. The other build configurations are intended for developmentand may not result in a binary that can be distributed to others.
* If you have Lua installed, you can add your lua headers and liblua library tothe 'Crawl' target in the Xcode project, uncomment the '#define CLUA_BINDINGS'line in AppHdr.h, and rebuild to compile with Lua support.
* If you have Lua installed, you can add your lua headers and liblualibrary to the 'Crawl' target in the Xcode project, uncomment the'#define CLUA_BINDINGS' line in AppHdr.h, and rebuild to compilewith Lua support.
NOTE: Building for Windows+MinGW on Windows 9x/ME may work, but we've not testedit. You may be better off using the DOS build instructions if you're on 9x/ME.
NOTE: Building for Windows+MinGW on Windows 9x/ME may work, but we'venot tested it. You may be better off using the DOS build instructionsif you're on 9x/ME.
* Install MinGW from http://www.mingw.org. The MinGW 5.0.2 installer is best soyou don't have to fiddle with individual packages (you can mess with theindividual packages if you like to, of course). If you want to edit the levelcompiler, also get the flex and bison packages (available from the GnuWin32project on Sourceforge: http://gnuwin32.sourceforge.net/).
* Install MinGW from http://www.mingw.org. The MinGW 5.0.2 installeris best so you don't have to fiddle with individual packages (youcan mess with the individual packages if you like to, of course). Ifyou want to edit the level compiler, also get the flex and bisonpackages (available from the GnuWin32 project on Sourceforge:http://gnuwin32.sourceforge.net/).
* Install djgpp from http://www.delorie.com/djgpp/. Don't forget to include C++support when the Zip picker asks for what you want. You may also have todownload GNU make as a separate package. It's important to follow the installinstructions carefully, because bad installs can produce rather confusingerror messages.
* Install djgpp from http://www.delorie.com/djgpp/. Don't forget toinclude C++ support when the Zip picker asks for what you want. Youmay also have to download GNU make as a separate package. It'simportant to follow the install instructions carefully, because badinstalls can produce rather confusing error messages.
* If you want to modify the level compiler, install the djgpp flex, bison and m4packages and set DOYACC := y in makefile.dos.
* If you want to modify the level compiler, install the djgpp flex,bison and m4 packages and set DOYACC := y in makefile.dos.
The level compiler source is in the source/util directory (levcomp.lpp andlevcomp.ypp). The steps involved in building the level compiler are:
The level compiler source is in the source/util directory (levcomp.lppand levcomp.ypp). The steps involved in building the level compilerare:
If you're using Lua older than 5.1, though, the Lua library comprises of *two*libraries: liblua and liblualib (yes, confusing), so you need
If you're using Lua older than 5.1, though, the Lua library comprisesof *two* libraries: liblua and liblualib (yes, confusing), so you need
On Unixes your package management system is the best way to get Lua. Makesure to install the development headers and not just the naked library.
On Unixes your package management system is the best way to get Lua.Make sure to install the development headers and not just the nakedlibrary.
On DOS, you get the joy of compiling Lua yourself. It's not hard, and you canuse the existing Windows support in the Lua makefiles with some minormodifications, but you may be better served using the official Crawl Stone Soupbinaries if you want Lua with your Crawl and don't want to compile Lua.
On DOS, you get the joy of compiling Lua yourself. It's not hard, andyou can use the existing Windows support in the Lua makefiles withsome minor modifications, but you may be better served using theofficial Crawl Stone Soup binaries if you want Lua with your Crawl anddon't want to compile Lua.
On Unixes, you're better served by the existing POSIX regular expressionsupport. If you want PCRE, your package management system is again your bestbet. Remember to install development headers, not just the plain library.
On Unixes, you're better served by the existing POSIX regularexpression support. If you want PCRE, your package management systemis again your best bet. Remember to install development headers, notjust the plain library.
On DOS you get the joy of building PCRE yourself. It's a little more annoyingthan building Lua (you have to roll your own makefile), but not by much.
On DOS you get the joy of building PCRE yourself. It's a little moreannoying than building Lua (you have to roll your own makefile), butnot by much.