Building Road Trip
==========================================================================

Road Trip should build directly from git.  However, some source code is
generated automatically by the Protocol Buffers compiler.  Any changes
to the Protcol Buffers schema requires installation of protobuf and
protobuf-objc.

1. Troubleshooting
==========================================================================

1.1 ProtocolBuffers/ProtocolBuffer.h
--------------------------------------------------------------------------

Builds may fail with an error about ProtocolBuffers/ProtocolBuffer.h not
existing.  This is especially true of archive builds.

The fix is to archive the ProtocolBuffers project first, and then do the
app archive.

This seems to occur because archive uses the "Distribution (Ad Hoc)"
build configuration.  Embedded frameworks need a build configuration with
the same name.

The "Distribution" configuration is only used for controlling code signing.


2. Protocol Buffers Compiler
==========================================================================

Both projects are included in the Road Trip git repository.

2.1 Installing protobuf
--------------------------------------------------------------------------

cp ExternTools/protobuf-2.6.1.tar.gz /tmp
pushd /tmp
tar zxfv protobuf-2.6.1.tar.gz
cd protobuf-2.6.1
./configure --prefix=/opt/local
make
sudo make install
popd

2.2 Installing protobuf-obj
--------------------------------------------------------------------------

pushd Classes/3rdParty/protobuf-objc
./autogen.sh
./configure CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib --prefix=/opt/local
make clean
make -j8
sudo make install
popd

2.3. Test protobuf compiler
--------------------------------------------------------------------------

mkdir tmp
cd tmp
cp ../Classes/Persist/RTPCommon.proto .
../scripts/protobuf-objc.sh RTPCommon.proto


