VES/Developers Guide (Windows): Difference between revisions
JPouderoux (talk | contribs) |
JPouderoux (talk | contribs) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Installation steps= | =Installation steps= | ||
This page explains the VES and Kiwi installation process using Microsoft Visual C++ ( | This page explains the VES and Kiwi installation process using Microsoft Visual C++ (CL compiler for the host code compilation, and the NMake tool to build the whole bundle) under Windows, targeting the Android platform. | ||
= Getting Started = | = Getting Started = | ||
Line 8: | Line 8: | ||
==Prerequisites== | ==Prerequisites== | ||
* Microsoft Visual Studio >= 10 | |||
* Android NDK r8c | * Android NDK r8c | ||
* Android SDK | * Android SDK | ||
'''Important:''' You need to add the subdirectories of Android SDK "platform-tools" and "tools" to your PATH environment variable. | |||
Git.exe must also be available through the PATH. | |||
==Checkout the source from Git== | ==Checkout the source from Git== | ||
Line 52: | Line 54: | ||
The following commands will compile vtk and ves libraries for Android: | The following commands will compile vtk and ves libraries for Android: | ||
Edit Apps/Android/CMakeBuild/configure.bat and set the variable ANDROID_NDK to your NDK installation path. | Edit Apps/Android/CMakeBuild/configure.bat and set the variable ANDROID_NDK to your NDK installation path. | ||
You may also change the build type to Debug while the default is Release. | You may also change the build type to Debug while the default is Release. | ||
Latest revision as of 22:14, 15 March 2013
Installation steps
This page explains the VES and Kiwi installation process using Microsoft Visual C++ (CL compiler for the host code compilation, and the NMake tool to build the whole bundle) under Windows, targeting the Android platform.
Getting Started
For quick instructions, see the Download & Build Instructions page. This developer's guide will go into more detail than is found on that page.
Prerequisites
- Microsoft Visual Studio >= 10
- Android NDK r8c
- Android SDK
Important: You need to add the subdirectories of Android SDK "platform-tools" and "tools" to your PATH environment variable. Git.exe must also be available through the PATH.
Checkout the source from Git
Using TortoiseGIT, clone the repository:
git://vtk.org/VES.git using TortoiseGIT
Using Git to checkout the VES source code with the command line:
> git clone git://vtk.org/VES.git
See the VES Git table of contents page for details on the Git repository and development workflow.
Setting up your development environment
Android
You must have the Android SDK and Android NDK installed. To get started with Android development, visit the Android Developer's Guide. It is recommended that you build and run some of the Android sample applications that are provided with the Android SDK to get familiar with running code on your device before attempting to build and run VES/Kiwi based applications. See this README in the VES repository for a guide to setting up the Android development environment.
Build with CMake
CMake is used to configure and build VES.
What is a Superbuild?
VES is normally built using a superbuild. A superbuild manages the download, configure, build, and install steps of multiple projects all at once. The VES superbuild will download vtkmodular, then configure and build both vtkmodular and VES using the appropriate cross compiler for the target architecture. The target architecture may be an android device, iOS device, or the iOS simulator on x86. When configuring vtkmodular and ves, cmake is invoked in cross compile mode using a toolchain file for the target architecture. The toolchain files are located in the CMake/toolchains directory.
Building
Android instructions
The Android NDK r8c is currently the required version. It can be downloaded from:
http://dl.google.com/android/ndk/android-ndk-r8c-windows.zip
The following commands will compile vtk and ves libraries for Android:
Edit Apps/Android/CMakeBuild/configure.bat and set the variable ANDROID_NDK to your NDK installation path. You may also change the build type to Debug while the default is Release.
Start a VisualStudio command prompt. Then to the VES directory and type:
> cd Apps/Android/CMakeBuild > configure.bat > cd build > nmake
The superbuild compilation process starts.
Next, build and run the KiwiViewer application. Ant version 1.8 or higher is required.
> cd Apps/Android/Kiwi > > REM - if android, adb, ant, or cmake are not in your PATH, edit tools.bat to enter the correct paths > > configure_cmake.bat > configure_ant.bat > compile.bat
Use adb to confirm that your device is listed:
> adb devices
Run KiwiViewer on the device:
> run.bat
FAQ
Issue
The download of Eigen fails. This is because CMake may not support HTTPS protocol (through an URL redirection) used to fetch the Eigen archive.
Solution
In file CMake/ves-superbuild.cmake, change the line:
set(eigen_url http://bitbucket.org/eigen/eigen/get/3.1.2.tar.gz)
by
set(eigen_url http://fossies.org/unix/privat/eigen-3.1.2.tar.gz)