Compiling TPT using XCode

  • minecraft-physics
    17th Nov 2013 Member 0 Permalink

    I know most people are on Windors or Linux, but i was wondering if anyone knew how to use the very confusing interface on XCode to compile the source I got off GitHub. Or any other way using mac osx; for that matter. Most of the online tutorials (INCLUDING THE WIKI) were vastly unhelpful, in that they did not work in the console even after downloading the console tools suggested. It's probably due to stupid Mavericks again, dammit apple y u no stabilise interface.

  • fordcars
    17th Nov 2013 Member 0 Permalink

    Xcode on Mac is extremely easy compared to Visual C++ on Windows. 

    Ok so I checkout out the Wiki. You need SDL and XQuartz. The Wiki should be very healpful here: https://powdertoy.co.uk/Wiki/W/Compiling_for_OS_X.html

     

    For the console, you probably didn't set up the PATH correctly. Please explain in more detail what happens when you try the console things.

    Edited 2 times by fordcars. Last: 17th Nov 2013
  • minecraft-physics
    17th Nov 2013 Member 0 Permalink

    Sorry. Well, I have XQuartz, and SDL, but the command line tools are no longer free through that particular pathway. Instead, I typed

     

    xcode-select --install

     

    into the terminal, which worked.

     

    Then, I typed (as per the wiki)

     

    cd /Users/(my username)/Desktop/The-Powder-Toy-master ./configure && make

     

    Which yielded the error "make: *** No targets specified and no makefile found.  Stop."

     

    Edit: I've been playing around with various combinations of ./configure and make; to little avail.

    Edited 3 times by minecraft-physics. Last: 17th Nov 2013
  • mniip
    17th Nov 2013 Developer 0 Permalink
    riiiiiiiiiiiiiiiiiiiight
    because TPT doesn't use neither autoconf nor makefiles
  • jacob1
    17th Nov 2013 Developer 0 Permalink
    @minecraft-physics (View Post)
    That wiki article is strangely confusing ... I don't know why. You are supposed to be typing that in the SDL folder apparently, to install it. So try that and then type sudo make install in the same folder too.

    After that you cd into the folder with scons and type "sudo python setup.py install" to install that.

    Then finally, you cd into the folder with the TPT code and scons --macosx --release --stable --sse2 --nofft

    Also, xcode probably isn't really required, the guide doesn't even have you use it. You can use it if you want, or whatever else you prefer.
    Edited once by jacob1. Last: 17th Nov 2013
  • fordcars
    17th Nov 2013 Member 0 Permalink

    Oh okokokok you have to cd to sdl and then ./configure && make

  • minecraft-physics
    18th Nov 2013 Member 0 Permalink

    ahhhhhh that'll do it. EDIT: make returns error 1: unknown type name 'CGDirectPaletteRef'. It also comes up with the warning 

    ./src/video/quartz/SDL_QuartzEvents.m:816:13: warning: 'UpdateSystemActivity' is

          deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]

                UpdateSystemActivity(UsrActivity);

    Edited 3 times by minecraft-physics. Last: 18th Nov 2013