openFrameworks & github
openFrameworks & github/roxlu-addons

Github is used by a great group of openFrameworks developers. If you never heard of Github you can think of it as a place where people share their code and keep track of changes. It's build around the GIT version control system. I started using Google Code but after a while I changed to Github. Github represents more the ambience around openFrameworks; GitHub is social coding! It has great features when working on code. For example I used it a couple of times to "fork" a project of someone else where I had to add new features. When you fork a project you create a copy of the original files and you can start changing the code. The nice thing is that you leave the original code intact, but when the owner of the library, you forked, thinks your changes are worth adding, they can merge your changes with the original code. These source files are called a repository;
Have a look at a couple of repositories I created at github:
The number of forks and repositories I've got on Github grew over time. After a while it was kind of a hustle managing these repositories. Because normally, when you work with GIT you clone the source files of a repository to your local filesystem. There you change the files and when you're satisfied with your changes, you (as it is called) commit the changes and push those to a GIT server (which is part of Github). This last line contains important aspects of GIT:
- clone: create a copy of a repository on your local filesystem
- commit: tell the repository to store the changes
- push: upload your local changes to the remote git server
- pull: download changes form the (remote) repository to your local filesystem.
One thing I didn't talk about it the pull command. The pull command merges the remote repository with your local one. In practice this means for me, that when I'm working at our office at ApolloMedia, I make changes to a repository, commit and push those to the server. When I arrive at home I update my local repository by using the pull command.
Installing GIT on your Mac / Windows
You can download repositories as a zip file from github, though it's handy to have a clone of the repositories as you easily update the repositories with the latest version by executing a script. To install GIT on your Mac I refer to this page: http://help.github.com/mac-git-installation/. Before continuing these articles I advice that you install GIT first. When you're working on Windows, check this page to intall GIT.
Checking out the roxlu-addons (Mac only)
Because I needed to install openFrameworks and my addons on multiple Macs I created a script that helped me to checkout all of the addons at once. For this you've to know how to work with a terminal. First: don't be scared of a terminal. A terminal is just an application which appears nerdy and scary to most users. Don't be scared, open quickfinder and type "Terminal". It should find the Terminal app, open it. The following window appears:

Leave you're terminal window open, and download the scripts that help you to download the roxlu repositories. Go to the _scripts repository on my roxlu account on GitHub. There you'll see a "Downloads" button. Click on this and then click on the "Download .zip" button which opens in a popup. Now we need to create a directory where we will put the roxlu addons. We assume you followed my openFrameworks and XCode article and you've installed openFrameworks in Documents/openFrameworks. If not, it doesn't matter, you only need to take care of finding the correct paths yourself.
Okay, open Finder, go to Documents/openFrameworks and create a directory called "addons_roxlu". Now extract the just downloaded _scripts .zip file and copy the files to this addons_roxlu/_scripts/ directory. Your directory layout will look like this:
openFrameworks/addons_roxlu openFrameworks/addons_roxlu/_scripts/clone_git.sh openFrameworks/addons_roxlu/_scripts/clone_https.sh openFrameworks/addons_roxlu/_scripts/repositories.sh openFrameworks/addons_roxlu/_scripts/repositories.txt
In the terminal which you opened earlier, type in the following commands.
cd Documents/openFrameworks cd addons_roxlu/_scripts/ chmod 777 *.sh ./clone_https.sh
After executing this command you'll see that all the roxlu_addons have been checked out and are ready to use! Now you're ready to continue with the other articles. Lets start with the openFrameworks & Flash one.
