OpenCurves
0.9
|
Open Curves has been built as a multi-platform application by leveraging the Qt framework and CMake.
As such, building Open Curves is generally straightforward, but there may be some issues for some build configurations. The primary platform for Open Curves is Windows 7, but it is also commonly built for MacOS.
Building Open Curves requires the following tools:
Optional build components:
Open Curves supports building against existing Qwt shared libraries, or building Qwt from source. To use an existing Qwt library, that library must be built against the same version of Qt and must be locatable by CMake. A full discussion of how CMake find libraries is beyond the scope of this document. To build Qwt from source:
<open-curves-source-dir>/qwt/src
Where <open-curves-source-dir>
is the Open Curves source directory containing the topmost CMakeLists.txt file.Bison and Flex are only required if making changes to the expression grammar or parser. See below.
Open Curves requires a C++11 compatible compiler. The following compilers are recommended:
Platform | Recommended Compiler |
---|---|
Windows | Visual Studio 2013 or above. |
MacOS | Xcode 6 or higher. Apple Clang 7 or higher. |
Linux | G++ 4.8 or higher, 4.9 or higher preferred. |
Linux builds have only received cursory testing to date.
CMake is required to set up the build projects or make files. CMake is run in a command line shell such as an XTerm window or Windows CMD.
Before running it is advised that:
The most straightforward way to include Qwt is to download the Qwt source from the Qwt downloads page. Unpack the Qwt source and place all source files in the Qwt source directory under the ocurves/qwt/src directory. Note: the qwt code is not intended to be checked in to the Open Curves source repository and the .gitignore file is set up accordingly.
Open the command shell and proceed with the following instructions.
The installation directory can be changed by modifying the CMAKE_INSTALL_PREFIX. This can be done in a number of ways:
cmake -DCMAKE_INSTALL_PREFIX=<install-dir> ..
where <install-dir> is the desired installation directory.ccmake ..
or cmake-gui ..
On Windows, the CMake scripts are set to marshal dependent DLLs to the build directory. The project "ocurves-marshal" is responsible for copying dependencies - such as Qt DLLs - to the build directory. This project does not build by default because it can take some time to complete. It must be build manually for each build configuration. This need only be done when the dependencies change, such as when Qt is upgraded. The install script marshals dependencies independently and does not reply on the "ocurves-marshal" project.
64-bit Windows code can be built by modifying the CMake command line to read:
cmake -G "Visual Studio 14 2015 Win64"
or
cmake -G "Visual Studio 12 2013 Win64"
Note the addition of "Win64". This requires 64-bit Qt and Qwt binaries.
The relative installation paths have not been verified on Linux systems. That is to say, the installation pattern will be non-standard. It is advised that until this is resolved, a non-standard installation path be used, one which isolates Open Curves from system applications.
The source includes an library called "alloctrack", which is designed to aid in memory leak detection. It is disabled by default. Alloctrack is enabled by setting the CMake variable ALLOCTRACK_ENABLE to TRUE using either the command line, ccmake or cmake-gui. Alloctrack is strongly recommended for debug builds, but is not used release builds and should be disabled.
Expression parsing uses Bison and Flex. The generated files are included in the submitted source, so they are optional components. However, they are required when modifying the expression parsing.