Companion 2.1 OSX Build Instructions - stodev-com-br/opentx GitHub Wiki

(For building 2.2 companion see the OpenTX build instructions on OS X)

##Prerequisites

You will need ...

###Installing Xcode

Simply get it from the Mac App store, it's free.

After installing Xcode make sure to install the command line tools with

xcode-select --install

You can accept the license on the command line with

sudo xcodebuild -license

###Installing Qt

sudo port install qt4-mac

Phonon:

sudo port install phonon

And the python binding:

sudo port install py-pyqt4

Then you need to tell the system to use the Python from the MacPorts collection:

sudo port select --set python python27

###Installing Apache Xerces-C++

MacPorts to the rescue again ...

sudo port install xercesc

###Installing Codesynthesis XSD

###Installing CMAKE

MacPorts to the rescue yet again ...

sudo port install cmake

###Installing SDL

MacPorts again ...

sudo port install libsdl

##Building Companion

Finally, we're ready to grab the source files and build Companion itself.

###Check out the OpenTX source

Install a git client ( [Atlassian SourceTree] (http://www.sourcetreeapp.com/) is a good choice) Go to the [project's Source page] (https://github.com/opentx/opentx) and clone the repository into a folder on your hard drive.

###Prepare a Makefile using CMAKE

cd opentx/companion/
mkdir build
cd build
cmake -G 'Unix Makefiles' ../src

Finally, we're ready to compile ...

make clean
make

When the build process completes (with no show-stopping errors!) you will end up with a folder named "companion.app".

You should now be able to run Companion from your terminal, like so ...

./companion.app/Contents/MacOSX/companion

or

open companion.app

You can also locate 'companion' (of type Application) in Finder and double-click that to launch it -- or copy the application to /Applications, if you like.

⚠️ **GitHub.com Fallback** ⚠️