Page 1 of 1

Building on Mac OS X / XCode

Posted: Mon Oct 24, 2005 3:11 pm
by richcon
I've got Tiger and XCode 1.1 on my system. Has anyone here had luck getting it to build with XCode? The only instructions I've seen have to do with building using CodeWarrior, which I don't have.

Thanks!

Re: Building on Mac OS X / XCode

Posted: Sun Oct 30, 2005 8:20 am
by EmuBite
I'd be interested in this as well. If this is not possible, is anyone maintaining daily/weekly OS X binaries? I'd like to give 1.4 a try, but I can't find a binary or build instructions that will work for me.

Thanks for continuing to develop a great application. Keep up the good work.

Re: Building on Mac OS X / XCode

Posted: Sun Oct 30, 2005 10:20 am
by wjp
Using configure and make from the commandline should work, as far as I know.

Re: Building on Mac OS X / XCode

Posted: Sat Dec 03, 2005 3:20 pm
by richcon
I got the 1.4 CVS snapshot, and in the README.MacOSX leaves out an important step that had me confused for a little bit. It says to use Fink to install sdl, sdl-mixer, automake1.9, and libtool1.4. It doesn't mention that to use them, I have to add the following lines to my .bash_login file:

PATH=/sw/bin:$PATH
MANPATH=/sw/share/man:$MANPATH
INFOPATH=/sw/share/info:$INFOPATH

Once I got this figured out (and figured out where Fink was installing the stuff), the autogen.sh and configure scripts finally seemed to work. (The order here was important, or else it was defaulting to automake1.6 and was running into trouble.)

Error builting on Mac OS X

Posted: Sat Dec 03, 2005 3:28 pm
by richcon
After ./autogen.sh and ./configure seemed to work, make exits with an error. There's too much stuff to post everything here, but the final lines it put out are:

if /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./../headers -I./.. -I./../imagewin -I./../shapes -I./../pathfinder -I./../files -I./../server -I./../gumps -I./../audio -I./../usecode -I/sw/include/SDL -D_THREAD_SAFE -DMACOSX -O2 -Wno-long-long -MT contain.lo -MD -MP -MF ".deps/contain.Tpo" -c -o contain.lo contain.cc; \
then mv -f ".deps/contain.Tpo" ".deps/contain.Plo"; else rm -f ".deps/contain.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./../headers -I./.. -I./../imagewin -I./../shapes -I./../pathfinder -I./../files -I./../server -I./../gumps -I./../audio -I./../usecode -I/sw/include/SDL -D_THREAD_SAFE -DMACOSX -O2 -Wno-long-long -MT contain.lo -MD -MP -MF .deps/contain.Tpo -c contain.cc -o contain.o
contain.cc: In member function 'bool Container_game_object::show_gump(int)':
contain.cc:522: error: 'cheat' was not declared in this scope
make[2]: *** [contain.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2



The last lines of ./configure are:

config.status: executing depfiles commands

Exult v1.4.01cvs

SDL ....................... : 1.2.8
Build tools................ : yes
Build ExultStudio.......... : no

Now type 'make' to build Exult



I'm on 10.4.3, with XCode 2.1 installed.

Re: Building on Mac OS X / XCode

Posted: Sat Dec 03, 2005 4:42 pm
by Dominus
There might be problems with the source snapshot you can download from our downloadpage, since the source has been checked out on Windows. Best try to get it directly from CVS and not from the download page. Of course I'm probably all wrong about it, I just remember that people had problems with the zip we have on the pentagram page.

Re: Building on Mac OS X / XCode

Posted: Sat Dec 03, 2005 9:49 pm
by richcon
I got it directly from CVS this time, and got the same exact error.

This is my first time using cvs directly, and after logging in, did the following command:

rich$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/exult co -P exult
cvs checkout: Updating exult
U exult/.cvsignore
[and a whole lot more...]

Re: Building on Mac OS X / XCode

Posted: Sat Dec 03, 2005 9:56 pm
by richcon
I took a look through the code. It does reference a variable 'cheat' in contain.cc (line 522) that's not defined anywhere in the file or its header:

case 800: // Chest.
if (!cheat.in_map_editor() && get_quality() >= 251) // Trapped?
{ // Run normal usecode fun.
ucmachine->call_usecode(shnum, this,
(Usecode_machine::Usecode_events) event);
return true;
}
// FALL THROUGH to 486.
case 486: // Usecode container.
gump_man->add_gump(this, game->get_shape("gumps/chest"));
return true;


However, I did find this at the top of the file:

#ifdef USE_EXULTSTUDIO
#include "cheat.h"
#include "server.h"
#include "objserial.h"
#include "servemsg.h"
#endif


The file cheat.h does define a variable "cheat" (of type Cheat). Perhaps the reason I'm finding this error is because I'm not compiling Exult Studio, just Exult. Did someone forget to put this in an #ifdef too?

Re: Building on Mac OS X / XCode

Posted: Sun Dec 04, 2005 1:16 am
by wjp
Fixed now. Thanks for the report!

Re: Building on Mac OS X / XCode

Posted: Sun Dec 04, 2005 7:06 pm
by richcon
wjp,

Your change is the same as what I did to get it to compile last night (glad I was reading it right). Thanks for getting it checked into the CVS. I ran into another error building Exult, though I waited until I got your official fix to try and sort it out.

Luckily, I was able to figure this one out too (though the error output was a little cryptic at first). It seems that Exult now needs three additional libraries to be installed than what is listed in the READMEs:

libvorbis0
libogg
smpeg

Someone might want to update the README and INSTALL files with the new libraries. But for now, I've finally gotten the CVS snapshot to compile! (I won't have a chance to play with it until another day. I assume it's a bad idea to actually try playing through the game with it, since this is my first time playing Serpent Isle at all. But I'll give it a try.)