Add Announcement Here

setting up OS X for gamestool from scratch

setting up OS X for gamestool from scratch

Ok, so my macbook pro died AGAIN, and this time it took the hard drive with it.

Anyway, I got it back from repairs and now I don't have anything setup. So taking this, er, opportunity I figured I'd jot down all the steps needed to go from cold to developing and committing code.

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Re: setting up OS X for gamestool from scratch

installing eclipse:
I went with Juno 4.2, which means all the old OSX 3.6 directories are deprecated now.
Just google eclipse and then follow the links to download.

Next just extract eclipse to the 'Library' directory and then drag a shortcut into the dock.

Next comes the CDT plugin, you'll need this for C++ and you can get all this from the software installer internal to eclipse:
click 'help->install new software'.
select 'juno' from 'work with' drop down.
expand 'programming languages'
select the c/c++ tools and hit install.

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Re: setting up OS X for gamestool from scratch

Now it's time to get the source.

First get mercurial form:
http://mercurial.selenic.com/downloads/

Now get murky which gives you a visual client to work with. It's not perfect and at the moment there seems to be an issue getting it to work with OS X certificates (as so ssl doesn't work through murky). That's ok, just use the terminal when pushing and pulling to/from the server.

To get a copy out of source forge, you can use murky (read only isn't ssl), where you clone from the source:
http://gamestool.hg.sourceforge.net:800 … /gamestool

To push your changes to the server, you'll need to login to source forge to get the SSL location.

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Re: setting up OS X for gamestool from scratch

I hate apple. In order to get the c/c++ toolchain and libs installed you need their developer tools, and to get those you need to register as a developer on their website. Hell knows why, but you have to.

Then you must find the xcode developer pack which for lion and above it's apparently not so massive. But because I don't want to pay for the privilege of a crippled OS, I am forced to install the massive 4.2 gig complete xcode package for leopard! Just for the fucking c/c++ toolchain and libs. Fuck you apple. Anyway, there's a better way:

Get this stripped down installer from here:
https://github.com/kennethreitz/osx-gcc-installer

When that's finished installing, test it out through the terminal by typing in:
'make -v' and then 'gcc -v' and you should see version info for both.

When compiling with eclipse, be sure to set your tool chain to linux GNU, AND binary parser to GNU elf.

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Re: setting up OS X for gamestool from scratch

Now it's time for some of 3rd party includes. Don't worry, this walkthrough is going into the READ_ME which at this point isn't very good.

To get boost, you'll need to download from their homepage:
http://www.boost.org/users/download/

unzip and now comes the fun part:
This guy here posted the method I used and it seems to work:
http://stackoverflow.com/a/11297605
I'll paraphrase the post here:

Configure (and build bjam):

Code:

 $ ./bootstrap.sh --prefix=/some/dir/you/would/like/to/prefix 

Build:

Code:

$ ./b2

Install:

Code:

$ ./b2 install

Now you'll need to sudo the install because it'll want to put the dynamic libs into /usr/lib which is a locked system dir.
I also install into /usr/include to make things easy.

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Re: setting up OS X for gamestool from scratch

Currently there are really only unit tests and an example app to compile. In the future example app will be removed and you'll only have the unit tests, addons and the editor to choose from.

For the most basic unit tests, you won't need openGL but you will need the google testing framework. I'll go over how to setup the testing framework first and then go over how to install open GL

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Re: setting up OS X for gamestool from scratch

To get the google testing, go here:
http://code.google.com/p/googletest/downloads/list

Now extract it somewhere sensible (I put mine in /Developer/SDKs/gtest-1.6.0). Next you have to build the static lib that gets included in our unit test projects. So crack open the README and follow the instructions to build it. This will normally involve the cmake function you got when you installed gcc in the above step. I say normally because in windows you open the Visual Studio solution included with the google test download.

Anyway, you should get a libgtest.a file inside the lib directory. Next you may need to point you projects to this location, and to do this I like to add symbolic links (shortcuts) in the 'shared' directory of the gamestool project directory. This directory is included by the specific eclipse projects that need them. This seems neater than distributing assumed directory locations in the project itself and makes it easier for people to change where the project looks for different SDKs and frameworks.

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Re: setting up OS X for gamestool from scratch

to setup a symbolic link, use the terminal and type

Code:


$ln -s /source alias

Where the '/source' the directory you want (IE /Developer/SDKs/gtest) and alias is what you want to call the link/shortcut.

http://hints.macworld.com/article.php?s … 0610290643

stu
useravatar
Offline
667 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
242
Total Polls:
0
Total Posts:
466
Dormant:
User Info:
 
Total Users:
7
Newest User:
ian96
Members Online:
0
Guests Online:
41

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked
gamestool, Powered by Joomla! and designed by SiteGround Joomla Templates