作者:yuanjin
不知道打哪听到的一个叫wesnoth的游戏,走方格子的,我自己实在是不怎么喜欢这类的游戏,不过毕竟在linux下没有怎么玩过游戏,于是乎就装了一个。安装的过程在官方网站上都有说明了,我权当补充个安装实例了。
系统:Kubuntu 7.10 Gusty
游戏官方网站:http://www.wesnoth.org/
游戏安装源代码下载地址:http://downloads.sourceforge.net/wesnoth/wesnoth-1.2.8.tar.bz2?download
在安装前,需要完成以下工作:
需要安装一个编译器如gcc,来为程序的编译提供compiler,然后就是一些用于程序运行的运行时包(runtime package):
libsdl1.2 ( http://www.libsdl.org ) (SDL >= 1.2.7 强烈推荐)
libsdl-image1.2 (带 PNG 支持) ( http://www.libsdl.org/projects/SDL_image )
libsdl-mixer1.2 (带 Vorbis 支持) ( http://www.libsdl.org/projects/SDL_mixer )
libsdl-net ( http://www.libsdl.org/projects/SDL_net )
libintl (以及包含在gettext包中的其他库) ( http://www.gnu.org/software/gettext/gettext.html )
(游戏版本高于 Wesnoth 1.3) python >= 2.4 ( 并非必选但是极度推荐, http://www.python.org )
(游戏版本高于 Wesnoth 1.3.12) libboost ( 现在只有 libboost-iostreams, http://www.boost.org )
(newer than Wesnoth 1.3.12) zlib ( in theory already needed for libsdl-image, http://www.zlib.org )
我装的是以下的这些包:
SDL-1.2.13.tar.gz
SDL_image-1.2.6.tar.gz
SDL_mixer-1.2.8.tar.gz
SDL_net-1.2.7.tar.gz
gettext-0.17.tar.gz
boost_1_34_1.tar.bz2
zlib-1.2.3.tar.bz2
这些包下下来后,解压,然后在konsole中cd切换到解压后的文件夹目录下,运行命令
yuanjin@Liang:~$./configure
yuanjin@Liang:~$make
yuanjin@Liang:~$sudo make install
即可顺利安装好需要的包了。
其中python可以直接:
yuanjin@Liang:~$sudo apt-get install python
安装最新的版本了。
在编译wesnoth之前,我们还需要安装一些额外的包,以让SDL-mixer能够提供ogg支持。
yuanjin@Liang:~$sudo apt-get install libogg0 libogg-dev libsdl-mixer1.2 libsdl-mixer1.2-dev
以上的包应该在安装SDL-mixer前安装好,否则的话在编译wesnoth的时候会提示:
checking for OGG support in SDL_mixer... no
configure: error: *** SDL_mixer has no OGG support! You need SDL_mixer with OGG support
如果你没有事先安装这些包的就已经编译安装了SDL-mixer的话,可以在安装完以上的包后将其重新编译安装一次。
这样就不会再出现以上错误了,安装也就可以很顺利的完成了。
将下载下来的游戏的源代码解压,然后按照上述安装其他包的步骤安装wesnoth即可。
安装完毕,在终端输入wesnoth即可启动游戏了。