We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.
Difference between revisions of "Template:MacInstallPrep"
From wiki.openlighting.org
(Created page with "= Install a Compiler= The easiest is to install [http://developer.apple.com/technology/xcode.html Xcode] . Xcode comes in two versions: XCode 4 which you need to pay for and XCo…") |
(No difference)
|
Revision as of 21:05, 13 May 2012
Install a Compiler
The easiest is to install Xcode . Xcode comes in two versions: XCode 4 which you need to pay for and XCode 3 which is free. XCode 3 works just fine.
You can use other compilers but that's outside the scope of this tutorial.
Install OLA Dependancies
The easiest way is to install the dependancies using MacPorts.
Once you have MacPorts installed, running the following command to download and build the dependancies.
sudo port install pkgconfig cppunit protobuf-cpp unittest-cpp libmicrohttpd libusb protobuf-python27
You may need to change which protobuf-python port you install based on the version of Python on your system. You can find that out by running
python --version
On my system I get
Python 2.7.1
So I install the protobuf-python27 port. Remember which version you install because you'll need it in the next section.
You also need git installed, if you haven't got it already run
sudo port install git
Set some environment variables
Set $PATH to point to something sane, and fix some other environment variables:
export PATH="$PATH:/usr/local/lib/" export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH" export CPPFLAGS="-I/opt/local/include" export LDFLAGS="-L/opt/local/lib" export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
You may need to tweak the PYTHONPATH depending on where protobuf-python was installed. You can find that out by running:
port contents protobuf-python27
Make sure the port name matches the one you installed in the step above.