GUIDE: How to compile on OS X.

  • ZebraineZ
    29th Nov 2010 Member 0 Permalink
    Ok I don't know if this is where it goes but I *think* I finally grasped the idea, with whatever methods, to compile as efficiently as I could. Thanks to some people at this Mac forum, and to flarn2006 who helped me I guess for the last step, even though I didn't get it at first but then when this dude explained it to me at those forums it clicked lol.
    _____________________________________________________________________________________

    Ok so.

    First step you need to take is install XCode/Developer Tools, even though the method we compile with in this guide is through the Terminal/command line, I'm sure there is a way to compile with XCode as well, hopefully in the future someone can find out :P.

    Download XCode from here: http://developer.apple.com/technologies/tools/

    Also let's install SDL, the PROPER way, so you don't get any errors during compiling.

    First, get this file:

    http://www.libsdl.org/release/SDL-1.2.14.tar.gz

    Next, open up your console and change to the directory that you downloaded this file to. Probably 'Downloads' in your user folder. Next, type in:

    tar xzf SDL-1.2.14.tar.gz

    This will extract all the files into a folder called SDL-1.2.14. Go to this folder by typing:

    cd SDL-1.2.14

    There's a configure and a makefile in this folder. You'll have to run both.

    ./configure

    It'll check a bunch of stuff. Next, type in:

    make

    It'll compile a bunch of stuff. After it's done, you have one more step:

    sudo make install

    ------------------------

    Second step, after all that's done, in the Terminal, you need to cd to the powdertoy source folder, so we can start compiling.

    Type in cd, like in this picture:
    http://i55.tinypic.com/2hzr0nq.png .

    Next, what I would usually do is just drag the folder into the Terminal window to make the linking easy.

    Should end up like this:
    http://i54.tinypic.com/96hyds.png.

    Click enter, and after that do "make powder-x". It should start writing a bunch of things, warnings and stuff, which are fine. Towards the end when it's done, it usually says 'strip powder-x' like in this picture: http://i55.tinypic.com/2qlqu7q.png.

    Now you should have 2 files in the folder, the important one being 'powder-x' which is a "unix executable file", therefore it only runs from the command line, which we don't want, here is a pic of the outcome: http://i53.tinypic.com/29aryhk.png.

    --------------------------------

    Now since we want to actually have a complete stand alone application rather than a crappy command line based one, so we can share with our buddies and show off in the forums, there is a third step to do that, and here I explain my method on it.

    Now notice in one of the pics I had a Powder.app next to the folder, yes, now I will explain what to do.

    1) Right click on the Powder.app > "Show package contents" >/Contents/MacOS, you will notice something familiar...it's a powder-x file!

    2) Go to the source folder, mine is cracker, since he is an awesome modder, and drag the powder-x in the source folder, into the one in the Powder.app one, replacing the one in there. Here is a pic for dummies: http://i56.tinypic.com/xc3mz9.png.

    3) Open Powder.app now, and voila! Perfect, complete app, just like the one on the website with the icons and everything, no command line launching needed! Share to your hearts content, I hope this long overdue guide helped all of you fill those gaps that were left for us OS X users now we can enjoy powder toy fun too!

    4) Here is another picture for the lulz:
    http://i52.tinypic.com/jb67va.png.

    Credits:

    Dudes at MacRumors.
    Dudes here, and I guess flarn2006.
    Cracker for his awesome mod. I'm proud to be a 'crack' head get it? Crackhead? harharharhar....I am so funny... -___-.
  • jakester12345
    29th Nov 2010 Member 0 Permalink
    OMG thank you soooo soooo soooo much! I finally compiled on my MacBook :D thank you soooooo much

    Cheers, Jakester12345
  • andrewdavidloftus
    29th Nov 2010 Member 0 Permalink
    what is your "console"? If it is the app "console," what do you to to change the directory.
  • jakester12345
    29th Nov 2010 Member 0 Permalink
    To change the directory type: cd /(the directory)
  • andrewdavidloftus
    29th Nov 2010 Member 0 Permalink
    thx
    Also, what does"console" refer to...
  • ZebraineZ
    29th Nov 2010 Member 0 Permalink
    andrewdavidloftus

    What do you mean?
  • jakester12345
    29th Nov 2010 Member 0 Permalink
    Youbuse terminal to compile, not the console.
  • andrewdavidloftus
    29th Nov 2010 Member 0 Permalink
    Ignore everything i first said... (fixed it, but i have a new problem)

    This is the order of what happened:
    1.Downloaded the sdl file
    2.Opened terminal
    3.entered cd desktop (i moved it from downloads to desktop- easier to open...)
    4.entered tar xzf SDL-1.2.14.tar.gz

    It then comes up on a bunch of lines following this pattern:
    SDL-1.2.14/src/----/----/: Can't update time for SDL-1.2.14/src/----/----: Operation not permitted
    (the ----'s in this line represent different file locations: on each line the location was different)
    It also said : Error exit delayed from previous errors. on the last line before i,

    5.entered cd SDL-1.2.14

    It then says:
    --------:desktop -----$ cd SDL-1.2.14
    --------:SDL-1.2.14 -----$ ./configure


    6.entered ./configure

    It then says:
    --------:SDL-1.2.14 ------$ ./configure
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/Volumes/Home/Users/-------/desktop/SDL-1.2.14':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.
    --------:SDL-1.2.14 ------$


    If i continue, by typing in make it shows:

    -------:SDL-1.2.14 ------$ make
    -bash: make: command not found
    --------:SDL-1.2.14 ------$


    How do i fix the error?

    Also, i refer to ___ when i put:
    ------=private info
    example=terminal input or result

    Thx
  • ZebraineZ
    29th Nov 2010 Member 0 Permalink
    Do you have XCode installed? The developer tools, which have gcc and everything.
  • andrewdavidloftus
    29th Nov 2010 Member 0 Permalink
    I actually think my problem is that i don't have an "acceptable" c-compiler:

    checking build system type... i386-apple-darwin10.5.0
    checking host system type... i386-apple-darwin10.5.0
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/Volumes/Home/Users/student':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.
    logout

    [Process completed]


    So, which "acceptable" c-compiler is best for mac: gcc, cc, or cl.exe ?