Project

General

Profile

Installing Wt on Mac OS X Leopard » History » Revision 15

Revision 14 (Jake Petroules, 07/13/2012 02:22 PM) → Revision 15/17 (Jake Petroules, 07/13/2012 02:37 PM)

h1. Installing Wt on Mac OS X Leopard 

 {{toc}} 

 The following are generic installation instructions for installing Wt (from source) on Mac OS X 10.5 "Leopard" and above. X. 

 _Only support for the built-in httpd server is listed here. While this is most convenient for development, and also useful for deployment, we probably should expand these instructions to include support for the FastCGI connector._ 

 


 h2. Requirements  

 * Get "Xcode":http://developer.apple.com/tools/xcode/ to get the compilers and basic libraries. 
 * Get "CMake":http://www.cmake.org/cmake/resources/software.html. "CMake 2.4.8":http://www.cmake.org/files/v2.4/cmake-2.4.8-Darwin-universal.dmg (the recently released 2.6.0 gives some warnings but also works fine). 
 * Download "Boost 1.41.0":http://www.boost.org/users/download/ 1.35.0":http://downloads.sourceforge.net/boost/boost_1_35_0.tar.bz2 (or later). 

 


 h2. Preparation  

  


 h3. Build Boost 

 boost  

 I preferred to install boost in my home directory (since I only need it for Wt). The following builds and installs Boost boost in /usr/local: a "$HOME/Installed" folder: 

 <pre> 
 $ cd boost* boost_1_35_0 
 $ ./bootstrap.sh ./configure --prefix=$HOME/Installed 
 $ sudo ./b2 make 
 $ make install 
 </pre> 

 If you would like to install in a different directory, you should run @./bootstrap.sh --prefix=/custom/directory@ instead. 

 You will get warnings that not all features will be built, but Wt doesn't require those. 

 If you used To build Wt using the --prefix option when building Boost, this custom build path, you will need to modify your dynamic library path: 

 <pre> 
 $ export DYLD_LIBRARY_PATH=/custom/directory/lib:$DYLD_LIBRARY_PATH DYLD_LIBRARY_PATH=~/installed/lib:$DYLD_LIBRARY_PATH 
 </pre> 


 h2. Building Wt  

 Get the "latest Wt version":http://sourceforge.net/projects/witty/files/wt/. version":http://sourceforge.net/project/showfiles.php?group_id=153710#files (wt-2.1.3 or later).  

 To build Wt, do the following: 

 <pre> 
 $ cd wt-3* wt-2.1.3 
 $ mkdir build 
 $ cd build 
 $ cmake -DBOOST_DIR=$HOME/Installed -DBOOST_VERSION=1_35 -DBOOST_COMPILER=xgcc40 ../ 
 $ make 
 $ make -C examples # $ to build the examples 
 </pre> 

 _NOTE: If you used the --prefix option when compiling Boost, you must run @cmake -DBOOST_DIR=/custom/directory@ instead of just @cmake@._ 

 
 To run the examples, please see the "generic installation instructions":http://www.webtoolkit.eu/wt/doc/reference/html/Installation.html#examples-wthttpd.