It is currently February 9th, 2010, 1:52 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to compile on BeOS
PostPosted: February 17th, 2004, 11:14 pm 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
To compile Wesnoth on BeOS You'll need:
- Installed GCC 3.4.x (get it from BeBits), because "standard" BeOS 5 compiler is too old for Wesnoth (it can't handle few "advanced" C++ things, and generates much slower code).
- Installed all required libraries (with header files - so they have to be "development editions").
- Patch attached to this post (this patch was made for Wesnoth 1.0! next and previous versions may need patch to be remade to handle changes in source code).
- Wesnoth's source package (of course ;)).

Now follow the steps:
- Unpack Wesnoth's source package.
- Unpack patch file to Wesnoth's directory (the one which You have just unpacked).
- Open Terminal and go to Wesnoth's directory (for example "cd /boot/home/wesnoth-1.0/").
- Type "patch -p1 -u < wesnoth-1.0-BeOS-gcc3.4.3.diff" (if You have patch file somewhere else then write it's name with full path, for example: "patch -p1 -u < /boot/home/wesnoth-1.0-BeOS-gcc3.4.3.diff") and hit ENTER.
- If something went wrong (for example, You got one or more messages containing: "Skipping patch."), then You have different version of Wesnoth (most probably) than the one the patch was made for. Stop here and go download proper version.
- If everything is ok, type "configure --prefix=/boot/home/config --enable-editor --enable-server --enable-campaign-server --enable-tools -disable-rpath CPPFLAGS=-I/boot/home/config/include CFLAGS=-O3 LDFLAGS=-L/boot/home/config/lib CXXFLAGS=-O3" and hit ENTER.
- Wait for it to finish. If there will be error messages then stop here, and check libraries and header files. If You don't know what to do, ask people on BeShare - usually there's someone who can help You.
- If everything is ok, type "make" and hit ENTER.
- After looooong time (depends on hardware, here it takes ~20 minutes, maybe less), if everything is ok, there should be file named "wesnoth" in "src" subdirectory. Move it to parent directory (for example "mv src/wesnoth ./wesnoth").
- Along with Wesnoth game, there are "src/wesnoth_editor", "src/server/wesnothd", "src/campaign_server/campaignd", "src/tools/cutter" and "src/tools/exploder". Move them to Wesnoth's directory the same way as You used for wesnoth (for example "mv src/wesnoth_editor ./wesnoth_editor").
- Type "wesnoth" and hit ENTER :).

Have a nice game of Wesnoth!

Additional info
Additional patches attached below - one for gcc 000224 (by Andrew Bachmann) and other for gcc 2010413 - will not be updated anymore, and are here just for historical record (and masochists trying to play Wesnoth built with gcc 2.x).


Attachments:
File comment: Patch for building 1.0 on BeOS using gcc 3.4.3. Includes tiny library wrapping few needed BeAPI functions. Includes resource files.
wesnoth-1.0-BeOS-gcc3.4.3.diff.zip [39.98 KiB]
Downloaded 623 times
File comment: Old patch for building 0.7.10 on BeOS using gcc 20010413.
wesnoth-0.7.10-BeOS-20010413.diff.zip [3.18 KiB]
Downloaded 297 times
File comment: Old patch for building 0.7.10 on BeOS using gcc 000224. First made for 0.7.8 by Andrew Bachmann.
wesnoth-0.7.10-BeOS-000224.diff.zip [3.76 KiB]
Downloaded 284 times


Last edited by ahwayakchih on October 3rd, 2005, 9:24 pm, edited 55 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: February 17th, 2004, 11:28 pm 
Lead Developer
Offline

Joined: August 17th, 2003, 5:07 am
Posts: 6905
Location: California
Great work! Thanks for providing this! :)

Perhaps we should provide a working binary for BeOS?

David

_________________
"I made this letter very long, because I did not have the time to make it shorter." -- Blaise Pascal


Top
 Profile WWW  
 
 Post subject:
PostPosted: February 18th, 2004, 6:31 am 
Forum Regular
Offline

Joined: August 19th, 2003, 4:28 pm
Posts: 2201
Location: Finland
If you can provide pre-compiled binaries or installation package but don't have web space to host the files send me message with PM (Private Message, forum feature), email (miyo@iki.fi) or IRC and we can arrange uploading.

Binaries are listed here: http://wiki.wesnoth.org -> WesnothBinaries

- Miyo


Top
 Profile  
 
 Post subject:
PostPosted: February 18th, 2004, 7:56 am 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
I could make binary package but:
- Edge (the one who made Wesnoth 4.x build for BeOS, and has Wesnoth's account on BeBits) promised he'll make package for stable release, and i don't want to start yet another fight in BeOS community (which IMHO is now broken enough).
- I'm waiting for SDL_net CVS to be updated (or not ;)) so users can have official library build working (multpilayer Wesnoth depends on non-blocking sockets, which are not available on current SDL_net for BeOS). Sam Lantinga is currently busy with release of SDL 1.2.7 so we have to wait :).


Top
 Profile  
 
 Post subject:
PostPosted: February 18th, 2004, 9:07 pm 
DCODE is necessary to compile in BeOS? Looking to the patch doesn't seem so.


Top
  
 
 Post subject:
PostPosted: February 19th, 2004, 9:08 am 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
Quote:
DCODE is necessary to compile in BeOS? Looking to the patch doesn't seem so.


Yes, it is necessary because BeOS std lib/compiler has bug which crashes application as soon as it prints floating point value to stream (std::cerr << "value is: " << floating_point_value;). That's why i needed to "comment out" few such lines.
I used DCODE trick because i thought it's cleaner to use than #ifdef DEBUG ... #endif (or even worse: #ifndef __BEOS__ ... #endif), and i hoped it will be accepted to official source. I also thought that it could be used for every "debug" output in sourcecode (not only those few lines with floats), because IMHO output isn't needed for end-users, and DCODE could be easy way to remove output in stable ("official") builds (...and in cases like the one with BeOS ;)).


Top
 Profile  
 
 Post subject: Topic updated
PostPosted: February 21st, 2004, 2:47 pm 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
I've updated topic to support Wesnoth 0.6.99.4.
I also tried to make it a bit cleaner (more readable) and remove few "language bugs" (i'm not english native speaker and my english skill isn't too good).
Maybe one of admins could make it "sticky" topic (like with compiling on mac)? :)


Top
 Profile  
 
 Post subject: BeOS binaries available
PostPosted: February 25th, 2004, 1:54 pm 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
Just wanted to let You know that BeOS binary package was updated on BeBits :).
I'll try to update Wiki as soon as someone else will stop keeping it edited ;).


Top
 Profile  
 
 Post subject: -p4 and bebits
PostPosted: March 21st, 2004, 11:49 pm 
The current link on bebits does not work. To get the above patch to work you need -p4 not -p0. Compiling on Zeta cant find sstreeam header file.


Top
  
 
 Post subject: bebits updated
PostPosted: March 22nd, 2004, 1:12 pm 
Seems that the bebits link got taken down due to a reported issue. It is working now. Would still like advice on the sstream issue though.


Top
  
 
 Post subject:
PostPosted: March 22nd, 2004, 1:35 pm 
Forum Regular
Offline

Joined: September 15th, 2003, 2:54 pm
Posts: 537
Location: Sheffield (UK)
Download sstream from the GNU pages. I had this problem on the Mac until I left GCC 2.91 behind.

_________________
Fairydreams Photography & Creative Imaging
Website:http://www.fairydreams.co.uk


Top
 Profile WWW  
 
 Post subject: Re: bebits updated
PostPosted: March 22nd, 2004, 4:10 pm 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
I'm sorry for slow answering.

drake wrote:
To get the above patch to work you need -p4 not -p0. Compiling on Zeta cant find sstreeam header file.


On r5 it's -p0 (i checked it and it works ok, -p4 doesn't :)).

drake wrote:
Seems that the bebits link got taken down due to a reported issue. It is working now.


I removed download yesterday and put new version (recompiled) today. I hope there's no more "stream << float" things there (i played for a short time and all works well so far).

drake wrote:
Would still like advice on the sstream issue though

I've attached sstream i used. It's the one from official gcc 2.95.3 source package. I forgot that, by default, it's missing on BeOS.


Top
 Profile  
 
 Post subject: Re: bebits updated
PostPosted: March 22nd, 2004, 9:58 pm 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
ahwayakchih wrote:
drake wrote:
To get the above patch to work you need -p4 not -p0. Compiling on Zeta cant find sstreeam header file.


On r5 it's -p0 (i checked it and it works ok, -p4 doesn't :)).


OK, i'm stupid. You're right, it's -p4 not -p0. It worked here, because it's the same environment as the diff was made on :).
Sorry, and THX for correcting me.

--- edit ---

hmm... tried -p4 again and it didn't work, but -p5 works. it's the second path (writtend in diff file) which must be truncated, right? that would explain why -p5 worked here (because first path is "old" file, second is "new" file - and patch applies new one i guess).


Top
 Profile  
 
 Post subject: gcc 2.95.3
PostPosted: April 6th, 2004, 11:15 pm 
This does not seem to be available at bebbits aanymore any ideass barr waiting for the zeta release which is supposed to have a v3 toolchain?


Top
  
 
 Post subject: Re: gcc 2.95.3
PostPosted: April 18th, 2004, 6:41 pm 
Offline

Joined: February 6th, 2004, 12:41 pm
Posts: 79
Location: Warszawa, Polska
drake wrote:
This does not seem to be available at bebbits aanymore any ideass barr waiting for the zeta release which is supposed to have a v3 toolchain?


Compiler is back on BeBits. It was invisible, but it's not anymore :).
As for Zeta, don't ask me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group