Compiling ToME under Mac OSX
Moderator: Moderator
Re: Compiling ToME under Mac OSX
Can't compile the new B26 on OS 10.5. I'm getting 'error: utf8proc.h: No such file or directory' along with 62 warnings.
Any ideas?
Cheers, D
Any ideas?
Cheers, D
Re: Compiling ToME under Mac OSX
Yup, you need to add the utf8proc files to the Xcode project, something that hasn't been done in the SVN yet. If you aren't comfortable doing that through Xcode you can try applying the attached patch.Dougiegee wrote:Can't compile the new B26 on OS 10.5. I'm getting 'error: utf8proc.h: No such file or directory' along with 62 warnings.
Any ideas?
Cheers, D
- Attachments
-
- utf8proc-xcode.txt
- (3.91 KiB) Downloaded 198 times
<DarkGod> lets say it's intended
Re: Compiling ToME under Mac OSX
Beta 28 compiles successfully (on OSX 10.5), starts up fine, but when the New Game screen comes up I can't start a new game. No freeze or crash, just nothing to select under "Modules".
Build Results shows 43 similar errors, almost all starting with:
Suggestions?
EDIT: If I check "Show incompatible", the module options come up and I can start a new character. I get a LUA error though when trying to call up the Level Up screen. The new Level Up interface isn't working on OSX maybe?
Build Results shows 43 similar errors, almost all starting with:
Code: Select all
warning: no rule to process file '$(PROJECT_DIR)/../../../../../Library/Frameworks/SDL.framework/Versions/A/Headers/begin_code.h' of type sourcecode.c.h for architecture i386
Suggestions?
EDIT: If I check "Show incompatible", the module options come up and I can start a new character. I get a LUA error though when trying to call up the Level Up screen. The new Level Up interface isn't working on OSX maybe?
Re: Compiling ToME under Mac OSX
Uhh ?
At what svn revision are you ?
It would look to me like an old binary is trying to run a recent module, what version is report for both tome and boot module ?
At what svn revision are you ?
It would look to me like an old binary is trying to run a recent module, what version is report for both tome and boot module ?
[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
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Compiling ToME under Mac OSX
Beta 29. Okay, using these instructions to build on osx 10.5, I get 178 errors: 9 errors in main.c and 169 errors in music.c.
Any other mac users got it working? Any initial suggestions? I can post the build results on here, but I thought I'd ask first as it's...lengthy.
EDIT: Build results attached.
Any other mac users got it working? Any initial suggestions? I can post the build results on here, but I thought I'd ask first as it's...lengthy.
EDIT: Build results attached.
- Attachments
-
- Build Results.rtf
- (38.16 KiB) Downloaded 161 times
Re: Compiling ToME under Mac OSX
After spending some time playing around with xcode, I managed a somewhat successful build. The problem is the new music.h and music.c files. They just don't work.
Having essentially no developer skills, I didn't attempt to fix them. Instead, I replaced them with the corresponding files from b28, modified tSDL.h appropriately (commenting in SDL_mixer), and then it built successfully.
The game wouldn't actually run until I modified the audio lines in engine/init.lua. I tried replacing them with the lines from b28, but it still wouldn't run, so I just commented out everything dealing with audio/sound.
At this point everything is running and playable except obviously there's no sound.
Having essentially no developer skills, I didn't attempt to fix them. Instead, I replaced them with the corresponding files from b28, modified tSDL.h appropriately (commenting in SDL_mixer), and then it built successfully.
The game wouldn't actually run until I modified the audio lines in engine/init.lua. I tried replacing them with the lines from b28, but it still wouldn't run, so I just commented out everything dealing with audio/sound.
At this point everything is running and playable except obviously there's no sound.
Re: Compiling ToME under Mac OSX
You need to install Ogg and Vorbis frameworks, http://xiph.org/downloads/ (libogg and libvorbis).
They both have an xcode project, open it, set it to your achitecture and compile it, you'll get two frameworks you can place in /Library/Frameworks/
They both have an xcode project, open it, set it to your achitecture and compile it, you'll get two frameworks you can place in /Library/Frameworks/
[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
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Compiling ToME under Mac OSX
Sweet. I got the frameworks fine and placed them in MacintoshHD/Library/Frameworks. Note: there's another frameworks folder at MacintoshHD/System/Library/Frameworks. I don't know if it makes any difference which one they go in. The first folder contains all the SDL frameworks, while the second one has things like the OPENAL and OPENGL frameworks.
So now what? I downloaded a new Tome4, rolled it back to 3839. The build still fails, so I hit "add frameworks" and added the libogg and libvorbis frameworks. Got the same errors, so I tried moving them to the Linked Frameworks folder. Do I need to add the individual ***.h files somewhere?
Thanks for all the help!
So now what? I downloaded a new Tome4, rolled it back to 3839. The build still fails, so I hit "add frameworks" and added the libogg and libvorbis frameworks. Got the same errors, so I tried moving them to the Linked Frameworks folder. Do I need to add the individual ***.h files somewhere?
Thanks for all the help!
Re: Compiling ToME under Mac OSX
Okay, finally got a successful compile. The trick was I had to change the includes from <alc.h> to "alc.h". Had to do this for al.h, alc.h, vorbisfile.h, etc....
EDIT:
Beta 31 compiles successfully as well, after the following steps...
1) In Xcode, add existing files "al.h", "alc.h", "ogg.h", and "vorbisfile.h"
2) Edit "music.h" by changing <......> to "......" for the #include lines
3) Build.
EDIT:
Beta 31 compiles successfully as well, after the following steps...
1) In Xcode, add existing files "al.h", "alc.h", "ogg.h", and "vorbisfile.h"
2) Edit "music.h" by changing <......> to "......" for the #include lines
3) Build.
-
- Higher
- Posts: 79
- Joined: Tue Aug 19, 2008 7:15 pm
Re: Compiling ToME under Mac OSX
Hi: has anyone succeeded compiling with OSX Lion and XCode 4.1? Just checking!!!
Re: Compiling ToME under Mac OSX
Okay, so I'm trying to compile under OSX 10.5, Xcode 3.1.4
I've followed the instructions as well as I can figure them (though I wound up having to use the find feature to figure out where al.h and alc.h were. I'm getting 39 warnings, and 25 errors.
The warnings all come in the form of
> warning: no rule to process file '$(PROJECT_DIR)/../../../../../Library/Frameworks/SDL.framework/Versions/A/Headers/begin_code.h' of type sourcecode.c.h for architecture i386
I'm suspecting that they're just complaining that I'm including files I have no use for, but if it's more serious than that, I'd like to know.
The errors are all linking errors. They all look something like
> "_alSourcePlay", referenced from:
> _soundPlayLua in music.o
> _soundPlayLua in music.o
and every single one of them is coming out of music.o
any suggestions? Is there any quick and easy way to say "I don't really care about the music, just let me compile and play silently."?
Thank you for your time.
I've followed the instructions as well as I can figure them (though I wound up having to use the find feature to figure out where al.h and alc.h were. I'm getting 39 warnings, and 25 errors.
The warnings all come in the form of
> warning: no rule to process file '$(PROJECT_DIR)/../../../../../Library/Frameworks/SDL.framework/Versions/A/Headers/begin_code.h' of type sourcecode.c.h for architecture i386
I'm suspecting that they're just complaining that I'm including files I have no use for, but if it's more serious than that, I'd like to know.
The errors are all linking errors. They all look something like
> "_alSourcePlay", referenced from:
> _soundPlayLua in music.o
> _soundPlayLua in music.o
and every single one of them is coming out of music.o
any suggestions? Is there any quick and easy way to say "I don't really care about the music, just let me compile and play silently."?
Thank you for your time.
Re: Compiling ToME under Mac OSX
Hi, Sirrocco, I'm going to assume you're trying to build the version in svn. I managed to compile under OSX 10.5 on somebody else's computer a week or two ago. I'll try to help, but I have three disclaimers: (1) I'm working off of memory, (2) I'm more familiar compiling under linux than a mac, and (3) I think the normal mac guys who help DarkGod with compiling on the mac haven't been around much recently.
First, build ToME on the command line. Don't use the XCode project anymore (unless you know how to bring it up to date and make it work, which I don't). I believe you're supposed to use premake4 to create the makefiles, which is the same command as on linux and MinGW on Windows: `premake4 gmake` followed by `make`. You'll probably still need to do a little bit of tinkering to make things work, but not a whole lot and it's relatively straightforward.
Second, you may need additional frameworks. Regarding music, you need Ogg, Vorbis, and openAL. The pre-compiled mac binary for b31 should have most of what you need, and openAL may already be in "/System/Library/Frameworks" (iirc). You also need "libpng" (version 1.2 ought to work, and 1.3 or 1.4 may work too).
The most important new framework you need, though, is SDL 1.3. Go here and follow directions: http://www.libsdl.org/hg.php . Note that I think ToME still looks for files in "SDL.framework/Versions/A/...", but 1.3 doesn't have the "A" directory. Simply making an "A" alias there in the SDL 1.3 framework works for now.
Third, if you need to modify build files, they're in the "build/" directory. I recall I had to modify "build/TEngine.make", but, then, I didn't put the required frameworks in the normal spot (since it wasn't my computer), and I mostly brow-beat this into working. I don't know if all the new frameworks are properly included in the makefiles.
Fourth, when you compile successfully, the makefile script will probably fail when it tries to cp the "t-engine" executable to the current directory. This is fine; just find "t-engine" and run it. The "game/" directory needs to be in the correct location relative to "t-engine" (or maybe from where you run t-engine--I can't recall), so you may need to move "t-engine" around or make an alias or link to "game/" wherever "t-engine" is trying to find it.
I'm sorry if I'm a little too vague at times, but I hope this will help you find your way. Also, it may be helpful to others if you took notes and posted what actions and changes you needed to do to compile and run ToME. Good luck!
First, build ToME on the command line. Don't use the XCode project anymore (unless you know how to bring it up to date and make it work, which I don't). I believe you're supposed to use premake4 to create the makefiles, which is the same command as on linux and MinGW on Windows: `premake4 gmake` followed by `make`. You'll probably still need to do a little bit of tinkering to make things work, but not a whole lot and it's relatively straightforward.
Second, you may need additional frameworks. Regarding music, you need Ogg, Vorbis, and openAL. The pre-compiled mac binary for b31 should have most of what you need, and openAL may already be in "/System/Library/Frameworks" (iirc). You also need "libpng" (version 1.2 ought to work, and 1.3 or 1.4 may work too).
The most important new framework you need, though, is SDL 1.3. Go here and follow directions: http://www.libsdl.org/hg.php . Note that I think ToME still looks for files in "SDL.framework/Versions/A/...", but 1.3 doesn't have the "A" directory. Simply making an "A" alias there in the SDL 1.3 framework works for now.
Third, if you need to modify build files, they're in the "build/" directory. I recall I had to modify "build/TEngine.make", but, then, I didn't put the required frameworks in the normal spot (since it wasn't my computer), and I mostly brow-beat this into working. I don't know if all the new frameworks are properly included in the makefiles.
Fourth, when you compile successfully, the makefile script will probably fail when it tries to cp the "t-engine" executable to the current directory. This is fine; just find "t-engine" and run it. The "game/" directory needs to be in the correct location relative to "t-engine" (or maybe from where you run t-engine--I can't recall), so you may need to move "t-engine" around or make an alias or link to "game/" wherever "t-engine" is trying to find it.
I'm sorry if I'm a little too vague at times, but I hope this will help you find your way. Also, it may be helpful to others if you took notes and posted what actions and changes you needed to do to compile and run ToME. Good luck!

Re: Compiling ToME under Mac OSX
okay... a few things.
- I'm currently running under SDL 1.2 (if a somewhat older version) - you're saying that that's no longer sufficient? The SDL website notes that 1.3 is potentially a tch unstable.
- I'm trying to compile the latest release copy (Beta 31, svn 3962). Since I'm using OSX 10.5, the prebuilt doesn't work for me.
- WRT the XCode project, what do you mean "bring it up to date and make it work"?
- I note that there is a "no music" option on basically every compiled copy for download. I'm pretty sure that if I just compiled without the music portion, it would work fine at this point (and I honestly don't care much about the music for the moment)
- I'm currently running under SDL 1.2 (if a somewhat older version) - you're saying that that's no longer sufficient? The SDL website notes that 1.3 is potentially a tch unstable.
- I'm trying to compile the latest release copy (Beta 31, svn 3962). Since I'm using OSX 10.5, the prebuilt doesn't work for me.
- WRT the XCode project, what do you mean "bring it up to date and make it work"?
- I note that there is a "no music" option on basically every compiled copy for download. I'm pretty sure that if I just compiled without the music portion, it would work fine at this point (and I honestly don't care much about the music for the moment)
Re: Compiling ToME under Mac OSX
SDL 1.2 works for beta 31, but you need SDL 1.3 (yes, unstable) for > beta 31.
Re: Compiling ToME under Mac OSX
Really? The pre-built binary worked for me in OSX 10.5 (except it had no sound). If you run the game from the Terminal, the game will display output messages in another Terminal. I would be curious to see what is stopping the game from running properly.Sirrocco wrote:Since I'm using OSX 10.5, the prebuilt doesn't work for me.
The only difference with the "no music" download option is it doesn't include the music files. That's it. It's intended for people who have downloaded a previous version of ToME and just want to copy the music files over themself (because they are quite large).Sirrocco wrote:- I note that there is a "no music" option on basically every compiled copy for download. I'm pretty sure that if I just compiled without the music portion, it would work fine at this point (and I honestly don't care much about the music for the moment)
I couldn't tell you, 'cause I don't knowSirrocco wrote:- WRT the XCode project, what do you mean "bring it up to date and make it work"?
