Compiling ToME under Mac OSX

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Message
Author
darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Compiling ToME under Mac OSX

#16 Post by darkgod »

The project has been updated in svn now.
As for 10.6 matters I have no idea, not an apple guy myself :/

About gas stuff it's indeed unused so what you did works too
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Encyclopath
Yeek
Posts: 13
Joined: Thu Jul 01, 2010 7:36 am

Re: Compiling ToME under Mac OSX

#17 Post by Encyclopath »

I'm trying to uplaod the xcode project that will compile on OSX 10.5 and probably 10.4 too, but the board doesn't seem to let me. Is there another way I can submit it?

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#18 Post by yufra »

If you want to compile for a different OSX version, go to Project -> Edit Project Settings. At the bottom change "Base SDK for All Configurations." I haven't tried this myself, so there maybe other things that need to be done. Cheers.
<DarkGod> lets say it's intended

Encyclopath
Yeek
Posts: 13
Joined: Thu Jul 01, 2010 7:36 am

Re: Compiling ToME under Mac OSX

#19 Post by Encyclopath »

Oh, I was able to do that, I had to specify paths to all the DSL* frameworks like you specified as well, and a couple other changes. I was just wondering if I could submit my xcode project file to be included in the next release. I'm sure there must be others in the position I was in.

Wombat
Halfling
Posts: 105
Joined: Thu Nov 09, 2006 5:11 pm
Location: on the outside looking in

Re: Compiling ToME under Mac OSX

#20 Post by Wombat »

Mac OSX builds are broken again :(

Code: Select all

Undefined symbols:
  "_luaopen_serial", referenced from:
      _boot_lua in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
any suggestions?

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#21 Post by yufra »

Yup, you need to add "serial.c" and "serial.h" to the Xcode project. The process is outlined here: http://forums.te4.org//viewtopic.php?p=93901#p93901
<DarkGod> lets say it's intended

Wombat
Halfling
Posts: 105
Joined: Thu Nov 09, 2006 5:11 pm
Location: on the outside looking in

Re: Compiling ToME under Mac OSX

#22 Post by Wombat »

thanks. much better now :)

Sirrocco
Sher'Tul
Posts: 1059
Joined: Fri Apr 23, 2010 4:56 am

Re: Compiling ToME under Mac OSX

#23 Post by Sirrocco »

Okay, I could use some help here.

I install Xcode. Check. Some of it is obnoxious, but that's a check.

I download the file named "source" from te4.org/Download and unpack it. Check. By my understanding, I should be at step 8 now, with [location of unpacked folder] in place of "t-engine4"

I open said folder. There is no "mac" folder there. There is a mac folder in the src folder, but it has no subfolders. There is not a "T-Engine.xcodeproj" or a "T-Engine" folder anywhere. (I ran a search.)

So... unless I'm missing something, either the downloadable source for 15b is unusable for the mac, or there's something terribly wrong with the posted directions.

I guess I'll try to dig around on forums for this password of which you speak.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#24 Post by yufra »

Good point, I'll update the first post. The source distribution you download from the website does not have the mac folder as you noted, and thus doesn't have the Xcode project. You need to download using SVN, and if you want to use the version that corresponds to beta 15b instead of the most recent code (which could be more broken/buggy, or less so) use this command instead of #7:

Code: Select all

svn co --username guest --password guestor http://svn.net-core.org/repos/t-engine4 t-engine4 -r 1995
<DarkGod> lets say it's intended

Sirrocco
Sher'Tul
Posts: 1059
Joined: Fri Apr 23, 2010 4:56 am

Re: Compiling ToME under Mac OSX

#25 Post by Sirrocco »

Ah. Thank you.

Editing the fourth post might also be appropriate.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#26 Post by yufra »

Good catch, thanks!
<DarkGod> lets say it's intended

kazak
Thalore
Posts: 174
Joined: Fri Mar 04, 2005 8:04 pm
Location: colorado

Re: Compiling ToME under Mac OSX

#27 Post by kazak »

So being that I have basically zero background in development-type stuff, I have some newb-ish questions regarding this whole process...

I sort of gather that what you get when using this method to download from the svn repository differs from what you'd get when downloading from the te4 website and may contain "experimental/buggy" stuff. For instance the first version I was able to get running was between betas 13 and 14, yet the Maj'Eyal switch had already been made, along with a number of other changes that didn't officially roll out until b14.

So, being that the working mac versions aren't exactly tied to the official releases on te4.org... well... I guess I'm wondering if there's an alternative timeline when downloading the game this way. And how do you check exactly which version you have versus what's available in svn? Is the svn download always the latest version, even if the te4 site says check back in a few days for the mac version?

I guess I'm basically just wondering if you can, for instance, download "beta 16" (or whatever) from svn even if it's not yet available on te4.

/hungover

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: Compiling ToME under Mac OSX

#28 Post by greycat »

When you first download a copy of the source through SVN, you're going to get what's called "HEAD", or the cutting edge of the development path. This is potentially unstable, and is not something you'll want to work with (unless you like living in interesting times).

After you've got your copy, you can then tell it to revert back to a specific revision number. For example, to move from HEAD to the revision for beta 16, you'd type this:

Code: Select all

svn update -r 2153
If you've made any bug fixes, etc. to the source code, then svn will prompt you when it detects a conflict between your copy and the repository's copy. If you want the repository's copy to overwrite your changes, just type "tf" for each such file.

After that, at least on Linux, I use "make clean; premake4 gmake; make" to compile it, and then it's ready to go.

All this Windows/Mac stuff is beyond me, so I can't help with that part.

asthmatic_thematic
Higher
Posts: 79
Joined: Tue Aug 19, 2008 7:15 pm

Re: Compiling ToME under Mac OSX

#29 Post by asthmatic_thematic »

stupid question. when i build using Xcode, i get 154 errors. they are all SDL problems with finding headers. the first error is in core_lua.c. It includes display.h, which includes display_sdl.h, which includes tSDL.h. that file has an __APPLE__ test, and then includes SDL_ttf.h. finally, SDL_ttf asks for SDL.h. but it can't find it.

the file that's actually having problems finding SDL.h is in fact
/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/SDL_ttf.framework/Headers/SDL_ttf.h

i didn't put anything there--i moved the SDL libraries into /Library/Frameworks. maybe they were linked into /Dev/SDKs/... or something by some process, or T-Engine by default uses that area, and it's lucky something is there, or whatever.

there are actual SDL.h files all around the place--in /Library/Frameworks, in the long directory listed above, etc. so i don't know what the problem is with finding SDL.h.

it then has the same problem with Begin_code, etc all the way down. Do I need to include another directory or something?

asthmatic_thematic
Higher
Posts: 79
Joined: Tue Aug 19, 2008 7:15 pm

Re: Compiling ToME under Mac OSX

#30 Post by asthmatic_thematic »

Just curious if anyone knew the issue here.

For whatever reason, Xcode is failing to load a header from the /Development/SDKs/MacOSX10.6.sdk/Library/.. set of frameworks. In particular, ../SDL_ttf.frameworks/Headers/SDL_ttf.h (the truetype wrapper) is trying to #include "SDL.h" on line 33. It can't find it, even though there is a copy at ../SDL.frameworks/Headers/SDL.h. The same file SDL_ttf.h then tries to load begin_code.h on line 34, and can't find that either, etc. It then can't find lots of stuff,

Now, it turns out that "../Headers/.." is a symbolic link to Versions/Current/Headers. But that target directory exists, for both SDL and SDL_ttf. So I'm still confused. Is there something I need to know about how to set up my directories?

To make this as clear as possible. Xcode is finding SDL_ttf.h in the /Dev/SDKs/10.6/Lib/Frwk/SDL_ttf.frwk section, but then oddly SDL_ttf.h can't find SDL.h which is in a parallel /Dev/SDKs/10.6/Lib/Frwk/SDL.frwk area, and certainly exists. Should I be doing some big directory #define to make Xcode find things better? (Eg, I put the frameworks where the instructions in the first post suggested; do I need to follow up that with a hard location inside the code?)

Sorry to be a bother. I'm interested in both seeing if I can make small contributions to the lua code (as I suggested in earlier threads regarding pet behavior), and trying to get the Mac version compiled earlier than usually comes out on the te4 site.

Thanks, if anyone has any clue!
Regards,
A-T

Post Reply