wesnoth and Linux
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
wesnoth and Linux
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
rhuobhe
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
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
ok but what about usr
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?
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.
/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.
We have a document in Wesnoth Wiki about compiling...
http://www.ventu.info/wesnoth/?CompilingWesnoth
- Miyo
http://www.ventu.info/wesnoth/?CompilingWesnoth
- Miyo
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).fmunoz wrote: I hope that next a rpm packe will be avalaible :-)
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
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.
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.
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,
For instance, and Wesnoth will look for its data under /usr/share/wesnoth.
David
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\"
David
preprocessor symbols
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.
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,
on line 5 of the Makefile. Change it to,
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
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
Code: Select all
CXXFLAGS=-O2 -Wall -DWESNOTH_PATH=\"/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
Preprocessor stuff
Dave,
Thank you very much for your help. I had no problems following your directions, and BFW compiled just fine.
-BrassJ
Thank you very much for your help. I had no problems following your directions, and BFW compiled just fine.
-BrassJ