仙剑移植之 x86
平台:x86PC 机 RedHat5.5 操作系统
资源介绍:解压 sdl.tar 包后, 有 data.tar lib.tar sdlpal.tar 三个压缩包, data.tar 是仙剑的运行资源,lib.tar 是仙剑的编译和运行需要的库,sdlpal.tar 是仙剑的源码。
一、首先编译安装仙剑编译和运行需要的库
1.安装 freetype
[root@localhost lib]# tar -zxvf freetype-2.3.11.tar.gz
[root@localhost lib]# cd freetype-2.3.11
[root@localhost freetype-2.3.11]# ./configure
[root@localhost freetype-2.3.11]# make -j4
[root@localhost freetype-2.3.11]# make install
2.安装 zlib
[root@localhost lib]# tar -zxvf zlib-1.2.3.tar.gz
[root@localhost lib]# cd zlib-1.2.3
[root@localhost zlib-1.2.3]# ./configure --enable-shared
[root@localhost zlib-1.2.3]# make -j4
[root@localhost zlib-1.2.3]# make install
3.安装 libiconv
[root@localhost lib]# tar -zxvf libiconv-1.13.1.tar.gz
[root@localhost lib]# cd libiconv-1.13.1
[root@localhost libiconv-1.13.1]# ./configure
[root@localhost libiconv-1.13.1]# make -j4
[root@localhost libiconv-1.13.1]# make install
4.安装 libmad
[root@localhost lib]# tar -zxvf libmad-0.15.1b.tar.gz
[root@localhost lib]# cd libmad-0.15.1b
[root@localhost libmad-0.15.1b]# ./configure
[root@localhost libmad-0.15.1b]# make -j4
[root@localhost libmad-0.15.1b]# make install
5.安装 jpegsrc
[root@localhost lib]# tar -zxvf jpegsrc.v6b.tar.gz
[root@localhost lib]# cd jpeg-6b/
[root@localhost jpeg-6b]# ./configure
[root@localhost jpeg-6b]# mkdir -p /usr/local/man/man1
[root@localhost jpeg-6b]# make -j4
[root@localhost jpeg-6b]# make install6.安装 libpng
[root@localhost lib]# tar -jxvf libpng-1.2.19.tar.bz2
[root@localhost lib]# cd libpng-1.2.19
[root@localhost libpng-1.2.19]# ./configure
[root@localhost libpng-1.2.19]# make -j4
[root@localhost libpng-1.2.19]# make install
7.安装 SDL
[root@localhost lib]# tar -zxvf SDL-1.2.14.tar.gz
[root@localhost lib]# cd SDL-1.2.14
[root@localhost SDL-1.2.14]# ./configure
[root@localhost SDL-1.2.14]# make -j4
[root@localhost SDL-1.2.14]# make install
8.安装 SDL_ttf
[root@localhost lib]# tar -zxvf SDL_ttf-2.0.9.tar.gz
[root@localhost lib]# cd SDL_ttf-2.0.9
[root@localhost SDL_ttf-2.0.9]# ./configure
[root@localhost SDL_ttf-2.0.9]# make -j4
[root@localhost SDL_ttf-2.0.9]# make install
9.安装 SDL_image
[root@localhost lib]# tar -zxvf SDL_image-1.2.8.tar.gz
[root@localhost lib]# cd SDL_image-1.2.8
[root@localhost SDL_image-1.2.8]# ./configure
[root@localhost SDL_image-1.2.8]# make -j4
[root@localhost SDL_image-1.2.8]# make install
10.安装 SDL_mixer
[root@localhost lib]# tar -zxvf SDL_mixer-1.2.9.tar.gz
[root@localhost lib]# cd SDL_mixer-1.2.9
[root@localhost SDL_mixer-1.2.9]# ./configure --enable-music-mp3-mad-gpl
--enable-music-mp3=no
[root@localhost SDL_mixer-1.2.9]# make -j4
[root@localhost SDL_mixer-1.2.9]# make install
二、编译仙剑
[root@localhost sdl]# cd sdlpal
[root@localhost sdlpal]# make -j4
三、把编译好的仙剑可执行程序拷贝到仙剑的运行资源目录下
[root@localhost sdlpal]# cp dist/Debug/GNU-Linux-x86/sdlpal ../data/
[root@localhost sdlpal]# cd ../data/四、运行资源文件都必须小写
[root@localhost data]# mv WOR16.FON wor16.fon
[root@localhost data]# mv M.MSG m.msg
四、运行仙剑
[root@localhost data]# ./sdlpal