UFO:Alien Invasion

Technical support => Mac => Topic started by: enchantedsord on September 17, 2008, 11:57:01 pm

Title: 2.3 dev version for mac question
Post by: enchantedsord on September 17, 2008, 11:57:01 pm
Hello,

I did a search and all I can find if info on how to compile the dev version 2.3 for the mac, but i'm not a programmer and have never compiled anything.  Are there any better instructions out there that would help someone like me?  Or even if someone has compiled it is there a download 2.3 anywhere for an intel mac?  I can find one in the windows forum but not here in the mac forum.

anyway any help somone could provide would be great.

Thanks in advance.
 
Title: Re: 2.3 dev version for mac question
Post by: stevenjackson on September 18, 2008, 12:45:57 am
Hi

I'm one of the mac developers for ufoai.
What are the problems you are having with the instructions?  which part is confusing?

Steve
Title: Re: 2.3 dev version for mac question
Post by: enchantedsord on September 18, 2008, 12:51:46 am
ok so I installed Fink to do the compiling and honestly now sure how to do the compile. 

I was trying to work from this page just to see if I could get a compile to work.
http://ufoai.ninex.info/wiki/index.php/Compile_for_Mac

1 fink install svn-ssl svn-client sdl sdl-ttf gettext libjpeg libpng3
2 mkdir -p ufoai/trunk
3 cd ufoai/trunk
4 svn co https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk . (I was able to get up to this point)
5 ./configure CPPFLAGS="-I/sw/include/" LDFLAGS="-L/sw/lib"
6 make
7 make macinstaller

After when I try to run the line 5 below I get "-bash: /configure: No such file or directory" and can't proceed.

I"m sure i'm just stupid or doing something wrong but I just haven't compiled something outside of making an exe in vb.  Am I even close or way off?
Title: Re: 2.3 dev version for mac question
Post by: Mattn on September 18, 2008, 08:14:06 am
/configure? try ./configure
if that still doesn't work, please post a ls in ufoai/trunk at http://pastebin.com
Title: Re: 2.3 dev version for mac question
Post by: enchantedsord on September 18, 2008, 08:40:09 am
ok so I got further.  guess I wasn't in the trunk dir.

Finally I was able to get step 5 to go but now it's saying

checking build system type... i686-apple-darwin9.5.0
checking host system type... i686-apple-darwin9.5.0
checking target system type... i686-apple-darwin9.5.0
checking system... Mac OS X
checking for sed... yes
checking for echo... yes
checking target OS... configure: error: Could not find SDL Framework at /Library/Frameworks.

Any idea by chance what this means?

Thanks again for the help.

Title: Re: 2.3 dev version for mac question
Post by: stevenjackson on September 18, 2008, 08:58:02 am
Yep, you missed the first part of the document:

  Preparation: SDL

Download the following:

* SDL
* SDL_mixer
* SDL_ttf

From each of those dmg installers, copy the ".framework" folder to /Library/Frameworks/

its just above the quickstart heading.  follow the links to download them and copy them into /Library/Frameworks/

Steve
Title: Re: 2.3 dev version for mac question
Post by: enchantedsord on September 18, 2008, 09:02:47 am
Well since I had posted I realized this.  Now looking on my mac in the library folder I don't seem to have a frameworks folder at all.  I did create the folder but get same result.  Am I suppose to have to create the frameworks folder or am I looking in wrong place?
Title: Re: 2.3 dev version for mac question
Post by: enchantedsord on September 18, 2008, 07:10:47 pm
Ok well i think I figured out that the framework has to go in the system\library\frameworks and I was looking in the user folder\library.

trying again now and hoping this works.
Title: Re: 2.3 dev version for mac question
Post by: enchantedsord on September 18, 2008, 09:48:34 pm
Apparently i'm doomed.  Still not working.


I have moved the  SDL, SDL_mixer and SDL_ttf to the System\library\frameworks folder and tried all the steps again.  still getting

Macbook-Pro:trunk profile$ ./configure CPPFLAGS="-I/sw/include/" LDFLAGS="-L/sw/lib"
checking build system type... i686-apple-darwin9.5.0
checking host system type... i686-apple-darwin9.5.0
checking target system type... i686-apple-darwin9.5.0
checking system... Mac OS X
checking for sed... yes
checking for echo... yes
checking target OS... configure: error: Could not find SDL Framework at /Library/Frameworks.
Macbook-Pro:trunk Profile$

Anyone have any other suggestions?  Does it sound like i'm doing something wrong?
Title: Re: 2.3 dev version for mac question
Post by: stevenjackson on September 19, 2008, 12:10:04 am


Hmm, i'm not on a mac at the moment.  When i get home i'll just check the exact location of those libraries for me and let you know.
Dont worry we'll sort it out.

Steve
Title: Re: 2.3 dev version for mac question
Post by: enchantedsord on September 19, 2008, 12:28:05 am
ok thanks.  No worries.  now i was thinking maybe the issue is I didn't install the developer tools on the mac cd although I wasn't sure if maybe that was't needed if I installed fink.  Is it?  if it is then I can try that when I get home. 

Thanks again for the help.
Title: Re: 2.3 dev version for mac question
Post by: stevenjackson on September 20, 2008, 12:40:11 pm

You need to have installed the xcode tools so you get gcc.

In my setup its in /Library/Frameworks not /System/Library/Frameworks which doesn't exist for me
Also make sure you are going from the root directory and not your user base directory.

Steve
Title: Re: 2.3 dev version for mac question
Post by: Mattn on September 20, 2008, 01:35:32 pm
please also make sure, that these informations are going to be added to the wiki please (once you've sorted it all out)
Title: Re: 2.3 dev version for mac question
Post by: vedrit on October 31, 2008, 08:06:45 am
just wondering, but is someone going to upload the MAC version? I would LOVE to play these new updates, but I cant even find them for PC, much less MAC
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on November 02, 2008, 05:20:22 am
Hiya, like the game, wishing I'd not spend so long playing it, but.

OK, I've gotten up to the stage where I'm trying desperately to get some antimatter (Mac 2.2.1) but taking forever to disassemble all/any type of UFO.

Do I really need to have a functional workshop to do this? Why can't the workers (who all seem to be male, along with the male scientists BTW) disassemble the UFO in the UFO hangers? What happens if I don't have an antimatter storage dump in that base, but have one in another base: will the antimatter get transferred automatically to the other base's dump?

I, too, am no programmer and would like it if someone would put the mac compilation of the latest build on the site so people like me can download it without stress. :P
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on November 03, 2008, 11:45:47 pm
I've tried compiling for mac according to the current instructions (http://ufoai.ninex.info/wiki/index.php/Compile_for_Mac)

and have had about as much luck as Enchantedsord (above), even though I had installed SDL, SDL_mixer, SDL_ttf, X11 2.1.5, fink 3.1.1,

(I assume you're referring to the root directory in the instructions: "From each of those dmg installers, copy the ".framework" folder to /Library/Frameworks/")

When I try:

1. fink install svn-ssl svn-client sdl sdl-ttf gettext libjpeg libpng3
2. mkdir -p ufoai/trunk
3. cd ufoai/trunk
4. svn co https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk .
5. ./configure CPPFLAGS="-I/sw/include/" LDFLAGS="-L/sw/lib"
6. make
7. make macinstaller

stages 1. to 4. inclusive chug away nicely (4. takes some time)
but 5. gives '-bash: ./configure: No such file or directory'

I note there is another /trunk higher up, so cd'd to ~/ufoai/trunk/trunk and 5. seems to work good
or at least things happen, and most 'checking' comes up '..yes',
but...(from line after 5.): note 'warnings' further down:

checking build system type... i686-apple-darwin9.5.0
checking host system type... i686-apple-darwin9.5.0
checking target system type... i686-apple-darwin9.5.0
checking system... Mac OS X
checking for sed... yes
checking for echo... yes
checking target OS... darwin
checking target CPU... i386
checking for gcc... gcc
(..edit)
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_CreateDecompress in -ljpeg... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for library containing gettext... -lintl
checking SDL.h usability... yes
checking SDL.h presence... no
configure: WARNING: SDL.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: SDL.h: proceeding with the compiler's result
checking for SDL.h... yes
checking SDL_mixer.h usability... yes
checking SDL_mixer.h presence... no
configure: WARNING: SDL_mixer.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: SDL_mixer.h: proceeding with the compiler's result
checking for SDL_mixer.h... yes
checking for library containing Mix_OpenAudio... none required
checking SDL_ttf.h usability... yes
checking SDL_ttf.h presence... no
configure: WARNING: SDL_ttf.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: SDL_ttf.h: proceeding with the compiler's result
checking for SDL_ttf.h... yes
checking for library containing TTF_Init... none required
(..edit)

So, pushing on regardless, did 6. (make) from the /trunk/trunk directory, which got me a bunch o'
 * [UFO] src/client/cl_actor.c
In file included from src/client/cl_actor.c:25:
src/client/client.h:229:21: error: libintl.h: No such file or directory
src/client/cl_actor.c: In function ‘CL_GetSkillString’:
src/client/cl_actor.c:165: warning: implicit declaration of function ‘gettext’
src/client/cl_actor.c:165: warning: return makes pointer from integer without a cast
...edit
src/client/cl_actor.c:4032: warning: passing argument 1 of ‘SCR_DisplayHudMessage’ makes pointer from integer without a cast
src/client/cl_actor.c:4036: warning: passing argument 1 of ‘va’ makes pointer from integer without a cast
...edit
{standard input}:1941:symbol: "_weaponButtonState" can't be undefined in a subtraction expression
make: *** [debug-darwin-i386/client/client/cl_actor.o] Error 1

(...edit: deleted out a bunch of other guff 4 your reading pleasure; mainly errors)

Oookaaaay...

cd-ing into the .. /trunk and giving 'make' done got me nothin' good.

make: *** No targets specified and no makefile found.  Stop.

and from /trunk/trunk, 7. (make macinstaller) got me

msgfmt -v -o base/i18n/cs/LC_MESSAGES/ufoai.mo src/po/cs.po
make: msgfmt: Command not found
make: *** [base/i18n/cs/LC_MESSAGES/ufoai.mo] Error 127

and ./configure -disable-universal
got me

.....(eventually)

checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
configure: error: You must have the JPEG development headers


WTF? Tried to install gettext, but then brain began to bleed with realization of other things need to be installed/configured...

Me? Well... like I said, I'm no programmer, but/and I think the original instructions were written with the expectation of various programming tools/environments that I don't have, and won't have anytime soon.

Could someone give us a hint? Or ideally, put their latest mac version up for download?  :'(  :P

Still can't get any antimatter, and none of the recovered ufos have been disassembled despite months of game-time.. blah!
Title: Re: 2.3 dev version for mac question
Post by: Destructavator on November 04, 2008, 02:11:52 am
Quote
Could someone give us a hint? Or ideally, put their latest mac version up for download?

Is cross-compiling possible from another OS?  I noticed Codeblocks has several build targets, including "macos" and not just "windows" and "windows_debug."

I also got Codeblocks to run on (Kubuntu) Linux (not via Wine, but the Linux version) and it has multiple build targets as well.

I also gave the Mac target a try under Windows in Codeblocks and although most of the files wouldn't compile (which did not surprise me), the "game" part of the project didn't complain and started building (which *did* surprise me).

I'm not a coder, but could the Codeblocks workspace file possibly be worked on to cross-compile the Mac version in such a manner?  Or is this a lost cause (impossible)?
Title: Re: 2.3 dev version for mac question
Post by: Mattn on November 04, 2008, 07:05:47 am
libintl.h is the missing gettext package - sure you have that installed?
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on November 29, 2008, 11:37:29 am
Is it in any of these?

 i   gettext                    0.10.40-125          Message localization support
 i   gettext-bin                0.14.5-2             GNU Internationalization utilities
     gettext-dev                0.10.40-125          Developer files for gettext package
     gettext-doc                0.14.5-2             GNU Internationalization utilities (Documentation)
     gettext-emacs              0.14.5-3             Message localization support
 i   gettext-tools              0.14.5-4             GNU Internationalization utils (shared libs)

Also, why do I get:
~/ufoai/trunk/trunk

Seems an extra trunk jumped in there.

Other issues seem to occur when following listed instructions despite having the stated packages installed and most up to date (unstable) fink.

Any suggestions warmly welcomed
Title: Re: 2.3 dev version for mac question
Post by: Mattn on November 29, 2008, 12:29:44 pm
yes - it should be gettext-dev
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on December 04, 2008, 05:06:20 am
hmm... OK,

fink install gettext-dev ; which seemed to make 'make' happier, not giving as much grief about gettext.

also, for the the /usr/shared/SDL/   folder,

I Changed priveleges etc. and made aliases, put into temporary folder, changed names so identical to originals (i.e., remove " alias"), then put into /usr/shared. Far fewer errors during ./configure CPPFLAGS="-I/sw/include/" LDFLAGS="-L/sw/lib" phase; looks like was not looking in deeper folders from /shared/

but then I got NEW and EXCITING errors on 'make' from UFOAI/TRUNK/ ...

bash-3.2# make
 * [UFO] src/client/cl_actor.c
In file included from src/client/cl_actor.c:25:
src/client/client.h:229:21: error: libintl.h: No such file or directory
src/client/cl_actor.c: In function ‘CL_GetSkillString’:
src/client/cl_actor.c:165: warning: implicit declaration of function ‘gettext’
src/client/cl_actor.c:165: warning: return makes pointer from integer without a cast

and other such stuff/errors...

**
and just for fun after that...

bash-3.2# make macinstaller
make -f build/data.mk pk3
make[1]: Nothing to be done for `pk3'.
# Replacing existing compiled maps with downloaded precompiled maps,
# otherwise multiplayer won't work due to mismatching checksums
# FIXME: Use the maps from the current release at sourceforge.net
# The mapfile in the address below is not recent enough to be useful in trunk.
# Removed for trunk builds but should be added for branch builds with the
# correct 0maps.pk3 linked.
# cd base; wget -N http://mattn.ninex.info/download/0maps.pk3
cd src/ports/macosx/installer; make TARGET_CPU=i386
cp: ../../../../ufo2map: No such file or directory
cp: ../../../../ufoded: No such file or directory
cp: ../../../../ufo: No such file or directory
make[1]: *** [copybinaries] Error 1
make: *** [macinstaller] Error 2
bash-3.2#

:-(
Title: Re: 2.3 dev version for mac question
Post by: stevenjackson on December 04, 2008, 11:09:02 am
So it ./configure completing successfully or is it still getting errors?

libintl.h is a part of gettext.  If you can find that file (mine is in /usr/local/include) then you can point configure at it.
It might be worth installing gettext from source if you can.  Then it should install things in more standard directories like /usr/local/include

you can get the source from http://www.gnu.org/software/gettext/
then just run
./configure
make
sudo make install

that worked fine for me.

I think i build most of the dependencies from source other that SDL so i might not be too much help with getting it via fink.

Steve
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on December 04, 2008, 01:40:34 pm
So it ./configure completing successfully or is it still getting errors?

Seems now to be completing successfully now I done gone fiddled with the /sw/include/ or whatever. Wasn't so happy before that. Wish I knew how to ensure the FLAGS went to deeper levels in the /sw/usr/include/

libintl.h is a part of gettext.  If you can find that file (mine is in /usr/local/include) then you can point configure at it.
It might be worth installing gettext from source if you can.  Then it should install things in more standard directories like /usr/local/include


Yep, I got a 'libintl.h' in /sw/include/, amongst other locations for identically named files, mainly in folders named 'gettext' or 'gettext tools'.  Also within /usr/local/include/

How do I point configure at that?

What system you running, Steve?

Also, I was informed that I actually needed to have the gettext-dev package, not the gettext-0.17 package installed. (Lookin' atchoo, Mattn!)

you can get the source from http://www.gnu.org/software/gettext/
then just run
./configure
make
sudo make install


that worked fine for me.

Er, so you ran that after 'cd gettext' ?

I put the newly downloaded gettext-0.17 folder in my 'user' directory and tried to re-install from there (after cd into gettext-0.17). ./configure'd OK, but make got me bunch o' hurt messages. Make check hurt similarly.

I think i build most of the dependencies from source other that SDL so i might not be too much help with getting it via fink.

So, you managed to compile the 2.3 dev version for Mac (universal or intel)? Could we have a copy??!

I'm on an intel macbook pro 10.5.5, with Darwin/BASH 3.2
Title: Re: 2.3 dev version for mac question
Post by: stevenjackson on December 05, 2008, 12:46:53 am

I'm one of the main mac developers on the project.  Though my available time was reduced greatly by the birth of my son 3 months ago.

I'm using a imac 2.16 Ghz w/ 3G ram.

I can not only compile but do all my ufoai project development on my mac.
I can do a build for 2.3 dev, i just cant do them very often due to time constraints and only for intel, not universal.
I just need somewhere to upload them to.

to add alternate locations do: ./configure LDFLAGS='-L/sw/lib -L<other include directory>' CFLAGS='-I/sw/include -I<other include directory>'

Mattn isn't a mac user and was providing more general help.

I'll help as much as i can, unfortunatly its been a while since i set up my system to compile ufoai so i dont remember exactly the method i used.
But i should be able to help you get a working system that will compile ufoai.

Steve


Steve
Title: Re: 2.3 dev version for mac question
Post by: Destructavator on December 05, 2008, 01:19:38 am
Quote
I just need somewhere to upload them to.

I might be able to help with this part, my web hosting service allows other people to have accounts and FTP access to folders, although I've never set it up before, but I'm willing to find out more details.  My web hosting service also has unlimited bandwidth and storage space listed under my plan, last time I checked.
Title: Re: 2.3 dev version for mac question
Post by: stevenjackson on December 05, 2008, 03:26:44 am
Also i'm using leopard.

Destructavator, if you give me the details somehow then i'll get a copy up there.

Steve
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on December 05, 2008, 03:36:32 am
That'd be great, guys!

Also, congrats, Steve!

Any help you can give on setting up my env good would be warmly appreciated. I figure there's no point trying to contribute further to the project if I can't compile good.

Steve, what sort of directories do you reckon I should include? What's the difference between the CPPFLAGS and LDFLAGS? I can't find any man ref.
Should they be exported to PATH instead? Further, 'make' still gives grief re. lack of jpeglib.h even though it's sitting right in the /usr/include/

um..

something like this

192-168-1-153:~ wesblack$ cd ufoai/trunk
192-168-1-153:~/ufoai/trunk wesblack$ ls
CONTRIBUTORS      config.guess      contrib
COPYING         config.h      debian
INSTALL         config.h.in      debug-darwin-i386
Makefile      config.log      install-sh
Makefile.in      config.status      radiant
README         config.sub      src
base         configure
build         configure.ac
192-168-1-153:~/ufoai/trunk wesblack$ make -p
# GNU Make 3.81
# Copyright (C) 2006  Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# This program built for powerpc-apple-darwin9.0
 * [UFO] src/client/renderer/r_image.c
src/client/renderer/r_image.c:32:21: error: jpeglib.h: No such file or directory
src/client/renderer/r_image.c:33:17: error: png.h: No such file or directory
src/client/renderer/r_image.c:138: error: syntax error before ‘*’ token
src/client/renderer/r_image.c: In function ‘PngReadFunc’:
src/client/renderer/r_image.c:140: warning: implicit declaration of function ‘png_get_io_ptr’
src/client/renderer/r_image.c:140: error: ‘Png’ undeclared (first use in this function)
src/client/renderer/r_image.c:140: error: (Each undeclared identifier is reported only once
src/client/renderer/r_image.c:140: error: for each function it appears in.)
src/client/renderer/r_image.c:141: error: ‘buf’ undeclared (first use in this function)
src/client/renderer/r_image.c:141: error: ‘size’ undeclared (first use in this function)
src/client/renderer/r_image.c: In function ‘R_LoadPNG’:
src/client/renderer/r_image.c:154: error: ‘png_structp’ undeclared (first use in this function)


etc.
Title: Re: 2.3 dev version for mac question
Post by: Destructavator on December 05, 2008, 11:50:06 am
Also i'm using leopard.

Destructavator, if you give me the details somehow then i'll get a copy up there.

Steve

I'm busy today (Friday), but I'll try to find out by sometime this weekend, hopefully Saturday, and when I do I'll send a PM your way.
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on December 05, 2008, 02:31:23 pm
Steve, tried your suggestion re. ./configure, but found it worked a bit better as

./configure CFLAGS="-I/sw/include" CPPFLAGS="-I/sw/include" LDFLAGS="-L/sw/lib -L/usr/local/include"

in that I seemed to get no errors during 'configure', and the makefile seemed to accept the CFLAGS and LDFLAGS
but still no joy with 'make' (many errors reported - I'll spare you the cut 'n paste here. Lots of syntax errors. But possibly a better class of fail.)

also, when I tried (just for fun) replacing CPPFLAGS and/or CFLAGS and/or LDFLAGS (as Steve's instructions) with other directories and re-running configure, not a lot of fun was had, mainly reporting errors during configure, and  'no such file or directory' on subsequent 'make'

mostly looking for jpeglib.h, png.h... mostly...
.


Title: Re: 2.3 dev version for mac question
Post by: tchristney on December 17, 2008, 10:49:39 am
OK, I think we all can admit that the compile for mac wiki page is written for people with at least a little programming experience. One of the issues with providing 2.3 "nightlies" is that you cannot be guaranteed that any particular revision in the SVN trunk will work. Sure, everyone tries hard to make it so, but new features are being added all the time. Keep in mind that chances are anything stevenjackson provides to you will likely be outdated in less than 24 hours.

It seems that the fink instructions need to be modified to make sure that the *-dev versions of all the packages are installed. Also, I'm a little worried by people fiddling around in /usr/* with what appears to be limited knowledge of what they are doing. If you are using fink you should not need to add anything from /usr/local ! Everything from fink is installed in /sw/ precisely so fink doesn't clobber /usr/*! If I were you I would try to return to the original state of /usr/ (/usr/local/ is not important - everything in there is put there by users, not the system). For example, you should not have a /usr/shared/SDL (nor a /usr/share/SDL for that matter - I certainly don't.)

FWIW, I really wanted to get universal binaries working, and when I found out that fink does not support them at all, I switched to MacPorts. MacPorts is not perfect, but it works for me.

About the SDL frameworks: they need to be installed in /Library/Frameworks (I think ~/Library/Frameworks may also work, but I've never tried it.) So you should have folders named /Library/Frameworks/SDL.framework, /Library/Frameworks/SDL_ttf.framework and /Library/Frameworks/SDL_mixer.framework.

CFLAGS/LDFLAGS: these tell make which additional options to pass to the compiler/linker. When you say CFLAGS="-I/sw/include" you are telling the compiler to look inside /sw/include for additional header files (*.h) that it can't find in the default locations (/usr/include and /usr/local/include). Similarly, LDFLAGS="-L/sw/lib" tells the linker to look for libraries in /sw/lib. After that line you can use -ljpeg and the linker will look for libjpeg.dylib in /sw/lib in addition to /usr/lib and /usr/local/lib. Note that /usr/lib and /usr/local/lib are searched by default and should never need to be manually specified to configure! If you are using fink and configure complains about not finding a header file, then the correct package has not been installed successfully. For the record, AFAIK, there should not be a jpeglib.h in /usr/include. Apple does not ship libjpeg (jpeg is supported by Cocoa) and /usr/include is a "system" directory, i.e. it should only contain items that Apple puts there (you should put your own modifications in /usr/local/include)

Hope this helps.

Title: Re: 2.3 dev version for mac question
Post by: gothgod on January 04, 2009, 12:05:48 am
So I had also problems to compile this for mac, used fink and the info in the wiki was not enough. In addition to those already mentioned in the wiki, I had to add these installations:

sudo fink install glib2-dev gtk+2-dev gtkglext1 pango1-dev pango1-xft2-dev atk1 libgettext3-dev

I guess that something about this is wrong because the game hung almost immediately after start, but anyway... Hope this helps anyone.
Title: Re: 2.3 dev version for mac question
Post by: Mattn on January 04, 2009, 12:33:21 am
thanks - i've updated the wiki entry
Title: Re: 2.3 dev version for mac question
Post by: doc.torr on January 04, 2009, 02:27:26 am
Gothgod, are you on an Intel or PPC Mac?

OS X 10.5.5?

These packages are not the Universal/intel versions via Fink? (actually, that's more a statement than a question)

Ta for help!
Title: Re: 2.3 dev version for mac question
Post by: commiesalami on January 22, 2009, 09:44:07 am
When running the 'make macinstaller' command it gives the following error:

msgfmt -v -o base/i18n/bg/LC_MESSAGES/ufoai.mo src/po/ufoai-bg.po
make: msgfmt: Command not found
make: *** [base/i18n/bg/LC_MESSAGES/ufoai.mo] Error 127

looking around this is an error with gettext, but according to fink I do not need to install either gettext or gettext-dev.

ced-155-40:trunk Charlie$ fink install gettext
Information about 2534 packages read in 0 seconds.
No packages to install.
ced-155-40:trunk Charlie$ fink install gettext-dev
Information about 2534 packages read in 0 seconds.
No packages to install.

Title: Re: 2.3 dev version for mac question
Post by: commiesalami on January 23, 2009, 08:19:38 am
Never mind, I've fixed my problems via the 'fink scanpackages' command
Title: Re: 2.3 dev version for mac question
Post by: Mattn on January 24, 2009, 01:30:08 pm
can you please add this to the mac wiki site, too? maybe this info helps others, too
Title: Re: 2.3 dev version for mac question
Post by: keybounce on March 09, 2009, 04:46:35 am
If I have XCode installed, how much more space do I need to compile 2.3 for PPC?

Source code, object code, final package, all the libraries that need to be downloaded and compiled, etc.

Are we talking 2G, 5G, or 10G?
Title: Re: 2.3 dev version for mac question
Post by: geever on March 09, 2009, 12:17:32 pm
About two, I guess, but not more than five. (shouldn't be more IMO)

-geever
Title: Re: 2.3 dev version for mac question
Post by: Sagittario on December 05, 2009, 08:32:47 pm
Well, I suppose I'm effectively in the same boat. I know about and can use gcc for some very basic programming, but I know nothing about make files and I know very few of the unix commands. I have fink (or so I believe, anyway), but I've never used it.

I try running line 1, and it asks me for my password. I don't even know what that is... how do I set it?
Title: Re: 2.3 dev version for mac question
Post by: Sagittario on December 06, 2009, 05:55:54 am
Update: I found a way around the password problem, but after running the fink command (the first line on the wiki), I get the following error message:

Failed: no package found for specification 'gtksourceview2'!

How do I get/make it able to get this package?
Title: Re: 2.3 dev version for mac question
Post by: geever on December 06, 2009, 09:15:46 am
I don't know macs but gtksourceview2 is needed for the mapeditor only. you can disable it with
Code: [Select]
./configure --disable-uforadiant

-geever
Title: Re: 2.3 dev version for mac question
Post by: Sagittario on December 06, 2009, 07:01:53 pm
I can't even get to that step. It's failing on line 1.
Title: Re: 2.3 dev version for mac question
Post by: geever on December 06, 2009, 07:27:07 pm
I can't even get to that step. It's failing on line 1.

Ok, I don't even know what line 1 is... :)

-geever
Title: Re: 2.3 dev version for mac question
Post by: Sagittario on December 07, 2009, 06:51:36 am
I took the gtksourceview2 command out, and I am now asked the following:


fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:

(1)   db44-aes-shlibs: Shared Libraries for db44-aes
(2)   db44-shlibs: Shared Libraries for db44



What should I pick?
Title: Re: 2.3 dev version for mac question
Post by: Sagittario on December 09, 2009, 09:48:53 pm
Edit: Solved that problem. It now says that I need the OGG development headers. What are they and how do I get them?
Title: Re: 2.3 dev version for mac question
Post by: dunadin777 on June 29, 2010, 11:27:35 am
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
configure: error: You must have the JPEG development headers

I know I'm reviving a long dead thread, but I'm currently stuck at this point in the compilation process. I'm running a PPC on 10.5, and I have xcode, gettext, and fink installed. The responses to doc.torr seemed to indicate that he needed to install gettext to fix this problem, but this error persists for me even though I do have it installed. Did I miss something in the crush of other information? Or do I need to run an update of gettext even though I downloaded it within the week?

I have very little in the way of code skills, so please couch all advice and instructions in explicit language, so I don't have to ask for repeated clarification. I'm really looking forward to getting my grubby paws on version 2.3, so please be patient with my impatience, yes?  ;D
Title: Re: 2.3 dev version for mac question
Post by: keybounce on June 29, 2010, 09:19:09 pm
You may need to install jpeg.

Kleiman-ibook:~ michael$ port provides /opt/local/include/jpeglib.h
/opt/local/include/jpeglib.h is provided by: jpeg
Kleiman-ibook:~ michael$ port info jpeg
jpeg @8a (graphics)
Variants:             universal

Description:          This distribution contains the eighth public release of
                      the Independent JPEG Group's free JPEG software. You are
                      welcome to redistribute this software and to use it for
                      any purpose, subject to the conditions under LEGAL ISSUES,
                      below. Serious users of this software (particularly those
                      incorporating it into larger programs) should contact IJG
                      at jpeg-info@uunet.uu.net to be added to our electronic
                      mailing list. Mailing list members are notified of updates
                      and have a chance to participate in technical discussions,
                      etc.
Homepage:             http://www.ijg.org/

Platforms:            darwin, freebsd, sunos
License:              unknown
Maintainers:          waqar@macports.org
Kleiman-ibook:~ michael$
Title: Re: 2.3 dev version for mac question
Post by: dunadin777 on June 30, 2010, 12:41:04 am
So I've now made it just a little bit farther down the ./configure line, and I'm instead getting stopped here:

Quote
checking for /opt/local/bin/sdl-config... no
configure: WARNING: cannot find /opt/local/bin/sdl-config might fail to find SDL!
checking for library containing IMG_LoadTyped_RW... no
configure: error: You must have the SDL_image development libraries

I've copied over the SDL frameworks, but that's it. Was there something else that was supposed to be transferred over with the SDL files? Also, when I try running the fink updates listed above, I get a message saying it is unavailable. Might this be linked to the sdl_image development libraries?
Title: Re: 2.3 dev version for mac question
Post by: keybounce on June 30, 2010, 06:29:05 am
There's a number of additional SDL libraries.

If you're having trouble with this, grab the official distribution and copy ALL of the libraries and frameworks.
Title: Re: 2.3 dev version for mac question
Post by: dunadin777 on June 30, 2010, 08:15:54 am
So I now seem to be within spitting distance of having the game properly setup. I'm on the make macinstaller step, and after installing a large number of files, I am confronted with this error:

Code: [Select]
---- filesystem initialization -----
Adding game dir: /usr/local/share/ufoai/base
Adding game dir: /Users/ben/Documents/UFOAI-2.4-dev/base
Adding game dir: ./base
using ./base for writing
- model 'models/aircraft/craft_arm_plate/plating.md2'
Error: R_ModForName: unknown fileid for models/aircraft/craft_arm_plate/plating.md2
make: *** [base/models/aircraft/craft_arm_plate/plating.mdx] Error 1

Keybounce, I believe you had mentioned this problem yourself in the Current issues with 2.3 PPC build thread, and I assume you had found a workaround for this issue? I'm so close to playing on the new geoscape with the revamped campaign, I can hardly wait!
Title: Re: 2.3 dev version for mac question
Post by: keybounce on June 30, 2010, 11:55:56 pm
Yea, dang it.

Let me see if I can re-create what I did to fix that.
It was an issue with macports, and I thought I submitted the patch to them.
Title: Re: 2.3 dev version for mac question
Post by: keybounce on June 30, 2010, 11:58:35 pm
Ahh. Now I remember.

The libsdl port in MacPorts does not properly work when compiled universal.
It hard codes a single byteswap order, and it hardcodes the x86 order.

The fix was to delete the -- from memory here -- #DEFINE BYTEORDER line from libsdl.h, and then at run-time it tests and determines on its own what the order is.

See if you see that line, and if so, clobber it.
Meanwhile, I'll double check with the macports people.
Title: Re: 2.3 dev version for mac question
Post by: keybounce on July 01, 2010, 12:02:35 am
As I reported to them:

Quote
stbmac:trunk Michael$ port provides /opt/local/include/SDL/SDL_config.h
/opt/local/include/SDL/SDL_config.h is provided by: libsdl
stbmac:trunk Michael$ port installed libsdl
The following ports are currently installed:
 libsdl @1.2.13_6+universal
 libsdl @1.2.14_8+universal (active)
stbmac:trunk Michael$

I've got the right version installed and active? Right?

stbmac:trunk Michael$ egrep BYTE  /opt/local/include/SDL/SDL_config.h
#define SDL_BYTEORDER 1234
Remove that line from that file, and it should work.

EDIT: https://trac.macports.org/ticket/23674
Title: Re: 2.3 dev version for mac question
Post by: dunadin777 on July 01, 2010, 10:00:43 pm
So with the previous advice I was finally able to compile the dmg file and copy it over to my applications folder. I was surprised to notice that the version listed was 2.4, since I thought I'd followed the instructions for downloading 2.3. In any case, when I open up the UFO:AI file as compiled, it opens up a red-tinted version of the load screen and freezes without loading anything. When I check my console log, it gives the following message:

Code: [Select]
7/1/10 2:56:17 PM [0x0-0x442442].com.apple.systempreferences[98228] objc[98228]: Class O3Panel is implemented in both /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Contrast.monitorPanel/Contents/MacOS/Contrast and /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Geometry.monitorPanel/Contents/MacOS/Geometry. Using implementation from /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Geometry.monitorPanel/Contents/MacOS/Geometry.
7/1/10 2:56:17 PM [0x0-0x442442].com.apple.systempreferences[98228] objc[98228]: Class O3Panel is implemented in both /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Geometry.monitorPanel/Contents/MacOS/Geometry and /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/VPT.monitorPanel/Contents/MacOS/VPT. Using implementation from /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/VPT.monitorPanel/Contents/MacOS/VPT.
7/1/10 2:56:17 PM [0x0-0x442442].com.apple.systempreferences[98228] objc[98228]: Class O3Panel is implemented in both /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/VPT.monitorPanel/Contents/MacOS/VPT and /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Bezel.monitorPanel/Contents/MacOS/Bezel. Using implementation from /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Bezel.monitorPanel/Contents/MacOS/Bezel.
7/1/10 2:56:17 PM [0x0-0x442442].com.apple.systempreferences[98228] objc[98228]: Class O3Panel is implemented in both /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Bezel.monitorPanel/Contents/MacOS/Bezel and /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/ExtendedTouchSwitch.monitorPanel/Contents/MacOS/ExtendedTouchSwitch. Using implementation from /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/ExtendedTouchSwitch.monitorPanel/Contents/MacOS/ExtendedTouchSwitch.
7/1/10 2:56:17 PM [0x0-0x442442].com.apple.systempreferences[98228] objc[98228]: Class O3Panel is implemented in both /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/ExtendedTouchSwitch.monitorPanel/Contents/MacOS/ExtendedTouchSwitch and /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/PowerMode.monitorPanel/Contents/MacOS/PowerMode. Using implementation from /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/PowerMode.monitorPanel/Contents/MacOS/PowerMode.
7/1/10 2:56:17 PM [0x0-0x442442].com.apple.systempreferences[98228] objc[98228]: Class O3Panel is implemented in both /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/PowerMode.monitorPanel/Contents/MacOS/PowerMode and /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Authorization.monitorPanel/Contents/MacOS/Authorization. Using implementation from /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Authorization.monitorPanel/Contents/MacOS/Authorization.
7/1/10 2:56:17 PM [0x0-0x442442].com.apple.systempreferences[98228] objc[98228]: Class O3Panel is implemented in both /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/Authorization.monitorPanel/Contents/MacOS/Authorization and /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/TVOptions.monitorPanel/Contents/MacOS/TVOptions. Using implementation from /System/Library/MonitorPanels/AppleDisplay.monitorPanels/Contents/Resources/TVOptions.monitorPanel/Contents/MacOS/TVOptions.
7/1/10 2:58:24 PM com.apple.launchd[189] ([0x0-0x43d43d].net.sourceforge.UFOAI[98206]) Exited: Killed
7/1/10 2:59:12 PM com.apple.launchd[189] ([0x0-0x446446].net.sourceforge.UFOAI[98236]) Exited: Killed

Am I still missing that one special ingredient? The messages seem to be referring to my display settings, so is it possible that this is related to my 1440x900 monitor resolution? Or is this a problem related to running version 2.4 on a 10.5 PPC? Should I just resign myself to enjoying 2.2?