Mac OS X Build Instructions =========================== The Easy Way: ------------- Atomic Labs has a tarball available from the "Third Party Libraries" page on our website that contains all of the required libraries to build Pion, with support for both 32-bit and 64-bit Intel and PowerPC architectures. To get started quickly, just download and uncompress this into your /usr/local/ directory, and you should be able to skip down to one of the last two steps! Building Boost with ASIO: ------------------------- Please see the README.boost file for general instructions. Installing zlib, bzlib & openssl: --------------------------------- Pion requires zlib, bzlib and openssl for compression and SSL/TLS encryption support, respectively. These libraries are normally pre-installed on OS X. If you do not have them already, you should be able to grab the latest source code tarballs from the "Third Party Libraries" page on our website, or from the following sites: http://www.zlib.net http://www.bzip.org http://www.openssl.org Logging frameworks: ------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. We recommend that you use log4cxx for logging. Log4cxx requires that you have the Apache Portable Runtime (APR) installed. This library is normally pre-installed on OS X (make sure that you have "libapr" and "libapr-util" dynamic libraries within /usr/lib). If you do not have APR pre-installed, you should be able to grab the latest source code tarballs from the "Third Party Libraries" page on our website, or from the following site: http://apr.apache.org Please visit the "Third Party Libraries" page on our website to obtain the source code tarball for log4cxx. Then, just run: # tar xvfj log4cxx-.tar.bz2 # cd log4cxx- # ./configure # make all # make install Installing libxml2: ------------------- The Pion Platform requires the libxml2 development library for manipulating configuration files, and other things. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. The libxml2 library is normally pre-installed on OS X. If you do not have it already, you should be able to grab the latest source code tarball from the "Third Party Libraries" page on our website, or from the following site: http://www.xmlsoft.org Installing OSSP uuid: --------------------- The Pion Platform requires the OSSP uuid library to generate universally unique identifiers for most platforms, including OS X. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. You can download the source code tarball for the uuid library from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz uuid-.tar.gz # cd uuid- # ./configure # make all # make install Installing SQLite: ------------------ SQLite version 3 is required to build support for the embedded database (the SQLiteDatabase plugin). You may skip this step if you do not want to build support for the embedded database. The SQLite library is normally pre-installed on OS X. If you do not have it already, you should be able to grab the latest source code tarball from the "Third Party Libraries" page on our website, or from the following site: http://www.sqlite.org Installing YAJL: ---------------- YAJL ("Yet Another JSON Library") is required to build support for the JSONCodec plugin. You may skip this step if you do not want to build support for JSON. To build YAJL, you must first have CMake installed on your system. You can download the source tarball for CMake from the "Third Party Libraries" page on our website, or from the following site: http://cmake.org You can download the source code tarball for YAJL from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz yajl-.tgz # cd yajl- # ./configure # make Note: to build universal libraries, edit the CMakeLists.txt file before running "./configure" and change this line: SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -ansi") to this: SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -ansi -arch i386 -arch x86_64 -arch ppc -arch ppc64") To install YAJL, we recommend that you just move the build files in the "build/yajl-" subdirectory into /usr/local: # sudo mv build/yajl-/lib/* /usr/local/lib # sudo mv build/yajl-/include/yajl /usr/local/include Building and installing Pion: ----------------------------- Now you should be able to build and install Pion: # tar xvfz pion--.tar.gz # cd pion-- # ./configure [--with-openssl] [--with-log4cxx] [--with-sqlite] [--with-yajl] # make all # make install To build and run Pion's unit tests, run "make check" Building with XCode: -------------------- There is an XCode project included in the root directory of each project called "pion-.xcodeproj". The XCode project assumes that you have the following optional libraries installed: openssl, zlib, log4cxx and SQLite. It also is configured to build a Universal binary with support for the i386 and ppc architectures. You must have built all the dependency libraries with support for both architectures for this to work properly. A tarball containing all of these built for both the 32-bit and 64-bit Intel and PowerPC architectures is available on the "Third Party Libraries" on our website. Alternatively, you can just modify the XCode project config to build only for your native architecture. To run the Pion server from within XCode, you first need to configure the executable's command arguments by right-clicking on "pion" under the "Executables" group in the left menu, and selecting "Get Info." Under the "Arguments" tab, add the following argument: "-c ../../platform/server/platform.xml" Next, set "pion" as the "Active Target" and click on the "Build and Go" button. Building "pion" will also build all of the service, codec, database and reactor plug-ins. To run PionWebServer from within XCode, you first need to configure the executable's command arguments by right-clicking on PionWebServer under the "Executables" group in the left menu, and selecting "Get Info." Under the "Arguments" tab, add the following argument: "-c ../../net/utils/services.conf" Next, set PionWebServer as the "Active Target" and click on the "Build and Go" button. Building PionWebServer will also build all of the service plug-ins.