Latest commit 574d7c3
Jan 10, 2012
|Failed to load latest commit information.|
Build and Installation Instructions for OpenVSP INTRODUCTION OpenVSP is a parametric aircraft geometry tool. OpenVSP allows the user to create a 3D model of an aircraft defined by common engineering parameters. This model can be processed into formats suitable for engineering analysis. The predecessors to OpenVSP have been developed by JR Gloudemans and others for NASA since the early 1990's. In January 2012, OpenVSP was released as an open source project under the NOSA 1.3 license. LICENSE OpenVSP is available under the terms of the NASA Open Source Agreement (NOSA) version 1.3. The complete terms of the license are specified in the LICENSE file. DEPENDENCIES -OpenVSP relies on a variety of libraries and code made available by other authors. These libraries are not included with VSP and must be obtained in order to build OpenVSP. -CMake (www.cmake.org) Cross-platform build system. CMake generates platform-native build files which control compilation of OpenVSP. CMake is available as a standard package on most Linux systems and binary installers are available for many other platforms including Windows and Mac OS X. -OpenGL (www.opengl.org) 3D graphics library. OpenGL should be available on any platform capable of displaying 3D graphics. The OpenGL development tools must be installed on your computer to build OpenVSP. -glext.h (www.opengl.org/registry) Extension header for OpenGL. This header provides access to OpenGL extensions which are not a part of the core standard. A copy of this header is included for systems which do not provide it. -FLTK (www.fltk.org) Cross-platform windowing library. FLTK should be available as a standard package on most Linux systems and can be installed from source on Windows and Mac OS X according to the FLTK instructions. -Libxml2 (www.xmlsoft.org) XML parser and toolkit. Libxml2 most likely comes pre-installed with most Linux distributions and Mac OS X systems. Windows users must download the source and build this library following the Libxml2 instructions. -libjpeg (www.ijg.org) JPEG compression library. Like Libxml2, libjpeg is likely to be pre-installed with most Linux distributions and Mac OS X systems. Windows users must download the source and build this library following the libjpeg instructions. -OpenNURBS (www.opennurbs.org) Rhino 3DM file I/O library. Download the C++ toolkit from the OpenNURBS web site and extract the files into the 'openvsp/src' directory creating the directory 'openvsp/src/opennurbs'. OpenNURBS is built according to the instructions that come with it. -Triangle by Jonathan Shewchuk (www.cs.cmu.edu/~quake/triangle.html) 2D Delaunay triangulator. This routine has been included in this distribution. -triInt by Tomas Moller (jgt.akpeters.com/papers/Moller97) Fast triangle-triangle intersection test. This code comes from two sources. The routines are included in this distribution. jgt.akpeters.com/papers/Moller97/tritri.html jgt.akpeters.com/papers/MollerTrumbore97/code.html -glFont2 by Brad Fish (students.cs.byu.edu/~bfish/glfont2.php) 2D OpenGL font tool. glFont2 has been included in this source distribution. -trackball Virtual trackball code for intuitive 3D rotations. Gavin Bell's trackball code is included in an example program distributed with the GLUT library which accompanies OpenGL. If the OpenGL development files are installed on your system, then trackball may be included. Otherwise, the source and header files are available from the following URLs: www.opengl.org/resources/code/samples/glut_examples/ examples/trackball.c www.opengl.org/resources/code/samples/glut_examples/ examples/trackball.h Place 'trackball.c' and 'trackball.h' in the 'openvsp/src/vsp' directory. BUILD INSTRUCTIONS -Linux / Mac OS X All of the supporting libraries and code described above in DEPENDENCIES must be properly installed. The OpenNURBS library must be compiled before OpenVSP can be built. Change to the 'openvsp/src/opennurbs' directory and type 'make'. Next, CMake is used to construct the build files. CMake supports out-of-tree builds which keep the source tree free of generated files. Create a build directory to contain the generated files, say 'openvsp/build'. Then, change to the build directory and run CMake - passing a relative path to 'openvsp/src', say 'cmake ../src'. CMake will search for Libxml2, libjpeg, and FLTK in their default installation locations. If CMake does not find the libraries, then edit the '/openvsp/src/CMakeLists.txt' file and modify the 'CMAKE_PREFIX_PATH' list of directories to include the locations of the installed libraries. If Libxml2, libjpeg, or FLTK are not installed on the system and root/administrator access is not available to install the libraries, the libraries can be installed in a non-standard location in the user's directory. In that situation, the 'CMAKE_PREFIX_PATH' list of directories should be modified to include the locations of the installed libraries. When CMake successfully finds all of the libraries, it will write Makefiles to the build directory. When CMake completes, execute 'make' in the build directory to compile OpenVSP. -Windows / Visual Studio All of the supporting libraries and code described above in DEPENDENCIES must be properly installed. The OpenNURBS library must be compiled before OpenVSP can be built. OpenNURBS comes with Visual Studio solution files ('opennurbs.sln' or 'opennurbs_vs2005.sln') which are used to build the library. In Visual Studio, build the 'staticlib' project. The libjpeg source should be unzipped into a convienent location such as 'openvsp/src' creating the 'openvsp/src/jpeg-8c' directory. Edit the 'CMAKE_PREFIX_PATH' list in 'openvsp/src/CMakeLists.txt' to include the paths to the libjpeg library. Libjpeg is configured from the Visual Studio command prompt according to the instructions supplied with it. It can be built at the command prompt or from Visual Studio. The Visual Studio project generally creates 'jpeg.lib' while the nmake Makefile creates 'libjpeg.lib'. The CMake search will look for 'jpeg.lib', so be sure the result is properly named. Building FLTK with project files generated by CMake (rather than those distributed with FLTK) allows better integration with the OpenVSP build system. Follow the FLTK instructions to build FLTK according to the CMake instructions. Once FLTK is built, use the 'INSTALL' project to install FLTK to 'C:\Program Files\FLTK'. If an alternate directory is desired, it can be entered in the CMake GUI when the build files are created. Edit the 'openvsp/vsp/CMakeLists.txt' to ensure that the FLTK install path is included in the 'CMAKE_PREFIX_PATH' list. The Libxml2 source should be unzipped somewhere outside the OpenVSP source tree. Follow the supplied instructions to build Libxml2. Edit the 'openvsp/src/CMakeLists.txt' file and modify the directory list 'CMAKE_PREFIX_PATH' to include the libxml install destination. The 2.7.8 version of the build files contain a small error. Remove the leading '+' characters from lines 74-76 of the 'libxml/win32/Makefile.msvc' file. If you are using Visual Studio 2010 or newer, remove the '/OPT:NOWIN98' from line 97 of the 'libxml/win32/Makefile.msvc' file. The iconv option must be disabled when building Libxml2. This is done by passing 'iconv=no' to the 'cscript' command when you configure Libxml2. Do not use the pre-compiled Libxml2 libraries available online, they include support for iconv and zlib which introduce unneeded dependencies. If you want to link the static library for Libxml2 into OpenVSP, then rename 'lib/libxml2_a.lib' to 'lib/libxml2.lib'. The other files located in the 'lib' directory may be deleted. Next, CMake is used to construct the build files for OpenVSP itself. CMake supports out-of-tree builds which keep the source tree free of generated files. Using the CMake GUI, choose 'openvsp/src/CMakeLists.txt' and select an appropriate build directory. Configure CMake and generate the build files. CMake will search for Libxml2, libjpeg, and FLTK in the paths specified in the 'CMAKE_PREFIX_PATH' list in '/openvsp/src/CMakeLists.txt'. When CMake successfully finds all of the libraries, it will write the project files to the build directory. When CMake completes, open the 'vsp.sln' in Visual Studio. Make sure to select the target (Debug or Release) which maches the target used to build OpenNURBS and other libraries. Once the correct target is chosen, build OpenVSP.