How to compile Wesnoth on Mac OS X
Moderator: Forum Moderators
-
- macOS Packager
- Posts: 239
- Joined: April 17th, 2004, 5:16 pm
- Location: Ontario, Canada
- Contact:
Re: How To Compile On A Mac
I did post one last night.
Installing fonts shouldn't be a big issue really, the only reason it'd take me any amount of time is that I don't know Obj-C very well.
Anyway, thanks for the suggestions, I'll try them.
UPDATE:
Neither of those fonts have Arabic. However, Arial does, and Arial Unicode MS theoretically does, as well as having a bunch of asian and other languages, but the Arabic in it doesn't work...
In other news, my build doesn't work on i386 10.4, because of gmodule linking to too new a version of iconv. Could you please send me your gmodule, and I can see if it works?
UPDATE2:
Nevermind about gmodule; I built a new version that works.
Installing fonts shouldn't be a big issue really, the only reason it'd take me any amount of time is that I don't know Obj-C very well.
Anyway, thanks for the suggestions, I'll try them.
UPDATE:
Neither of those fonts have Arabic. However, Arial does, and Arial Unicode MS theoretically does, as well as having a bunch of asian and other languages, but the Arabic in it doesn't work...
In other news, my build doesn't work on i386 10.4, because of gmodule linking to too new a version of iconv. Could you please send me your gmodule, and I can see if it works?
UPDATE2:
Nevermind about gmodule; I built a new version that works.
Re: How To Compile On A Mac
I need to compile now on my mac.
I haven't checked the svn because it is slow compared with downloading the src tar bz.
I haven't found any mac compile stuff. Are you guys using the command line or an xcode project? Is the xcode project available for 1.4.7?
Thanks.
edit:
See below, I actually need to compile 1.5.6 now.
I haven't checked the svn because it is slow compared with downloading the src tar bz.
I haven't found any mac compile stuff. Are you guys using the command line or an xcode project? Is the xcode project available for 1.4.7?
Thanks.
edit:
See below, I actually need to compile 1.5.6 now.
Last edited by MCP on December 21st, 2008, 11:09 pm, edited 1 time in total.
Re: How To Compile On A Mac
See here for mac compile stuff.
They might not be for 1.4.7, but you can use them by modifying it according to the error messages for nonexistent source files. For 1.5 however, mine only work up to 1.5.2 (or whatever's on there), as I'm too busy to find out how to fix the xcode files to account for the config changes since 1.5.3; you'll have to ask penguin to upload those on sf.net.
They might not be for 1.4.7, but you can use them by modifying it according to the error messages for nonexistent source files. For 1.5 however, mine only work up to 1.5.2 (or whatever's on there), as I'm too busy to find out how to fix the xcode files to account for the config changes since 1.5.3; you'll have to ask penguin to upload those on sf.net.
Take a breath.
Re: How To Compile On A Mac
Actually re-do, I need to compile 1.5.6.
So penguin released 1.5.6 latest version? Was it xcode or command line?
Thanks.
So penguin released 1.5.6 latest version? Was it xcode or command line?
Thanks.
-
- macOS Packager
- Posts: 239
- Joined: April 17th, 2004, 5:16 pm
- Location: Ontario, Canada
- Contact:
Re: How To Compile On A Mac
I use XCode, but my current setup is a bit messy; I'll commit it to svn once it's not so messy.
What's the goal of your compiling? To be able to edit the source? If so, I would think getting all the required stuff with fink and compiling on the command line would be easiest. I use XCode because I think it's easier to make a universal binary .app that doesn't rely on anything that's only on my computer - but just for your own computer, command line would be easier, I think.
Actually, now that I look at it, it's not that messy anymore (now that I've got good builds of the Boost libraries), but it is 15MB compressed, and I'm currently on dialup, while my better internet is down. On dialup, that would take too long for me to upload, I think (unless you really urgently need it).
What's the goal of your compiling? To be able to edit the source? If so, I would think getting all the required stuff with fink and compiling on the command line would be easiest. I use XCode because I think it's easier to make a universal binary .app that doesn't rely on anything that's only on my computer - but just for your own computer, command line would be easier, I think.
Actually, now that I look at it, it's not that messy anymore (now that I've got good builds of the Boost libraries), but it is 15MB compressed, and I'm currently on dialup, while my better internet is down. On dialup, that would take too long for me to upload, I think (unless you really urgently need it).
Re: How To Compile On A Mac
While waiting for penguin to upload his compile stuff, here's an workaround using my build system via terminal:
This example code to launch BfW points it to the right program data directory, and should work for 1.5.6, haven't tested for 1.5.7.
I'll try to to find an elegant solution later so that it's built in when compiling.
Code: Select all
/Users/Amir/Projects/wesnoth-1.5.6/MacCompileStuff/build/Wesnoth/Battle\ for\ Wesnoth.app/Contents/MacOS/Battle\ for\ Wesnoth /Users/Amir/Projects/wesnoth-1.5.6/MacCompileStuff/build/Wesnoth/Battle\ for\ Wesnoth.app/Contents/Resources
I'll try to to find an elegant solution later so that it's built in when compiling.
Take a breath.
-
- macOS Packager
- Posts: 239
- Joined: April 17th, 2004, 5:16 pm
- Location: Ontario, Canada
- Contact:
Re: How To Compile On A Mac
I'm surprised it still doesn't work for you. How do you set the data directory? In 1.5.6 it didn't work to set it to . or ./, but that was fixed in 1.5.7. But that was the only case that was fixed - it still wouldn't work with ../ - is that what you're using?
Re: How To Compile On A Mac
Actually, I never used anything before this (dating from 1.3. to make it point to ../Resources (which contains /data), and everything worked just fine.
I re-downloaded 1.5.3 source (the last where I didn't get problems) to see if there are any clues to find a solution. But since playing (yeah, 1.5.7 unsurprisingly still has the problem) is more relaxing, I've decided to only work on it a few hours a week at most, so I'll take a look at it again this weekend.
I re-downloaded 1.5.3 source (the last where I didn't get problems) to see if there are any clues to find a solution. But since playing (yeah, 1.5.7 unsurprisingly still has the problem) is more relaxing, I've decided to only work on it a few hours a week at most, so I'll take a look at it again this weekend.
Take a breath.
-
- macOS Packager
- Posts: 239
- Joined: April 17th, 2004, 5:16 pm
- Location: Ontario, Canada
- Contact:
Re: How To Compile On A Mac
Well that's the problem - Wesnoth currently doesn't work with relative paths like ../Resources. It's been fixed for the specific cases of "./" and "." (the current directory), and that's what I use. I cd to ../Resources in the Objective-C code (SDLMain.m), and then use "./".
Actually, I just looked at the C++ to see one of the workarounds you could make, and it looks like it should work now, in current svn.
Actually, I just looked at the C++ to see one of the workarounds you could make, and it looks like it should work now, in current svn.
Re: How To Compile On A Mac
I just noticed the following messages in the "Konsole" application.
I don't know if this one is important:
29.01.09 15:52:38 [0x0-0x2c02c0].org.wesnoth.Wesnoth[6939] Game executable doesn't have the name "wesnoth" or similar; impossible to guess the server executable name.
But this one may be a problem in the future:
29.01.09 15:52:38 Wesnoth[6939] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
Edit: I'm using Mac OS X 10.5.6 and Wesnoth 1.5.8.
I don't know if this one is important:
29.01.09 15:52:38 [0x0-0x2c02c0].org.wesnoth.Wesnoth[6939] Game executable doesn't have the name "wesnoth" or similar; impossible to guess the server executable name.
But this one may be a problem in the future:
29.01.09 15:52:38 Wesnoth[6939] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
Edit: I'm using Mac OS X 10.5.6 and Wesnoth 1.5.8.
Re: How To Compile On A Mac
The former isn't important.
The latter isn't important...yet. This is probably related to the Mac port of SDL. We'll have to watch out if anything goes wrong in 10.6 Cocoa (I've seen the warning since at least Tiger).
The latter isn't important...yet. This is probably related to the Mac port of SDL. We'll have to watch out if anything goes wrong in 10.6 Cocoa (I've seen the warning since at least Tiger).
Take a breath.
-
- macOS Packager
- Posts: 239
- Joined: April 17th, 2004, 5:16 pm
- Location: Ontario, Canada
- Contact:
Re: How To Compile On A Mac
The latter is definitely SDL. Nothing we can really do about it, even if it does become important.
-
- macOS Packager
- Posts: 239
- Joined: April 17th, 2004, 5:16 pm
- Location: Ontario, Canada
- Contact:
Re: How To Compile On A Mac
I finally got around to cleaning up my Wesnoth build stuff. I've made it so everything needed to compile (all headers and libraries) is in one folder. You should just have to put the folder in a Wesnoth svn checkout directory, open the xcodeproj file, and build. You do have to manually manage the source files though; remove deleted ones, add new ones. The copy I've uploaded is in sync with svn revision 32514.
Anyway, here's the link:
http://wesnoth.happyspork.com/files/Mac ... _Stuff.zip
Let me know if you have any problems with it.
Note: It requires XCode 3 (which requires Leopard).
Anyway, here's the link:
http://wesnoth.happyspork.com/files/Mac ... _Stuff.zip
Let me know if you have any problems with it.
Note: It requires XCode 3 (which requires Leopard).
- alexcurylo
- Posts: 7
- Joined: February 21st, 2009, 7:01 pm
Re: How To Compile On A Mac
Looks like it's missing some from the /Resources folder -- "pango.aliases" file, "pango.modules" file, and "Python Stuff" folder. Are they hiding somewhere else and the project is confused?penguin wrote:I finally got around to cleaning up my Wesnoth build stuff. I've made it so everything needed to compile (all headers and libraries) is in one folder. You should just have to put the folder in a Wesnoth svn checkout directory, open the xcodeproj file, and build.
-
- macOS Packager
- Posts: 239
- Joined: April 17th, 2004, 5:16 pm
- Location: Ontario, Canada
- Contact:
Re: How To Compile On A Mac
Ah! I don't know how I didn't include those. The Python Stuff folder is 65MB, and Python is being removed for 1.6. So I'll just attach those two small files here for you for now, and I'll try to make another package for 1.6 with Python removed.
If you want to remove Python yourself, just go to Edit Project Settings and remove HAS_PYTHON from Preprocessor Macros (it'll be easier to find if you select "Show: Settings Defined at This Level"). And then delete Python.framework from Frameworks > Other Frameworks (in the left side of the project window).
Anyway, sorry about that, and here's those files. Thanks for pointing it out! I also realized, in the last release, I forgot to remove that python stuff that I didn't include in the building package; so that'll be another 65mb smaller for next release!
If you want to remove Python yourself, just go to Edit Project Settings and remove HAS_PYTHON from Preprocessor Macros (it'll be easier to find if you select "Show: Settings Defined at This Level"). And then delete Python.framework from Frameworks > Other Frameworks (in the left side of the project window).
Anyway, sorry about that, and here's those files. Thanks for pointing it out! I also realized, in the last release, I forgot to remove that python stuff that I didn't include in the building package; so that'll be another 65mb smaller for next release!
- Attachments
-
- pango_files.zip
- (1.48 KiB) Downloaded 326 times