Compiling The Powder Toy on Mac OSX

  • lastmonkey
    31st May 2014 Member 0 Permalink

    I have been trying to compile the Powder Toy according to this tutorial. I got as far as to the last step, of going to the source code folder. However, the given command:

    scons --macosx --release --stable --sse2 --nofft

    came up with an SCons error saying that --stable option requires an argument.

     

    I tried entering instead 

    scons --macosx --release --sse2 --nofft 

    and received a fatal error that 'SDL.h' was not found. So I added the path of 'SDL.h' with

    sudo scons --macosx --release --sse2 --nofft --sdl-dir /dev/libs/SDL-1.2.15/include

    and I got


    scons: Reading SConscript files ...
    scons: done reading SConscript files.
    scons: Building targets ...
    scons: `/dev/libs/SDL-1.2.15/include' is up to date.
    scons: done building targets.

     

    But I checked the build folder of The-Powder-Toy and SDL-1.2.15 and neither of them had a compiled powder-x file.

     

    Any ideas as to what I did wrong? Or is the Mac build tutorial not up to date?

    Edited 3 times by lastmonkey. Last: 31st May 2014
  • jacob1
    31st May 2014 Developer 0 Permalink
    try adding a equal sign in the command, for the compile command use:

    scons --macosx --release --sse2 --nofft --sdl-dir=/dev/libs/SDL-1.2.15/include


    I just finished a new sconscript for my mod which i'm going to use in tpt, it fixes things like this so that you don't need to use --sdl-dir (I actually removed it). It might be a while before it's put in the master branch though.


    Edit: the sconscript is actually very broken on mac, try going to line 230 (the one which says env.Append(LIBS=['z', 'bz2'])) and add this line:
    env.Append(CPPPATH="/dev/libs/SDL-1.2.15/include")
    Edited once by jacob1. Last: 31st May 2014
  • lastmonkey
    1st Jun 2014 Member 0 Permalink

    Thanks for the info. It still didn't build, but said SDL.h could not be found even with that added line. Mac Sconscript does seem very broken... I guess I'll try to compile tpt on Windows, for now.

    Edited once by lastmonkey. Last: 31st May 2014
  • jacob1
    1st Jun 2014 Developer 0 Permalink
    @lastmonkey (View Post)
    Where is SDL.h? --sdl-dir is supposed to be used to tell it where that is. Is it in /dev/libs/SDL-1.2.15/include? The default is normally /Library/Frameworks/SDL.framework/Headers, if you have the SDL framework installed correctly or something.
    Edited once by jacob1. Last: 1st Jun 2014