Author Topic: Building PS on the Mac  (Read 5472 times)

JeroMiya

  • Traveller
  • *
  • Posts: 33
    • View Profile
Building PS on the Mac
« on: December 31, 2004, 10:43:49 pm »
Requirements:
1) XCode 1.5  and gcc update (available at developer.apple.com)
2) Fink installed (fink.sf.net, follow all the install instructions for self update etc..)
3) of course, latest CVS of CrystalSpace, cal3d, cel, and planeshift
4) Jam. You can get it here: http://public.perforce.com/public/jam/jam-2.5.tar     Build and install it wherever you like.
5) MySQL (you can download it at http://www.mysql.com/)
6) The following fink packages:
autoconf2.5
autogen
autogen-shlibs
autogen-dev
automake1.8
freetype2
freetype2-dev
freetype2-shlibs
libiconv
libiconv-dev
libiconv-shlibs
libjpeg-bin
libjpeg-shlibs
libjpeg-dev
libogg
libogg-shlibs
libpng3
libpng3-shlibs
libtool14
libtool14-shlibs
libvorbis0
libvorbis0-shlibs
m4

OK, you\'re ready. Make sure your fink paths  are setup correctly (read the website for info on how to do that. Should do it automatically when you install fink).

Steps:
1) Build and install cal3d
you needed updated autotools in order to get cal3d\'s autogen.sh to run. You may, in addition, need to remove the section in autogen.sh relating to checking for libtool. It should be close to the top. It didn\'t seem to detect my libtoolize version correctly, but it worked.

./autogen.sh
./configure --enable-debug
make
sudo make install

2) Build CrystalSpace

Ok, first run:
export CRYSTAL=${PWD}
./configure --enable-debug --enable-new-renderer --without-python

and check to see if all the required libs are detected. Also in certain cases where it checks if a library is sufficiently recent, check if it says \"yes\". The libs you want to be concerned with are libjpeg, libpng, freetype2, cal3d, libogg, and libvorbis.
You might have a problem with freetype2, because there is an older version of freetype2 installed in /usr/X11R6 that gets detected before the fink one. I\'m sure there is a better way, but I just renamed /usr/X11R6 temporarily.

build CS like so:
jam libs; jam plugins; jam cs-config
You might also want to jam walktest and run it to see if everything is working ok.

3) Build CEL
pretty straightforward:
cd ../cel
export CEL=${PWD}
export CSCONFPATH=${PWD}
./configure --enable-debug --enable-new-renderer --without-python
jam

Should build without incident.

4) Build Planeshift
cd ../planeshift
./autogen.sh
./configure --enable-debug --enable-new-renderer

Now, open Jamconfig and look for the line that says CURL.LFLAGS. If this line has -arch i686 or whatever, take that out of the line and save Jamconfig. Then:

jam

Now, as of this writing, there are a couple of errors that you\'ll see in updater. Take a look at the files that are not compiling, go to the lines the errors are on and you should see #elif CS_PLATFORM_MACOSX, change all these to #elif defined(CS_PLATFORM_MACOSX). I submitted a patch to the list but it hasn\'t been committed yet. run jam again and you should have a working client, server, and updater.

5) Download the art files
if you managed to build the updater, you should be able to run it by typing:
./updater.app/Contents/MacOS/updater

It should run and a window will pop up. Click \"update\", or if the button isn\'t exactly visible, it\'s the second button at the bottom. This will download all the art files, etc.. It will also download over your client  and updater with older versions. Once it\'s done, you\'ll need to delete the psclient.app and updater.app that it downloaded and rebuild those.

6) Run the client
Once you\'ve done that, you can run the client by typing:
./psclient.app/Contents/MacOS/psclient


JeroMiya

  • Traveller
  • *
  • Posts: 33
    • View Profile
(No subject)
« Reply #1 on: December 31, 2004, 10:45:29 pm »
also look in support/macosx for scripts that will, eventually, bundle up all the required plugins and libraries to make psclient.app double clickable in the finder. It currently isn\'t working too well though, but might in the near future lol.

Mathious

  • Hydlaa Resident
  • *
  • Posts: 79
    • View Profile
nice thread
« Reply #2 on: January 01, 2005, 10:44:07 am »
...this is a nice thread! Congrats!

will google for links to the above files and post them here for others....
« Last Edit: January 26, 2005, 10:43:11 am by Mathious »
Join me in my quest!  @ http://www.slim.filetap.com

Mathious

  • Hydlaa Resident
  • *
  • Posts: 79
    • View Profile
....here goes....
« Reply #3 on: January 01, 2005, 11:35:01 am »
just gonna try and put together some links for all these files - so that others wont need to google or scrape around pokey parts of websites for the files they need.

1> xcode = http://developer.apple.com/tools/macosxtools.html
xcode does come with the latest version of os x (cd2 i think), so you might be able to save yourself some download time by using the cds.

2> Fink = http://prdownloads.sourceforge.net/fink/Fink-0.7.1-Installer.dmg?download

3> CrystalSpace = http://crystal.sourceforge.net/cvs-snapshots/bzip2/cs-current-snapshot.tar.bz2

Cal3D = http://kent.dl.sourceforge.net/sourceforge/cal3d/cal3d-0.9.1.tar.bz2

Cel = http://kent.dl.sourceforge.net/sourceforge/cel/cel98_002.tar.bz2

Planeshift =  http://cvs.sourceforge.net/cvstarballs/planeshift-cvsroot.tar.bz2

4> Jam = (already linked to but what the hey, gotta make this list as complete as possible) http://public.perforce.com/public/jam/jam-2.5.tar

5> MySQL = http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.8-apple-darwin7.6.0-powerpc.dmg/from/http://mysql.mirror.anlx.net/

6> Fink Packages = (all available at) http://fink.sourceforge.net/pdb/list.php
Join me in my quest!  @ http://www.slim.filetap.com

Mathious

  • Hydlaa Resident
  • *
  • Posts: 79
    • View Profile
the hardest part?...
« Reply #4 on: January 01, 2005, 11:59:17 am »
...well so far the hardest part has been downloading the fink packages.
They seem to be scattered across slow ftp servers and there are lots of versions for each package.
Where did you download all yours from JeroMiya?
Also any thoughts on where the best DL for PS source would be, as I found the link I have in one of Acraigs posts, and it only downloaded 15mb, of 99mb.
I just tried it again and now it will only dl about 700k

something to do with the constant development activity perhaps?
« Last Edit: January 01, 2005, 03:43:17 pm by Mathious »
Join me in my quest!  @ http://www.slim.filetap.com

Mathious

  • Hydlaa Resident
  • *
  • Posts: 79
    • View Profile
Can anyone go into more detail?
« Reply #5 on: January 01, 2005, 03:12:45 pm »
...im afraid Im totally stuck, ive never built anything from source before (except back in my youth - however that was me programming the source on bbc electrons, spectrums, rm\'s and other assorted antiques!).

Can anyone elaborate on the instructions posted by JeroMiya?

« Last Edit: January 26, 2005, 10:41:36 am by Mathious »
Join me in my quest!  @ http://www.slim.filetap.com

Mathious

  • Hydlaa Resident
  • *
  • Posts: 79
    • View Profile
ok so.....
« Reply #6 on: January 28, 2005, 11:09:42 am »
Well, im discovering that this is actually not as complicated as it seems, although most of the download links i previously posted seem to be pretty redundant as there is a much easier way to get the source code using terminal.

Im gonna try out the build and then perhaps find a host for a temparary version of PS until Dfryer can get the next release up an running.
(if any devs - esp Daniel, have any objection to me doing this please let me know - I dont wanna cause any problems!)
Join me in my quest!  @ http://www.slim.filetap.com

MagicFitz

  • Wayfarer
  • *
  • Posts: 6
    • View Profile
(No subject)
« Reply #7 on: January 28, 2005, 10:20:32 pm »
I\'m presently trying to compile the source into a working OS X version but unfortunately the limit of my computer skills is 1/2 a year of C programming and 1/2 a year of haskell (what a retarded language that was) in my first year at university.

whilst running ./autogen.sh for the cal3d libraries I get the following errors

./autogen.sh: line 64: test: : integer expression expected
Running \'aclocal-1.8 \'
/sw/share/aclocal/vorbis.m4:9: warning: underquoted definition of XIPH_PATH_VORBIS
  run info \'(automake)Extending aclocal\'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
/sw/share/aclocal/ogg.m4:8: warning: underquoted definition of XIPH_PATH_OGG
/sw/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AUTOOPTS

I followed the suggested link and read about extending aclocal.  To fix the underquoted definition errors I put square brackets around XIPH_PATH_VORBIS in line 9 of vorbis.m4.  I also did the same for the appropriate section in ogg.m4 and autoopts.m4.  I don\'t know if this is a solution but it certainly removed the errors.

That leaves me with the integer expression error on line 64 of autogen.sh

I don\'t know if anyone particularly wants me posting this information but I thought sharing knowledge (no matter how flawed my knowledge is ;) ) is better than silence.

Please tell me if I\'m sending people down the wrong path as I don\'t want to make anyones Planeshift life harder than it already is. :)

solubacni

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
(No subject)
« Reply #8 on: January 30, 2005, 01:54:42 am »
Quote
Originally posted by Mathious

Planeshift =  http://cvs.sourceforge.net/cvstarballs/planeshift-cvsroot.tar.bz2



You don\'t want this.  Use the CVS:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/planeshift login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/planeshift co -P planeshift

solubacni

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
(No subject)
« Reply #9 on: January 30, 2005, 02:07:45 am »
I have posted a mini-walkthrough (more like a log of what I did) on how to build planeshift.  I am currently downloading art, so we\'ll see how well it works.

http://muddy.ath.cx/planeshift-install.txt

I will be updating it as I go, so I\'d rather not post it here for the interest of saving myself time in editing two copies.

regards,
solubacni

Mathious

  • Hydlaa Resident
  • *
  • Posts: 79
    • View Profile
....hmmmmmm
« Reply #10 on: January 30, 2005, 02:58:09 pm »
Ok, so Im pretty confident with most parts of these instructions now - only problem is i cant get jam to work.

every time I use a jam command I get the error

-bash: jam: command not found

...im guessing this means Ive not installed it correctly?

..can anyone tell me how to install Jam properly?
Join me in my quest!  @ http://www.slim.filetap.com

mrflecko

  • Wayfarer
  • *
  • Posts: 2
    • View Profile
Can't download X Code
« Reply #11 on: January 30, 2005, 06:07:35 pm »
i figured out how to download X Code 1.2, but where\'s 1.5?  I can\'t find it, and I dont\' currently pay for a ADC membership.

Thanks!

EDIT:
*** Please disregard this post, I figured it out, and feel like quite the moron...sorry to waste forum space! ****
« Last Edit: January 30, 2005, 06:15:25 pm by mrflecko »

solubacni

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
(No subject)
« Reply #12 on: January 30, 2005, 10:25:04 pm »
Quote
Originally posted by Mathious
Ok, so Im pretty confident with most parts of these instructions now - only problem is i cant get jam to work.

every time I use a jam command I get the error

-bash: jam: command not found

...im guessing this means Ive not installed it correctly?

..can anyone tell me how to install Jam properly?


If you installed jam using fink you have to have /sw/bin in your PATH environment variable.  If you couldn\'t \"see\" jam in fink then you need to add the unstable trees to your /sw/etc/fink.conf.  See fink docs for further info.

Cheers,
solubacni

MagicFitz

  • Wayfarer
  • *
  • Posts: 6
    • View Profile
Missing Packages
« Reply #13 on: January 30, 2005, 11:43:26 pm »
Hey,

I can\'t figure out where to download mysql14-dev, libjpeg-dev and libiconv-shlibs from.

Any help offered would be much appreciated.  These missing libraries might explain some of my problems with compiling Planeshift. ;)

solubacni

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
(No subject)
« Reply #14 on: January 31, 2005, 12:50:01 am »
Err... I don\'t think you \"download\" them, per se, but you do \"install\" them with Fink.

i.e. if you have Fink installed
Code: [Select]

fink install mysql14-dev libjpeg-dev libiconv-shlibs


Cheers,
solubacni