[crossfire] common/ and the build system.
tchize
tchize at myrealbox.com
Fri Aug 12 05:28:51 CDT 2005
Le Vendredi 12 Août 2005 03:19, Amorya North a écrit :
>
Not doing too well here. I decided the first thing to do was to try
>
and get all the files in common/ into an XCode project. This proved a
>
major challenge and I still haven't properly succeeded!
don't drop so fast, project has dependencies you know :)
>
>
The problem appears to be that common/ is not just drop-in stuff, but
>
is tied to the crossfire build system. I have not yet been able to
>
build crossfire client as a whole on my Mac - it complains of not
>
being able to find libpng (which is in /sw/includes). That's ok for
>
playing as I use the binary client. For messing with the source it's
>
not so good!
Yes, XCode use frameworks. However, everything in /sw is a problem
when distributing the binary other than creating deb packages, which
does not use xcode. When i compiled sdl-beta, my idea was to download
libpng source code (and libz as libpng depends on libz), build static binaries
of both and copy include & static libs in a mac specific directory of crossfire
project (i must still have the compling scripts somewhere to prepare the
sdl client xcode project, maybe you will find them usefull)
>
>
So as far as I can gather to use the common/ files as a base for my
>
client, I have to build a standard crossfire client, and then take
>
the autogenerated config.h file and drop that, as well as common/ and
>
help/, into my XCode project. Is that correct? Is that the _only_ way
>
I can use the common/ files?
lot's of things depends on the config.h which is generated from
config.h.in, this is basically the build configuration. etter ask Ryo
how he managed it, but i supposed this is something like
'create a windows config.h which is not autogenerated'
>
>
>
I tried writing the defines for config.h myself, to the best of my
>
knowledge. Once this was done the crossfire code compiled (after a
>
lot of hacking - dunno if it worked!), but was a nightmare as soon as
>
I tried to link to it in any file of mine. The problem here was that
>
I didn't know which headers to include in which order. Eventually it
>
got all tangled up with errors in <string.h>, which is one of Apple's
>
headers, so I don't know what was going on there.
Better get the error?
However, look in gtk/gtk.h, it includes header in right order, just remove
anything like #include <gtk/something.h">
>
>
>
I probably seem really clueless here. Coding Unix stuff is mostly
>
outside my area of knowledge... I've never had to think about
>
multiple platform issues before. Please don't write me off yet
>
though, as once I get started I should be able to pick up speed!
Nice to crossplatform code he :)
>
>
>
Posted by tchize:
>
> Just from my experience compiling the sdl-alpha releases of client
>
> on mac os x,
>
> the common part compiles without any problems using x-code IDE, the
>
> most
>
> difficult part, i'll say, was to get the sdl libs and dependencies
>
> to compile statically
>
> (so mac os x users don't need to install bunch of libraries before
>
> using it) and
>
> get xcode to use relative paths for includes instead of absolute
>
> ones (never achieved
>
> it but didn't search much).
>
>
Don't suppose you could send me your xcode project and files, if you
>
still have it around? I could then compare what's different in the
>
stuff I'm wrestling with!
>
>
>
Amorya
>
>
>
_______________________________________________
>
crossfire mailing list
>
crossfire at metalforge.org
>
http://mailman.metalforge.org/mailman/listinfo/crossfire
>
>
More information about the crossfire
mailing list