the jamovi source structure contains the following components:
| directory | contents | build command | artifacts |
|---|---|---|---|
| electron/ | the electron app which represents the entry point of the program | npm install |
default_app.asar |
| server/ | the server code written in python and built on top of tornado | python3 setup.py \
build_ext --inplace |
jamovi.server (python module) |
| engine/ | the background processing engine, written in C++ and making use of R | make |
jamovi-engine (an executable) |
| client/ | the html, javascript and css which make up the user interface for jamovi. | npm install |
js, css, html |
| examples/ | the example data sets | (these can be copied verbatim) | |
| platform/ | platform specific files, icons, etc. |
the electron/, server/,
engine/ and client/ subprojects can be built
by navigating into their directories and issuing the build command
listed in the table above.
after building each of these subprojects, the results of the builds are assembled into a final tree for installation. the final jamovi folder structure for ubuntu is as follows:
/usr/lib/jamovi/
├── bin/
| ├── locales/
| | └── ...
| ├── resources/
| | ├── electron.asar
| | └── default_app.asar
| ├── jamovi
| ├── env.conf
| └── ...
└── Resources
├── jamovi
│ ├── client/
| | └── assets/
| | | └── ...
| | └── ...
| ├── examples/
| | └── ...
| └── server/
| └── jamovi/server/
└── modules
├── base
| └── R/
| └── ...
└── jmv/
└── ...
bin/the electron executable is the entry point for jamovi. it represents
a combined web browser interface and nodejs interpreter. in constructing
the bin/ folder, its contents are simply taken from
electron release archives (available from https://electron.atom.io), with three exceptions:
jamovi executableenv.confthe jamovi executable is simply the
electron executable renamed.
the resources/default_app.asar is the default electron
app which electron goes looking for when it starts up. this needs to be
replaced with the default_app.asar produced by the electron
component of jamovi (from the electron/ folder in the
repo).
env.conf contains the path settings and environmental
variables that jamovi requires. variables which end in PATH
or HOME are resolved relative to the env.conf.
on ubuntu, it’s contents are:
[ENV]
R_HOME=/usr/lib/R
R_LIBS=/usr/lib/R/site-library:/usr/lib/R/library
PYTHONPATH=../Resources/jamovi/server
JAMOVI_HOME=..
JAMOVI_MODULES_PATH=../Resources/modules
JAMOVI_EXAMPLES_PATH=../Resources/jamovi/examples
JAMOVI_CLIENT_PATH=../Resources/jamovi/client
JAMOVI_SERVER_CMD=/usr/bin/python3 -u -m jamovi.server 0
Resources/jamovi/clientthis folder contains the following files from the
client/ subproject:
index.htmlmain.jsmain.cssanalysisui.htmlanalysisui.jsanalysisui.cssresultsview.htmlresultsview.jsresultsview.cssassets/*Resources/jamovi/serverthis folder should contain the following files and folders from the
server subproject:
jamovi/server/jamovi/core.*.sojamovi/__init__.pyjamovi/__pycache__note that the PYTHONPATH in env.conf is
Resources/jamovi/server, so the final path of the
jamovi/server/ directory will look a bit silly:
Resources/jamovi/server/jamovi/server
Resources/jamovi/examplesthis is just the contents from the examples/
subfolder