Niget sources as well as binaries for 32-bit Windows systems can be downloaded from its home page at http://nanometrologie.cz/niget. The software is written mainly in C language using GTK+ (version 2) toolkit (http://www.gtk.org) and libraries from Gwyddion data analysis software (http://gwyddion.net). Some tools (Oliver-Pharr ODR, Hertz ODR, and the two slopes method) use orthogonal distance regression (ODR) which includes Fortran code from ODRPACK95 project, available at http://www.netlib.org/toms/869.zip.
There are no distribution packages available, and users are supposed to compile Niget from source.
C compiler (GNU gcc or Intel icc)
(optional) Fortran compiler (GNU gfortran or Intel ifort)
CMake
GNU Make or compatible
pkg-config
GTK2 (and its dependences), including development libraries
(preferable) Gwyddion development libraries (see http://gwyddion.net/download.php for distribution-specific instructions; FFTW3 and GtkGLExt development libraries may be also required as dependences)
If paths to Gwyddion libraries and includes are not found by CMake or provided by user, a recent version of Gwyddion is automatically downloaded and built. Please note that some additional tools (patch) and libraries (e.g. libfftw3) might still be required.
In the Niget source directory, proceed as follows:
mkdir build (out-of-tree builds are preferred with CMake)
cd build
cmake .. (CMake looks for compilers and libraries, and configures the build)
make
This compiles Niget using default configuration with GNU compilers and ODR enabled. Optional configuration parameters can be set by adding -D OPTION=VALUE to the cmake command (cmake -D OPTION1=VALUE1 … -D OPTIONn=VALUEn ..). Presently available options are:
DEBUG – ON (default) / OFF: make debug build
INTEL – ON / OFF (default): compile using Intel compilers (icc and ifort)
FORTRAN – ON (default) / OFF: include ODRPACK95, Oliver-Pharr ODR, Hertz ODR, and Two slopes methods
VERBOSE – ON / OFF (default): increase verbosity for debugging purposes
After running cmake, the options above are stored into CMake’s cache in the build directory, and need not be specified with further CMake runs (or have to be specified explicitly if a change is desired). Note: until the code is sufficiently tested, DEBUG is ON by default, and release build must be triggered manually.
After the software compiles successfully, the niget binary, created in the build directory, can be run.
Niget Windows 32-bit binaries are distributed in a single zip-file, which contains all the required libraries. This is the preferred way for Windows users to start using Niget.
Niget can be compiled natively on Windows platforms. A solution for Microsoft Visual Studio 2015 is provided in msvc2015/indent-toolbox.sln. Since this Visual Studio version does not provide a Fortran compiler, the ODR dependent tools are excluded into a separate project, which can be compiled as a dynamic link library using Intel Fortran compiler. Anyway, due to GTK2 and Gwyddion development libraries being needed for compilation, we discourage the users from compiling from source on Windows.
Microsoft Visual Studio 2015
(Optional) Intel Fortran compiler
GTK2 Windows bundle (http://gtk-win.sourceforge.net/home)
Gwyddion development libraries; see http://gwyddion.net/documentation/user-guide-en/installation-compiling-msvc.html for instructions on compiling Gwyddion on Windows
Compiling using CMake and MinGW suite in MSYS2 environment has also been tested and is currently used to provide the Windows builds of Niget. Unfortunately, no straightforward procedure is available at the moment.