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 ...
- Apple Xcode
- [Qt] (http://qt.digia.com/) (v4.8.4 or later)
- PyQt4 Python Qt4 binding
- [Apache Xerces-C++] (http://xerces.apache.org/) (v2.8.0)
- SDL
- [cmake] (http://www.cmake.org)
- [Codesynthesis XSD] (http://www.codesynthesis.com/products/xsd/)
###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
- Download [XSD 3.3 for mac] (http://www.codesynthesis.com/download/xsd/3.3/macosx/i686/xsd-3.3.0-i686-macosx.tar.bz2)
- Extract the downloaded archive
- Move the extracted folder to /opt/local (you will need to authenticate).
###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.