wesnoth and Linux

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
rhuobhe

wesnoth and Linux

Post by rhuobhe »

ok i am new to Wesnoth and to this forum. I installed wesnoth on my win 2000 server machine i use for school. but my laptop runs Linux Redhat 9. I am very new to linux and wesnoth. I was wonderding what i will need to install this on linux. I have only installed RPM's and never a binary and i don't know where to download the file to where to "unzip" it or anything. thank you

rhuobhe
fmunoz
Founding Artist
Posts: 1469
Joined: August 17th, 2003, 10:04 am
Location: Spain
Contact:

Post by fmunoz »

Download the binary from
http://wesnoth.whitevine.net/files/wesn ... 386.tar.gz
open a console terminal, change the directory (folder for win people) typing cd whereyoudonwloadedthefile and there type tar -xzf wesnoth-0.4-linux_i386.tar.gz
The move inside the wesnoth directory and just type ./wesnoth
Next time you can use the graphic file manager to launch the program, no system wide instalation yet.

Try to install from source file!! :-)
It's easy you need to have instaled the gcc compiler (from rpm it's fine), all sdl and sdl-devel packages (just to be in the safe side), if the rpm instaler ask you about dependencies install it too.
Next download the source file.
http://wesnoth.whitevine.net/files/wesnoth-0.4.7.tar.gz
Open a console terminal, untar it (tar ...) same as before, but instead of calling the program, type make, wait a bit (or a lot), nad then launch the game.

I hope that next a rpm packe will be avalaible :-)
rhuobhe

ok but what about usr

Post by rhuobhe »

i know about the tars but where do i install these sdl and sdl-devel packages? then where should i install wesnoth to allow all user to use this game?
fmunoz
Founding Artist
Posts: 1469
Joined: August 17th, 2003, 10:04 am
Location: Spain
Contact:

Post by fmunoz »

Game binaries go in
/usr/bin
or
/usr/local/bin
the data files need to be hanging from the directory where the binary is, not a good idea.
Wesnoth is only in 0.4.7 version so no system wide instalation.
you could check config.cpp, game.cpp, make_translation.cpp, display.cpp and maybe others and change the references to the files there to point where you want to store the files (or better put it in the makefile)
Sorry maybe in 0.4.8 :-(
I may be wrong, so check what Dave says.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

We have a document in Wesnoth Wiki about compiling...

http://www.ventu.info/wesnoth/?CompilingWesnoth

- Miyo
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

fmunoz wrote: I hope that next a rpm packe will be avalaible :-)
I don't see RPMs coming before someone volunteers to make them (hopefully someone not from core development team, I think they have more important issues than building RPMs).

Different Red Hat releases have different libraries, then there are other RPM based distributions like SuSe, Mandrake, etc. If you compile the RPM against libraries in some release of some distribution it might not work with other distributions or even different release of the same distribution.

Let us concentrate making a great game... a hero to build RPMs will emerge when it is time.

- Miyo
rhuobhe

sdl

Post by rhuobhe »

sdl are these also needed in the /usr/bin or /usr/local/bin?
fmunoz
Founding Artist
Posts: 1469
Joined: August 17th, 2003, 10:04 am
Location: Spain
Contact:

Post by fmunoz »

About SDL, use the graphical rpm manager to install them in your system, chances are that at least libSDL and SDLmixer are alredy instaled.
You could also check what SDL libraries have you instaled typing
rpm -qa|grep -e SDL
At compiling "make" takes care of where to find the SDL stuff so just install them.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

There is a way to get Wesnoth to locate its data and have the data files not under the executable.

You just add the preprocessor symbol WESNOTH_PATH to point to the path the data is at. So when compiling add the flag,

Code: Select all

-DWESNOTH_PATH=\"/usr/share/wesnoth\"
For instance, and Wesnoth will look for its data under /usr/share/wesnoth.

David
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

I have added information about -DWESNOTH_PATH to CompilingWesnoth

- Miyo
BrassJ
Posts: 60
Joined: October 9th, 2003, 6:19 am
Location: USA
Contact:

preprocessor symbols

Post by BrassJ »

um, Can someone point me in a direction for learning about preprocessor symbols? I have done a search on google, but everything there seems to assume I already know about where preprocessor symbols are. I am assuming that they are located in a file somewhere, but I don't know if that is even a correct assumption.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Brassj,

I don't know of any good source of documentation on preprocessor symbols, and to understand them properly you have to understand C. However in brief, a preprocessor symbol is simply a name/value pair that is given to the program when it is compiled, and can alter the code that is compiled.

Most commonly preprocessor symbols are set within the source code itself. They are also set to tell the program of the system it is being compiled for - e.g. _WIN32_ is defined on Windows, and linux is defined on Linux. However the preprocessor symbols we are interested in are ones that are defined by the user, at compile time.

The user can add preprocessor symbols by editing the Makefile, and changing the value of CXXFLAGS.

To add a preprocessor symbol, you would add -Dname=value

So at the moment, you will see,

Code: Select all

CXXFLAGS=-O2 -Wall
on line 5 of the Makefile. Change it to,

Code: Select all

CXXFLAGS=-O2 -Wall -DWESNOTH_PATH=\"/usr/local/wesnoth\"
for instance, and you will have set Wesnoth's path to be /usr/local/wesnoth

(you will want to do 'make clean' and 'make' to recompile Wesnoth with your new settings).

Hope this clarifies things. Let me know if you have any further problems.

David
BrassJ
Posts: 60
Joined: October 9th, 2003, 6:19 am
Location: USA
Contact:

Preprocessor stuff

Post by BrassJ »

Dave,

Thank you very much for your help. I had no problems following your directions, and BFW compiled just fine.

-BrassJ
Post Reply