In order to build the driver you must have PHP plus developer tools installed. This may be done from source or using package managers.
n.b. PHP version 5.4.3 is required. It is unlikely that PHP distributions from system package managers such as YUM or APT will have a recent enough version For this reason we strongly recommend installing PHP from source.
There is one prerequisite for all Linux systems:
sudo apt-get install libxml2 libxml2-devTo install PHP on a Linux system use the following commands:
wget http://www.php.net/distributions/php-5.4.3.tar.gz
tar xzvf php-5.4.3.tar.gz
cd php-5.4.3
./configure --enable-shared --with-zlib --enable-cli --enable-pdo
make
sudo make installThe API must be linked against the existing Remote libraries, and requires the includes shipped with the product. Export the following environment variables:
export NUODB_LIB_DIR=/opt/nuodb/lib64
export NUODB_INCLUDE_DIR=/opt/nuodb/include
export PHP_INCLUDE_DIR=/usr/local/include/phpWindows is slightly different:
set NUODB_LIB_DIR=C:\Dev\Software\NuoDB\lib
set NUODB_INCLUDE_DIR=C:\Dev\Software\NuoDB\include
set PHP_INCLUDE_DIR=/usr/local/include/phpCurrently we support building the API on both Windows and Unix, supporting GNU makefiles, and both Xcode and Visual Studio 2010 projects. On Mac, your option is to use either Xcode or GNU makefiles.
Run the following command to generate GNU makefiles:
cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=RelWithDebInfo .Run the following command to generate Xcode project files:
cmake -G XcodeRun the following command to generate Visual Studio 2010 project files:
cmake -G "Visual Studio 10" -DCMAKE_BUILD_TYPE=RelWithDebInfoThe cmake build system is chained to master on the nimbusdb repository via git submodules. The dependent artifacts are built first followed by the C++ API.
Run the following command to perform a GNU Make based build:
makeRun the following command to perform an Xcode build:
xcodebuildRun the following command to perform a Visual Studio build:
build-vs.batTo build on Solaris, install all GNU tools, including GNU Make; do NOT
use the make command as this is from the Sun Tool chain. To build on
Solaris run the following make command instead:
gmakeRun the following command to clean the build area:
make cleanThough generally unnecessary, in some cases after modifying CMake files you may need to regenerate all generated files. Run the following command then generate makefiles according to above to force regeneration:
make clean
rm CMakeCache.txtPrerequisites for running the unit tests include having a running chorus; a minimal chorus can be started using these commands:
java -jar nuoagent.jar --broker --domain test --password test &
./nuodb --chorus flights --password planes --dba-user cloud --dba-password user &Run the following commands to run the tests:
pear run-tests tests/*.phptTag the product using tags per the SemVer specification; our tags have a v-prefix:
git tag -a v1.0.0 -m "SemVer Version: v1.0.0"If you make a mistake, take it back quickly:
git tag -d v1.0.0
git push origin :refs/tags/v1.0.0After running a build, run the following command to build a binary distribution:
cpack -G TGZSimilarly, on Windows run the following command:
cpack -G ZIP