Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
FransMeerhoff authored and FransMeerhoff committed Feb 28, 2018
2 parents 3242143 + 90fa201 commit e62ad50
Show file tree
Hide file tree
Showing 640 changed files with 16,532 additions and 7,403 deletions.
17 changes: 16 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@

JASP Release Notes
==================

Version 0.8.5
-------------

Improvements:
- Network module: new clustering table/plot
- ANOVA : simple effects
- ANOVA : fix for repeated contrast
- Logistic regression: changes to stepwise regression.
- Logistic regression : AIC fior variable selection & removal p-values

Bugfixes:
- Independent sample Bayesian t-test #2196
- Wrong valid percent in frequency table #2202
- Improve ODS Importer #2167


Version 0.8.4
-------------

Expand Down
150 changes: 77 additions & 73 deletions Docs/development/jasp-building-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ JASP requires several dependencies which are documented below.

JASP depends on:

- [Qt (5+)](http://qt-project.org)
- [Qt (5.10 + QtWebEngine)](http://qt-project.org)
- [R](http://cran.r-project.org)
- [boost](http://boost.org)
- [libarchive](http://libarchive.org/)
Expand All @@ -32,29 +32,35 @@ Windows

Building JASP under windows is the most temperamental, and the versions listed here are known to work; slight variations on these numbers probably won't work.

- [Qt 5.2.1 win64 GCC 4.8.2](https://static.jasp-stats.org/development/x64-Qt-5.2.1+QtCreator-3.0.1-(gcc-4.8.2-seh).7z)
- [R 3.3.3 win64](https://static.jasp-stats.org/development/R3.3%20Win%20JASP%200.8.5.zip)
- [R 3.3.3 win64](https://static.jasp-stats.org/development/R3.3%20Win%20JASP%200.8.6.zip)
- [boost 1.64.0](https://static.jasp-stats.org/development/boost_1_64_0.zip)
- [boost 1.64.0 binaries, libarchive binaries](https://static.jasp-stats.org/development/Additional%20Binary%20Deps%20Win64%20for%20JASP%20(2017-06-06).zip)
- [boost 1.64.0 binaries, libarchive binaries](https://static.jasp-stats.org/development/Build-Binaries-Windows-64-qt510.zip)
- [Visual Studio 2017] (https://www.visualstudio.com/downloads/) Download community version

Qt: JASP for windows is built as 64-bit and is built with Mingw-W64. The Qt project does not ship a 64-bit version of Qt based on Mingw-W64, and so we rely on a version from [here](http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/). Once downloaded and unzipped to the desired location, it is necessary to run the `QtSDK-x86_64/qtbinpatcher.exe`, so it knows about it's current location.

dlls: It is necessary to copy the four files libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll and libgomp-1.dll from QtSDK-x86_64/bin into the build directory as well.
Qt: JASP for windows is built as 64-bit and is built with Visual Studio 2017.

The directory structure should be as follows:

[+] jasp-desktop < from github >
[+] boost_1_64_0
[-] build-JASP- ... < build directory, created by QtCreator >
[+] R
- libgcc_s_seh-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- libgomp-1.dll
- libboost_system-mgw48-mt-1_64.a
- libboost_filesystem-mgw48-mt-1_64.a
- libarchive.dll.a
- libarchive.dll
- JASP-R-Interface.dll
- JASP-R-Interface.lib
- archive.dll.lib
- libarchive.dll
- libboost_date_time-vc141-mt-1_64.lib
- libboost_date_time-vc141-mt-gd-1_64.lib
- libboost_filesystem-vc141-mt-1_64.lib
- libboost_filesystem-vc141-mt-gd-1_64.lib
- libboost_system-vc141-mt-1_64.lib
- libboost_system-vc141-mt-gd-1_64.lib
- libeay32.dll
- libgcc_s_seh-1.dll
- libgomp-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- ssleay32.dll


Mac OS X
Expand All @@ -63,73 +69,79 @@ To build JASP on mac you need to clone the JASP repository and download the foll

0. Clone the JASP repository
1. [XCode](https://developer.apple.com/xcode/) Easiest would be via the App Store.
2. [Qt 5.4.0](https://download.qt.io/archive/qt/) Newer version not supported yet.
3. [R 3.3.3](https://static.jasp-stats.org/development/R3.3%20OSX%20JASP%200.8.5.zip) This contains R and the packages
4. [boost 1.64.0](https://static.jasp-stats.org/development/boost_1_64_0.zip)
5. [boost 1.64.0 binaries, libarchive binaries](https://static.jasp-stats.org/development/Additional%20Binary%20Deps%20OSX%20for%20JASP%20(2017-06-06).zip)
2. [Qt 5.10.1 + QtWebEngine](https://download.qt.io/archive/qt/). Tick: MacOS and Qt WebEngine
3. [R 3.3.3](https://static.jasp-stats.org/development/R3.3%20OSX%20JASP%200.8.6.zip) This contains R and the packages. Unzip this file and set it as a framework in the build folder as shown below.
4. [boost 1.64.0](https://static.jasp-stats.org/development/boost_1_64_0.zip). Unzip this file in the JASP folder.
5. [boost 1.64.0 binaries, libarchive binaries](https://static.jasp-stats.org/development/Build-Binaries-OSX-64-qt510.zip). Unzip this file in both release and debug build folders.

The directory structure should be as follows:

[+] JASP
[-] code
[+] jasp-desktop < from github >
[-] build
[-] debug < Build debug directory for QtCreator >
- libboost_system-clang-mt-1_64.a
- libboost_filesystem-clang-mt-1_64.a
- libarchive.a
- libz.a
[-] release < Build release directory for QtCreator >
- libboost_system-clang-mt-1_64.a
- libboost_filesystem-clang-mt-1_64.a
- libarchive.a
- libz.a
[+] boost_1_64_0
[-] Frameworks
[-] R.framework
[-] Versions
[+] 3.3

[-] jasp-desktop < from github >
[-] buildDebug510 < Build debug directory for QtCreator >
- libboost_system-clang-mt-1_64.a
- libboost_filesystem-clang-mt-1_64.a
- libarchive.a
- libz.a
- libJASP-R-Interface.1.0.0.dylib
- libJASP-R-Interface.dylib
[-] buildRelease510 < Build release directory for QtCreator >
- libboost_system-clang-mt-1_64.a
- libboost_filesystem-clang-mt-1_64.a
- libarchive.a
- libz.a
- libJASP-R-Interface.1.0.0.dylib
- libJASP-R-Interface.dylib
[-] boost_1_64_0
[-] Frameworks
[-] R.framework
[-] Versions
[+] 3.3

0. **Clone** the JASP repository into a folder of your choice. Our default choice is *~/desktop/JASP/* and cloning results in the creating of *~/desktop/JASP/jasp-desktop*.
1. **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.
2. **Qt**: building JASP on OS X is pretty robust, but for the moment we're restricted to QT 5.4. We will upgrade to a newer version soon. **Note**: *For xcode 8 and above, to accept the license, Qt (v5.4) tries to find xcrun instead of xcodebuild, and the following has to be done,*
- Open the file: *Qt_install_folder/5.4/clang_64/mkspecs/features/mac/default_pre.prf*
- Replace the line *isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))* by *isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))*
3. **R 3.3.3**: Create the folder */Frameworks* in the directory of your choice in step 0. For our default choice this results in *~/desktop/JASP/Frameworks/* first and subsequently *~/desktop/JASP/Frameworks/R.frameworks*.
4. **boost 1.64.0**: Unzip these files in the JASP folder. In our case, this results in *~/desktop/JASP/boost_1_64_0/*
5. **boost 1.64.0 binaries, libarchive binaries**: We're almost there! Fire up QT and try to build JASP. QT will automatically create a */build-JASP-....* directory. In our case this leads to *~/desktop/JASP/build-JASP-Desktop_Qt_5_5_1_clang_64bit-Debug*. QT will stop building JASP as it requires additional files. Thus, unzip the **boost 1.64.0 binaries, libarchive binaries** files and put them into the */build-JASP-....* directory that Qt created.
6. Build JASP again from Qt. The first build might take a while, but after the first time it'll go very smoothly.
2. **Qt**: Install Qt5.10.1 with MacOS and Qt WebEngine.

![Image of Qt Installer](https://static.jasp-stats.org/images/jasp2.InstallQt.png)

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

![Image of Qt Configuration](https://static.jasp-stats.org/images/jasp2a.ConfigureQt.png)

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](https://static.jasp-stats.org/images/jasp2b.1.ConfigureProjectDebug.png)

and like:

![Image of Project release](https://static.jasp-stats.org/images/jasp2b.2.ConfigureProjectRelease.png)

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

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

![Image of folder structure](https://static.jasp-stats.org/images/jasp5.FolderStructure.png)

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
```

Jonathon maintains a number of packages for JASP and it's development under linux in his PPA [here](https://launchpad.net/~jonathon-love/+archive/ubuntu/jasp)

To build JASP under Ubuntu, debian, and derivatives, you will need:

- qt5-default
- qt5-qmake
- libqt5widgets5
- libqt5webkit5-dev
- libqt5svg5-dev
- libboost-dev
- libboost-filesystem-dev
- libboost-system-dev
- r-base-core
- r-cran-rcpp
- r-cran-rinside *
- libarchive-dev
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-qtwebkit-devel
- qt5-qtwebengine-devel (probably)
- qt5-qtwebchannel-devel (probably)
- boost-devel
- libarchive-devel

Expand All @@ -148,17 +160,9 @@ sudo ln -s /usr/lib64/R/ /usr/lib/R
### Runtime
#### Ubuntu (and alike)
In order to run, you will need (Ubuntu and alike):

- r-cran-bayesfactor *
- r-cran-lme4
- r-cran-afex *
- r-cran-car *
- r-cran-effects *
- r-cran-logspline *
- r-cran-hypergeo *
- r-cran-rjson

Those marked with asterisks are available from Jonathon's PPA.
```
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:
Expand Down
64 changes: 39 additions & 25 deletions JASP-Common/JASP-Common.pro
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@

QT -= gui
QT += webkitwidgets
QT -= core

DESTDIR = ..
TARGET = JASP-Common
TEMPLATE = lib
CONFIG += staticlib

windows:CONFIG += c++11
linux:CONFIG += c++11
macx:CONFIG += c++11
CONFIG += c++11

macx:INCLUDEPATH += ../../boost_1_64_0
windows:INCLUDEPATH += ../../boost_1_64_0


windows:LIBS += -lole32 -loleaut32 -larchive.dll


QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter -Wno-unused-local-typedef
macx:QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter -Wno-unused-local-typedef
macx:QMAKE_CXXFLAGS += -Wno-c++11-extensions
QMAKE_CXXFLAGS += -Wno-deprecated-declarations
macx:QMAKE_CXXFLAGS += -Wno-deprecated-declarations
macx:QMAKE_CXXFLAGS += -Wno-c++11-long-long
macx:QMAKE_CXXFLAGS += -Wno-c++11-extra-semi
macx:QMAKE_CXXFLAGS += -stdlib=libc++
macx:QMAKE_CXXFLAGS += -DBOOST_INTERPROCESS_SHARED_DIR_FUNC

windows:QMAKE_CXXFLAGS += -DBOOST_USE_WINDOWS_H
windows:QMAKE_CXXFLAGS += -DBOOST_USE_WINDOWS_H -DNOMINMAX -D__WIN32__ -DBOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED

INCLUDEPATH += $$PWD/

SOURCES += \
analysis.cpp \
Expand All @@ -45,14 +43,9 @@ SOURCES += \
ipcchannel.cpp \
label.cpp \
labels.cpp \
lib_json/json_internalarray.inl \
lib_json/json_internalmap.inl \
lib_json/json_reader.cpp \
lib_json/json_value.cpp \
lib_json/json_valueiterator.inl \
lib_json/json_writer.cpp \
options/option.cpp \
options/optionboolean.cpp \
options/optiondoublearray.cpp \
options/optioninteger.cpp \
options/optionintegerarray.cpp \
options/optionlist.cpp \
Expand Down Expand Up @@ -101,19 +94,11 @@ HEADERS += \
ipcchannel.h \
label.h \
labels.h \
lib_json/autolink.h \
lib_json/config.h \
lib_json/features.h \
lib_json/forwards.h \
lib_json/json_batchallocator.h \
lib_json/json.h \
lib_json/reader.h \
lib_json/value.h \
lib_json/writer.h \
libzip/archive.h \
libzip/archive_entry.h \
options/option.h \
options/optionboolean.h \
options/optiondoublearray.h \
options/optioni.h \
options/optioninteger.h \
options/optionintegerarray.h \
Expand All @@ -132,5 +117,34 @@ HEADERS += \
tempfiles.h \
utils.h \
version.h \
options/optionvariablei.h
options/optionvariablei.h \
jsonredirect.h

#exists(/app/lib/*) should only be true when building flatpak
macx | windows | exists(/app/lib/*) {
DEFINES += JASP_LIBJSON_STATIC

SOURCES += \
lib_json/json_internalarray.inl \
lib_json/json_internalmap.inl \
lib_json/json_reader.cpp \
lib_json/json_value.cpp \
lib_json/json_valueiterator.inl \
lib_json/json_writer.cpp

HEADERS += \
lib_json/autolink.h \
lib_json/config.h \
lib_json/features.h \
lib_json/forwards.h \
lib_json/json_batchallocator.h \
lib_json/json.h \
lib_json/reader.h \
lib_json/value.h \
lib_json/writer.h
} else {
linux: LIBS += -ljsoncpp
CONFIG(debug, debug|release) { DEFINES+=JASP_DEBUG }
}


16 changes: 12 additions & 4 deletions JASP-Common/analysis.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (C) 2013-2017 University of Amsterdam
// Copyright (C) 2013-2018 University of Amsterdam
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -87,11 +87,15 @@ void Analysis::setImageResults(Json::Value results)
imageSaved(this);
}

void Analysis::setUserData(Json::Value userData, bool silient)
void Analysis::setImageEdited(Json::Value results)
{
_imgResults = results;
imageEdited(this);
}

void Analysis::setUserData(Json::Value userData)
{
_userData = userData;
if ( ! silient)
userDataLoaded(this);
}

const Json::Value &Analysis::results() const
Expand Down Expand Up @@ -125,6 +129,8 @@ Analysis::Status Analysis::parseStatus(string name)
return Analysis::Aborted;
else if (name == "SaveImg")
return Analysis::SaveImg;
else if (name == "EditImg")
return Analysis::SaveImg;
else if (name == "exception")
return Analysis::Exception;
else
Expand Down Expand Up @@ -168,6 +174,8 @@ Json::Value Analysis::asJSON() const
break;
case Analysis::SaveImg:
status = "SaveImg";
case Analysis::EditImg:
status = "EditImg";
case Analysis::Exception:
status = "exception";
break;
Expand Down
Loading

0 comments on commit e62ad50

Please sign in to comment.