Skip to content

Getting Started: Working on native 64 bit OSX Plugins

IOhannes m zmölnig edited this page Dec 8, 2017 · 5 revisions

Before you read this

There is a another (probably more complete) tutorial on How to build gem on OSX/Mavericks.

You should also check the How to contribute document before contributing...

Github

I would advise a Github account so that you can fork Gem and commit you changes directly for testing. This is a really great way to collaborate on code. Once you have an account, fork the master Gem project

Once successfully compiled issues can be logged at the master

There is also a GITHUB GUI app for macOS but alternatively you can also push changes you have made directly from the terminal. Here is the app:

Installing stuff

Install Pd

Download the newest PD and put in Applications Make sure it is the 64Bit version:

http://msp.ucsd.edu/Software/pd-0.46-5-64bit.mac.tar.gz

Install XCode command line tools:

You need to download the Xcode Command Line tools. They come with Xcode but if you don't want to install full Xcode development package, you can run the following in a terminal:

$ xcode-select --install

…and then click Install rather than Get Xcode.

Install homebrew

Install Homebrew by pasting the following in a terminal:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

If you have not installed Xcode command line tools you will be asked to install. This might take a few minutes.

Install some needed packages

$ brew install git pkg-config gettext imagemagick ftgl automake

You will have to “link” gettext with:

$ brew link gettext --force

Get going

Set up a ,,development'' directory;

$ mkdir ~/Development
$ cd ~/Development

Clone Gem from Github

$ git clone https://github.com/YOURACCOUNT/Gem.git
$ cd Gem

Building Gem

Pre-building steps

$ ./autogen.sh
$ ./configure --without-QuickTime-framework --without-Carbon-framework --with-defaultwindow=gemcocoawindow --with-pd=/Applications/Pd-0.46-5-64bit.app/Contents/Resources

make and install Gem:

This should install Gem in ~/Library/Pd so when you open Pd and add the Gem library you will see the library has loaded.

$ make CPPFLAGS=$(pkg-config --cflags freetype2) 2> errorfile.txt
$ DEST=~/Library/Pd && make install libdir=${DEST} prefix=${DEST}/Gem/stuff

AVFOUNDATION

In ~/Development/Gem you should see a “plugins” folder where the filmAVFoundation folder/plugin is located. That is what needs work. At the moment it does NOT work. You should be able to figure out what the code does, figure out why it is not working, potentially fix the problems and recompile Gem until the plugin does work. Use some of the other working plugins such as filmGMERLIN and filmDARWIN as examples. There is little to no documentation on how plugins are coded but working ones should be pretty clear examples.

Commit your changes

Once you have started working on it commit your changes regularly:

$ git commit -m “THIS IS WHERE YOUR CUSTOM COMMIT MESSAGE GOES”
Clone this wiki locally