Difference between revisions of "Compiling for OS X"

From The Powder Toy
Jump to: navigation, search
m (Category)
m
Line 30: Line 30:
  
  
Go into the makefile and open it with text edit. Remove <code bash>-DLUACONSOLE</code> and <code bash>-DGRAVFFT</code>  
+
Go into the makefile in the source code and open it with text edit. Remove <code bash>-DLUACONSOLE</code> and <code bash>-DGRAVFFT</code>  
  
 
Done! Now, you are able to compile Source code into the applications!
 
Done! Now, you are able to compile Source code into the applications!

Revision as of 15:10, 31 March 2013

Note: This page is only for OS X (10.7, 10.8) Note: If you are 10.6 or below, go to this page: 10.6


Download Xcode from the App Store link

Download SDL link

Download xQuartz link


This should download to your downloads folder. Keep uncompressing until it becomes a folder.

Then, in terminal, type cd (<-- Make sure there is a space after) and then drag the SDL folder in.

then type in (or copy / paste) ./configure && make


If that comes up with an error, go to this page and download 'Command Line Tools for OS X'.

There are two versions. One is for lion 10.7 and the other is for mountain lion 10.8. If you don't know which you are using, go to the apple in the top left hand corner and press about my mac.


After that, install SDL by typing in sudo make install It will ask you for your password. Type it in and press enter.


Lua doesn't compile right. Sorry, NO LUA CONSOLE FOR YOU.


Go into the makefile in the source code and open it with text edit. Remove -DLUACONSOLE and -DGRAVFFT

Done! Now, you are able to compile Source code into the applications!


To compile, type in cd and drag the source code into it.

Then type make powder-x


It will go though the process of compiling the source code, and it should say something along the lines of 'strip powder-x'

In your source folder, you will see a powder-x file. How do you run it, you ask?

Well, you will need to download a copy of powder toy, and right click (or control click) and click 'show contents'

Open the Contents folder, followed by the MacOS folder. Inside it is a powder-x file! Simply copy or move the powder-x from the source code folder and place it inside the .app


Congrats, you have compiled spare code and have made a OS X application.


This was written by Candunc, although parts were copied from the Mac OS X compile page. Thanks to the editors on the Mac OS X compile page, and thanks to people at Mac Rumors and Ximon to help me find out various errors.

I hope this helps future users become Mac Compilers and push TPT to Mac users!