Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Build Instructions

Viv Rajkumar edited this page Feb 9, 2015 · 2 revisions

General Prerequisites

  • This project requires the MaidSafe Super Project to be setup. Please follow the build instructions for your platform from the linked Super project Wiki.

Currently the only target required from the super project is maidsafe_rudp. Please note Android builds also require additional CMake arguments to be provided to the super project when running CMake. This will be detailed later

  • SWIG - Please follow the build/install instructions from the SWIG website to get SWIG configured on your machine.

Limitations

  • Android - Only supported in Linux.
  • CSharp - Limited to Windows with MSVC.
  • Nodejs - Only supports Release builds
  • Python - None

Android Build Instructions

Prerequisites

Switch the --platform to the API level you wish to create the port for.

cd <crystax-ndk-root-dir>
./build/tools/make-standalone-toolchain.sh --system=linux-x86_64 --toolchain=arm-linux-androideabi-4.8 --platform=android-21 --install-dir=../android-ndk-crystax-standalone-toolchain-4.8-21

Build Steps

MaidSafe Super Project -

Create a new build folder for Android builds and run CMake such as

cmake <normal arguments> -DANDROID_BUILD=ON -DANDROID_NDK_TOOLCHAIN_ROOT=<path to standalone tool-chain install dir>

make maidsafe_rudp

MaidSafe-Ports Project -

Create a new build folder for Android builds and run CMake with the following arguments.

-DMAIDSAFE_BINARY_DIR=<path to the Android build folder for MaidSafe Super Project>
-DANDROID_SDK_ROOT=<path to android sdk root>
-DANDROID_NDK_ROOT=<path to crystax ndk root. Not standalone toolchain root>

This should now expose the targets android_port and android_sample. Run make with either to build the corresponding target.


CSharp Build Instructions

MaidSafe Super Project -

Build target maidsafe_rudp.

MaidSafe-Ports Project -

Run CMake with the following argument -DMAIDSAFE_BINARY_DIR=<path to the MaidSafe Super Project build folder>

This should now expose the targets csharp_port and csharp_sample. csharp_sample will build a sample app(which uses MaidSafe libs) and also run it as part of it's build process.


Nodejs Build Instructions

Prerequisites

In some Linux systems node does not point to nodejs and instead points to another app. Please verify this isn't the case on your machine.

Build Steps

MaidSafe Super Project -

cmake <normal arguments> -DCMAKE_BUILD_TYPE=Release
make maidsafe_rudp

Only Release builds are supported for nodejs

MaidSafe-Ports Project -

Run CMake with the following argument -DMAIDSAFE_BINARY_DIR=<path to the MaidSafe Super Project build folder>

This should now expose the targets nodejs_port and nodejs_sample. nodejs_sample will build a sample app(which uses MaidSafe libs) and also run it as part of it's build process.


Python Build Instructions

Prerequisites

  • Python Libs - Depending on your platform install/fetch-python-dev package.

Build Steps

MaidSafe Super Project -

Build target maidsafe_rudp.

MaidSafe-Ports Project -

Run CMake with the following argument -DMAIDSAFE_BINARY_DIR=<path to the MaidSafe Super Project build folder>

This should now expose the targets python_port and python_sample. python_sample will build a sample(which uses MaidSafe libs) and also run it as part of it's build process.

Clone this wiki locally