Skip to content

Guide to Building JASP

akash raj edited this page Dec 24, 2018 · 2 revisions

The easiest way to build JASP is to use Qt Creator. After cloning the jasp-desktop project, open the JASP.pro file in the jasp-desktop directory, in Qt Creator. This project contains two runnable sub-projects, JASP-Desktop and JASP-Engine. In order to run JASP, JASP-Desktop is the correct project to run.

For those unfamiliar with using Qt Creator for development, there is some excellent documentation available here.

Alternatively, those that are more comfortable using command line tools can use QMake, the manual for which is available here. QMake projects (like JASP) are typically built in two steps; first QMake is called, which generates a Makefile for Make, and then Make is called with this generated Makefile.

We recommend building JASP in a separate directory to it's source directory. This can be achieved by calling QMake in a separate directory to the source, for example we might create a separate directory beside the jasp-desktop directory (perhaps called jasp-build), and then from this directory call:

qmake ../jasp-desktop/JASP.pro
make # -j8 # <- to gain a considerable speedup on a typical quadcore system

This generates the Makefile in the jasp-build directory, and all resulting object files and executables will be output to this directory.

JASP requires several dependencies which are documented below.

JASP depends on:

Required files on Windows and Mac OS X

To be able to build JASP the listed dependencies are required and can be easily installed on your system through jasp-required-files Simply clone the git repository next to your jasp-desktop folder as follows:

[+] jasp-desktop < from github >
[+] jasp-required-files < from github >

Windows

Building JASP under windows is the most temperamental but should pose no large problems. After cloning the jasp-desktop and jasp-required-files repositories you must however install the following software:

Besides this one needs to make a new kit in Qt Creator to be able to build JASP-R-Interface. To Do: Write a nice guide here that explains how to do it!

Mac OS X

After cloning the jasp-desktop and jasp-required-files repositories you must however install the following software:

  1. Clone the JASP repository
  2. XCode Qt on OS X relies on XCode to function, you can install this through the App Store. It's easiest if you install this, run it, accept the license agreement, and then close it down before installing Qt.

Image of Qt Installer

2.a. Configure Qt5.11.3: Left top menu: Qt Creator - Preference. Left menu: "Build & Run", tab: "Kits". Auto-detect should give "Desktop Qt 5.11.3 clang 64bit". Click on this. Choose the compiler Clang (x86 64bit in /usr/bin) for both C and C++.

Image of Qt Configuration

2.b. Configure project: Click "Projects" in the left ribbon and provide the "debug build" and "release build" folders with the correct compilers. This should look like:

Image of Project debug

and like:

Image of Project release

In both case, I've added the flag "-j4" to make use of all my four cores on my mac.

  1. In the end, your folder should be structured as follows:

Image of folder structure

where the blue files are the binaries that are added manually.

Linux

Build

Ubuntu (and alike)

To build JASP under Ubuntu (17.10+), debian, and derivatives, you will need:

sudo apt-get install libboost-dev r-base-core r-cran-rcpp r-cran-rinside libqt5widgets5 qtwebengine5-dev libqt5webchannel5-dev libqt5svg5-dev qt5-qmake libarchive-dev libboost-filesystem-dev libboost-system-dev libjsoncpp-dev qt5-default qtcreator

Then you start qtcreator and open JASP.pro, run qmake and build all. After that you should be able to run JASP.

Fedora

Under Fedora, you need these packages:

  • qt-devel
  • qt5-qtwebengine-devel (probably)
  • qt5-qtwebchannel-devel (probably)
  • boost-devel
  • libarchive-devel

And (under fedora only), in R (started as root so packages are installed systemwide), you need to install:

install.packages(c("Rcpp","RInside"))

Finally, under Fedora only, you need to create a symlink so that R is found:

sudo ln -s /usr/lib64/R/ /usr/lib/R

Runtime

Ubuntu (and alike)

In order to run, you will need (Ubuntu and alike):

sudo apt-get install libjsoncpp1 r-base-core r-cran-rcpp r-cran-rinside r-cran-bayesfactor r-cran-lme4 r-cran-afex r-cran-car r-cran-effects r-cran-logspline r-cran-lsmeans r-cran-plotrix r-cran-rjson r-cran-vcd r-cran-vcdextra r-cran-ggplot2 r-cran-hypergeo libqt5webenginewidgets5 libqt5webengine5 libqt5webenginecore5 libqt5svg5 openssl

Fedora

It works under Fedora, if you install these R packages manually in R:

install.packages(c("BayesFactor","lme4","afex","car","effects","logspline","hypergeo","rjson"))