How to compile Wesnoth on Mac OS X
Moderator: Forum Moderators
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
Not quite necromancy, as the main post is occasionally updatedmarkus_2 wrote:Apologies for the necromancy, but could those in the know please elaborate on the SDL libraries one is supposed to get?
For one, I can't find SDL proper, but even without that, what exactly am I supposed to download and where should the stuff go?
Follow the SDL link on the initial post, then download the libraries mentioned. SDL proper can be downloaded from the downloads section (go for v1.2).
Once downloaded, just install the packages.
Sithrandel wrote:Follow the SDL link on the initial post, then download the libraries mentioned. SDL proper can be downloaded from the downloads section (go for v1.2).
Once downloaded, just install the packages.
Thanks for the quick response.
Yes, I got the main SDL by now and installed it successfully. It came as a binary.
Unfortunately SDL_mixer, SDL_image and SDL_ttf apparently don't. I followed the advice from (IIRC) the second page and appended /release/to the URL, but that just gives me a page full of funny files, with no idea which one I need.
Alternatively I can download the source, and watch it sitting on my harddrive in all its glory and without having the slightest idea what to do with it. So, if you could give details on that "just install" from your post, that would help enormously.
What's needed to compile on OS 10.2?
I'm running Mac OS 10.2.1, and I'd like to try my hand at creating a build of Wesnoth 0.9.2. The only trouble is that I'm completely new to this kind of thing and I don't know which application(s) I should be using, aside of that Project Builder is one of them. If anyone could give me a rundown of what I need to get before I start building-- that is, assuming it's possible to compile 0.9.2 on this OS at all; from some earlier posts in this thread it looks like it might not be-- I would really appreciate it. Thanks in advance.
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
For reference, see also what is needed for a Mac OS X compilation using the commandline: http://wesnoth.slack.it/?CompilingWesnoth and http://wesnoth.slack.it/?CompilingWesnothOnMacOSX
This quote is not attributable to Antoine de Saint-Exupéry.
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
Downloaded and installed, works so far.Sithrandel wrote:Sorted out XCode 2.1, which seemed to do *lots* of silly things to my system... and have managed to get it to build. We just need to see whether that version works before updating How to Compile info.
Although as usual some user-made campaigns and scenarios give errors..
I'm trying to compile 0.9.3 for the first time in xCode 2.1 running Tiger. I think I've finally got all of the libraries installed (a bit of a trick).
These appear to be the right libraries:
http://www.libsdl.org/release/SDL-1.2.8.pkg.tar.gz
http://www.libsdl.org/projects/SDL_mixer
http://www.libsdl.org/projects/SDL_image
http://www.libsdl.org/projects/SDL_net
http://www.libsdl.org/projects/SDL_ttf
It doesn't look like it's necessary to do anything with gettext (?).
Now when I attempt to build the project, xCode returns 4 errors:
Missing file or directory: src/sdl_ttf/.cvsignore
Missing file or directory: src/serialization/.cvsignore
Missing file or directory: src/zipios++/.cvsignore
Missing file or directory: src/zip/.cvsignore
Any ideas?
edit: Right. That problem's sorted, and I got 290 more for my trouble.
SDL.h is not compiling because xCode claims that:
in stdint.h (line 100). Any ideas on that one? How do you break stdint.h? Sheesh...
- b.
These appear to be the right libraries:
http://www.libsdl.org/release/SDL-1.2.8.pkg.tar.gz
http://www.libsdl.org/projects/SDL_mixer
http://www.libsdl.org/projects/SDL_image
http://www.libsdl.org/projects/SDL_net
http://www.libsdl.org/projects/SDL_ttf
It doesn't look like it's necessary to do anything with gettext (?).
Now when I attempt to build the project, xCode returns 4 errors:
Missing file or directory: src/sdl_ttf/.cvsignore
Missing file or directory: src/serialization/.cvsignore
Missing file or directory: src/zipios++/.cvsignore
Missing file or directory: src/zip/.cvsignore
Any ideas?
edit: Right. That problem's sorted, and I got 290 more for my trouble.
SDL.h is not compiling because xCode claims that:
Code: Select all
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/stdint.h:100: error: duplicate 'unsigned'
- b.
La perfection est atteinte non quand il ne reste rien àajouter, mais quand il ne reste rien àenlever. - Antoine de Saint Exupery (of course)
.cvsignore are the files that CVS use to store what files need to ignore when uploading to the central repository... seems that the makefile (or equivalent) you are using got autogenerated from somebody who compiled the CVS version.
As a no Mac user I'm just giving theorical advice...
Just create a 0 bit files ("touch .cvsignore" in each directory from the console will do) as they are not important to the compilation.
OTOH you can also fix the project (or makefile or whaever file gives you the list of what files to compile) file.
As a no Mac user I'm just giving theorical advice...
Just create a 0 bit files ("touch .cvsignore" in each directory from the console will do) as they are not important to the compilation.
OTOH you can also fix the project (or makefile or whaever file gives you the list of what files to compile) file.
Yep. I fixed my project for the .cvsignore problem. Now another more serious one has cropped up. It looks like there's a conflict between one of the SDL libraries and stdint.h (they're both trying to make the same typedef?):
Any ideas anyone?
- b.
Code: Select all
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:21,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:34,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:20,
from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /System/Library/Frameworks/carbon.framework/Headers/carbon.h:20,
from MacOSX/SDLMacOSXMain.m:14:
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/stdint.h:100: error: duplicate 'unsigned'
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/stdint.h:100: error: 'long long long' is too long for GCC
MacOSX/SDLMacOSXMain.m:17:16: error: SDL.h: No such file or directory
- b.
La perfection est atteinte non quand il ne reste rien àajouter, mais quand il ne reste rien àenlever. - Antoine de Saint Exupery (of course)
These are the errors i get when compiling 0.9.5 following sith's instructions:
These seem to be easy-to-fix errors but i am not into programming enough to do this by myself Any ideas?
Code: Select all
SDLMacOSXMain.m:17: SDL.h: No such file or directory
SDLMacOSXMain.m:62: error: parse error before "event"
SDLMacOSXMain.m:62: error: `SDL_Event' undeclared (first use in this function) (Each undeclared identifier is reported only once for each function it appears in.)
SDLMacOSXMain.m:63: error: `SDL_QUIT' undeclared (first use in this function)
SDLMacOSXMain.m:63: error: `event' undeclared (first use in this function)
SDLMacOSXMain.m:64: implicit declaration of function `SDL_PushEvent'
SDLMacOSXMain.m:243: error: parse error before "event"
SDLMacOSXMain.m:243: error: `SDL_Event' undeclared (first use in this function)
SDLMacOSXMain.m:245: error: `SDL_KEYDOWN' undeclared (first use in this function)
SDLMacOSXMain.m:245: error: `event' undeclared (first use in this function)
SDLMacOSXMain.m:247: error: `SDL_PRESSED' undeclared (first use in this function)
SDLMacOSXMain.m:248: error: `KMOD_CTRL' undeclared (first use in this function)
SDLMacOSXMain.m:249: error: `SDLK_p' undeclared (first use in this function)
SDLMacOSXMain.m:708: implicit declaration of function `SDL_main'
SDLMacOSXMain.m:814: passing arg 2 of `NSApplicationMain' from incompatible pointer type
Hellrider:
I had a similar problem, stemming back to the fact that it can't find SDL.h
In the project file, go to "Targets" in the side bar, double click on Battle for Wesnoth, then under Summary > Settings > Search Paths, and make sure all of the paths to your SDL files are there. For example, I had the developer libraries installed in /Library rather than ~/Library.
Now I'm having a problem finding out how to install SDL_net with fink. Does anyone know?
I had a similar problem, stemming back to the fact that it can't find SDL.h
In the project file, go to "Targets" in the side bar, double click on Battle for Wesnoth, then under Summary > Settings > Search Paths, and make sure all of the paths to your SDL files are there. For example, I had the developer libraries installed in /Library rather than ~/Library.
Now I'm having a problem finding out how to install SDL_net with fink. Does anyone know?
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
Thanks Scott, i did as you suggested, the result now is that those 12 errors are now changed into these 3..
Code: Select all
about.cpp:314: error: `gettext' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)
gettext.hpp:19: libintl.h: No such file or directory
SDLMacOSXMain.m:814: passing arg 2 of `NSApplicationMain' from incompatible pointer type
To install sdl-net via fink you need to switch in fink to use unstable. Than you can compile the whole bunch. If you do install the stuff with fink anyway (you do have to) it is easier to do a complete commandline build. You can just install all the needed SDL-libs with fink and you upgrade gettext to use libgettext3-dev. If you did this it gets very easy even to build the cvs version of wesnoth. If you install a recent version of autoconf and automake (I do use autoconf2.5 and automake1.9) it is really no problem to build wesnoth via commandline. After compiling you only need to make wesnoth_bundle to create a correct .app file. There is only one thing I had to take care of:
I had to add something to configure so that it finds the correct version of gettext. My configure lie looks like this afterwards:
You can simply follow the instructions on this page in the wiki: http://www.wesnoth.org/wiki/CompilingWesnothOnMacOSX
I hope you are now able to compile Wesnoth using MacOS.
I had to add something to configure so that it finds the correct version of gettext. My configure lie looks like this afterwards:
Code: Select all
./configure --with-libintl-prefix=/sw --with-libiconv-prefix=/sw
I hope you are now able to compile Wesnoth using MacOS.