한줄 한줄 따라해 보세요.
컴파일과 소스다운로드에 쓰이는 파일과 필수 사운드 라이브러리를 먼저 설치하고
$ sudo apt-get install build-essential subversion scons libsdl-mixer1.2-dev libsdl1.2-dev
최신소스를 다운받는다.
$ svn co [url:1eg6hamh]https://freera.svn.sourceforge.net/svnroot/freera/freera++/trunk[/url:1eg6hamh] freera++
A freera++/
A freera++/setup
A freera++/setup/Linux
A freera++/setup/Linux/config_plugin_linux
A freera++/setup/Linux/config_freecnc_linux
생략
체크아웃된 리비전 445.
다운된 소스 디렉토리로 가서
$ cd freera++
scons라고 타이핑해서 컴파일을 진행한다.
freera++$ scons
scons: Reading SConscript files …
scons: warning: The env.Copy() method is deprecated; use the env.Clone() method instead.
File "/media/sdc1/freera++/trunk/SConstruct", line 70, in <module>
scons: done reading SConscript files.
scons: Building targets …
g++ -o src/freera.o -c -D_GNU_SOURCE=1 -D_REENTRANT -std=c++98 -Wconversion -Wno-unused-parameter -g -ansi -pedantic -I/usr/include/SDL -Isrc/include -Isrc/include/lua src/freera.cpp
In file included from src/include/pause_menu.h:8,
from src/include/common.h:12,
from src/freera.cpp:15:
src/include/widgets.h:49: error: extra ‘;’
In file included from src/include/playerpool.h:10,
from src/include/graphicsengine.h:12,
from src/freera.cpp:18:
src/include/player.h: In member function ‘Uint16 Player::getStructureLosses() const’:
src/include/player.h:94: warning: conversion to ‘Uint16’ from ‘const Uint32’ may alter its value
scons: *** [src/freera.o] Error 1
scons: building terminated because of errors.
만약 위와 같은 에러가 나면 에러난 src/include/widgets.h 파일을 편집기로 열어서 49번째 줄로가서
void SetupWindow (int Xpos, int Ypos, int Width, int Heigth);;
라고되어 있는걸
void SetupWindow (int Xpos, int Ypos, int Width, int Heigth);
로 고쳐준뒤 다시 scons한다.
freera++$ gedit src/include/widgets.h
freera++$ scons
긴 컴파일 메세지 끝에
g++ -o src/vfs/mix/mixvfs.o -c -D_GNU_SOURCE=1 -D_REENTRANT -std=c++98 -Wconversion -Wno-unused-parameter -g -ansi -pedantic -I/usr/include/SDL -Isrc/include -Isrc/include/lua src/vfs/mix/mixvfs.cpp
src/vfs/mix/mixvfs.cpp: In member function ‘Uint32 MIXFiles::calcID(const char*)’:
src/vfs/mix/mixvfs.cpp:89: warning: conversion to ‘char’ from ‘int’ may alter its value
src/vfs/mix/mixvfs.cpp: In member function ‘void MIXFiles::readMIXHeader(VFile*)’:
src/vfs/mix/mixvfs.cpp:248: warning: conversion to ‘Uint8’ from ‘int’ may alter its value
g++ -o src/vfs/filesystem/externalvfs.o -c -D_GNU_SOURCE=1 -D_REENTRANT -std=c++98 -Wconversion -Wno-unused-parameter -g -ansi -pedantic -I/usr/include/SDL -Isrc/include -Isrc/include/lua src/vfs/filesystem/externalvfs.cpp
g++ -o freera src/freera.o src/audio/soundengine.o src/audio/soundfile.o src/ui/cursor.o src/ui/sidebar.o src/ui/input.o src/ui/widgets.o src/ui/selection.o src/ui/pause_menu.o src/ui/font.o src/ui/menu.o src/ui/cursorpool.o src/ui/logger.o src/misc/inifile.o src/misc/compression.o src/misc/common.o src/misc/mapsini.o src/misc/args.o src/video/glSDL.o src/video/message.o src/video/imagecache.o src/video/sdllayer.o src/video/shpimage.o src/video/wsa.o src/video/vqa.o src/video/graphicsengine.o src/video/cpsimage.o src/video/pcximage.o src/video/renderer.o src/video/imageproc.o src/video/loadingscreen.o src/vfs/vfs.o src/game/playerpool.o src/game/triggers.o src/game/unitanimations.o src/game/dispatcher.o src/game/moneycounter.o src/game/talkback.o src/game/map.o src/game/structure.o src/game/unit.o src/game/projectileanim.o src/game/ai.o src/game/buildqueue.o src/game/path.o src/game/structureanims.o src/game/weaponspool.o src/game/loadmap.o src/game/game.o src/game/unitandstructurepool.o src/game/actioneventqueue.o src/game/player.o src/vfs/mix/blowfish.o src/vfs/mix/ws-key.o src/vfs/mix/mixvfs.o src/vfs/filesystem/externalvfs.o -L/usr/lib -lSDL -lSDL_mixer
scons: done building targets.
라고 뜨면 끝난거다.
freera++$ ./freera --help
FreeCNC - V0.48 svn
Usage: freecnc [OPTIONS]
-map mapname - Name of mission to load
-w width - Width of screen
-h height - Height of screen
-bpp bpp - Video Depth
-fullscreen - Use fullscreen mode
-window - Use windowed mode
-nosound - Play without sound
-playvqa vqaname - Plays a VQA
-grab - Grabs mouse input (locks mouse inside freecnc window)
The following options are for features that are in development:
-skirmish N - Starts up in skirmish mode with N players
-multi X Y - Starts up in multiplayer mode as player X of Y
-nick nickname - Sets your nick for multiplayer
-colour colourname - Sets your side colour for multiplayer
allowed colours: red, orange, yellow, green, blue and turquoise
-side <GDI or NOD> - sets your side for multiplayer
-server address - Address of the server for multiplayer.
-port number - Port to which a connection should be made.
freera++$ ls -al
합계 9916
drwxr-xr-x 10 doodle root 4096 2009-07-19 18:11 .
drwxr-xr-x 4 doodle root 4096 2009-07-19 17:58 …
-rw-r–r-- 1 doodle root 118505 2009-07-19 18:11 .sconsign.dblite
drwxr-xr-x 6 doodle root 4096 2009-07-19 17:56 .svn
-rw-r–r-- 1 doodle root 4066 2009-07-19 17:55 ChangeLog.txt
-rw-r–r-- 1 doodle root 1226 2009-07-19 17:55 Makefile
-rw-r–r-- 1 doodle root 3435 2009-07-19 17:55 README.txt
-rw-r–r-- 1 doodle root 3455 2009-07-19 17:55 SConstruct
-rw-r–r-- 1 doodle root 1049 2009-07-19 17:55 TODO.txt
drwxr-xr-x 7 doodle root 4096 2009-07-19 17:55 data
drwxr-xr-x 4 doodle root 4096 2009-07-19 17:55 doc
-rwxr-xr-x 1 doodle root 9965793 2009-07-19 18:11 freera
drwxr-xr-x 10 doodle root 4096 2009-07-19 17:55 projects
drwxr-xr-x 9 doodle root 4096 2009-07-19 17:55 setup
drwxr-xr-x 10 doodle root 4096 2009-07-19 18:05 src
drwxr-xr-x 3 doodle root 4096 2009-07-19 17:55 tests
drwxr-xr-x 7 doodle root 4096 2009-07-19 17:55 tools
freera++$ ls -al data
합계 28
drwxr-xr-x 7 doodle root 4096 2009-07-19 17:55 .
drwxr-xr-x 10 doodle root 4096 2009-07-19 18:11 …
drwxr-xr-x 6 doodle root 4096 2009-07-19 17:56 .svn
drwxr-xr-x 3 doodle root 4096 2009-07-19 17:55 gfx
drwxr-xr-x 3 doodle root 4096 2009-07-19 17:55 mix
drwxr-xr-x 3 doodle root 4096 2009-07-19 17:55 scripts
drwxr-xr-x 5 doodle root 4096 2009-07-19 17:55 settings
freera++$ ls -al data/mix
합계 12
drwxr-xr-x 3 doodle root 4096 2009-07-19 17:55 .
drwxr-xr-x 7 doodle root 4096 2009-07-19 17:55 …
drwxr-xr-x 6 doodle root 4096 2009-07-19 17:56 .svn
red alert 씨디에 있는 redalert.mix 하고 main.mix 파일을 data/mix 디렉토리 아래로 복사해 놓는다.
게임 디렉토리를 만들고
freera++$ mkdir -p ~/.Games/FreeRa
현재 디렉토리 아래 모든 파일을 그리로 옮겨준다.
freera++$ mv * ~/.Games/FreeRa
바탕화면 실행 아이콘으로 쓸 그림파일도 다운받아 게임 디렉토리로 옮긴다.
freera++$ wget [url:1eg6hamh]http://gwos.org/lib/exe/fetch.php/guides:64bit:freera.png?cache=&w=20&h=20[/url:1eg6hamh]
freera++$ mv guides:64bit:freera.png?cache= ~/.Games/FreeRa/freera.png
실행 스크립트를 만들기 위해 편집기를 열고
freera++$ gedit ~/.Games/FreeRa-launch.sh
#!/bin/bash
cd ~/.Games/FreeRa
./freera
위 내용을 써 넣고 저장 한뒤.편집기를 끄고
만든 스크립트에 실행속성을 준다.
freera++$ chmod +x ~/.Games/FreeRa-launch.sh
freera++$ alacarte
이제 마지막으로 그놈 메뉴에다 등록하기 위해
그놈 메뉴 편집기(alacarte)를 실행하고
메뉴에서 게임을 클릭한뒤 새항목 클릭해서
나온 실행 아이콘 만들기에다 하나 하나 채워준다
이름 FreeRa
명령어 sh /home/USERNAME/.Games/FreeRa-launch.sh (주의 USERNAME은 자신의 사용자 아이디로 바꿔줄것)
설명 실시간 전략게임(westwood red alert의 리빌드)
아이콘은 왼쪽 구석 아이콘을 클릭한뒤 찾아보기에서
아까 저장해 뒀던 ~/.Games/FreeRa/freera.png 파일을 찾아 지정해주고 확인누르면
끝이다.
이제 프로그램 => 게임에 가서 FreeRa를 클릭해서 게임을 실행하면 된다.