2020-03-20 10:13:08 +11:00
|
|
|
# Installation
|
|
|
|
|
|
|
|
Instructions and releases are currently only available for Linux,
|
|
|
|
but compiling on Windows and macOS should be possible with the right tools.
|
|
|
|
|
2020-03-30 17:39:58 +11:00
|
|
|
- [Packages](#packages)
|
2020-03-20 10:13:08 +11:00
|
|
|
- [Linux](#linux)
|
2020-03-27 22:06:38 +11:00
|
|
|
- [Flatpak](#flatpak)
|
2020-11-13 03:56:56 +11:00
|
|
|
- [Alpine Linux / postmarketOS](#alpine-linux--postmarketOS)
|
2022-02-05 20:37:21 +11:00
|
|
|
- [Arch Linux](#arch-linux)
|
2020-03-20 10:13:08 +11:00
|
|
|
- [Manual installation](#manual-installation)
|
|
|
|
- [Environment variables](#environment-variables)
|
|
|
|
- [Package manager dependencies](#package-manager-dependencies)
|
|
|
|
- [Alpine Linux 3.9+ / apk](#alpine-linux-39--apk)
|
|
|
|
- [Arch Linux / pacman & AUR](#arch-linux--pacman--aur)
|
|
|
|
- [Fedora 30+ / dnf](#fedora-30--dnf)
|
2020-03-21 05:11:47 +11:00
|
|
|
- [Gentoo / emerge](#gentoo--emerge)
|
2020-03-20 10:13:08 +11:00
|
|
|
- [Ubuntu 19.04 / apt](#ubuntu-1904--apt)
|
|
|
|
- [Ubuntu 19.10+, Debian bullseye / apt](#ubuntu-1910-debian-bullseye--apt)
|
|
|
|
- [Void Linux / xbps](#void-linux--xbps)
|
|
|
|
- [Installing PyOtherSide manually](#installing-pyotherside-manually)
|
|
|
|
- [Installing libolm manually](#installing-libolm-manually)
|
2022-01-15 11:01:25 +11:00
|
|
|
- [Installing or updating Moment](#installing-or-updating-moment)
|
2020-03-27 22:06:38 +11:00
|
|
|
- [Common issues](#common-issues)
|
|
|
|
- [cffi version mismatch](#cffi-version-mismatch)
|
2020-09-04 02:55:56 +10:00
|
|
|
- [Type XYZ unavailable](#type-xyz-unavailable)
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
|
2020-03-30 17:39:58 +11:00
|
|
|
## Packages
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
### Linux
|
|
|
|
|
2020-03-30 17:39:58 +11:00
|
|
|
For developement, or if none of the package options are satisfying,
|
2020-11-16 02:45:04 +11:00
|
|
|
see [manual installation](#manual-installation).
|
2022-01-30 00:25:11 +11:00
|
|
|
Packages other than the Flatpak are not maintained by the Moment
|
2020-11-16 02:45:04 +11:00
|
|
|
authors, and thus might be outdated.
|
2020-03-27 22:06:38 +11:00
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
#### Flatpak
|
2020-03-27 22:06:38 +11:00
|
|
|
|
2022-01-30 00:25:11 +11:00
|
|
|
Moment is also available as a Flatpak.
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2022-01-30 00:25:11 +11:00
|
|
|
1. Download the Moment Flatpak from
|
2022-01-25 01:24:29 +11:00
|
|
|
[Flathub](https://flathub.org/apps/details/xyz.mx_moment.moment). Alternatively,
|
|
|
|
you can issue the following commands in a terminal:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
flatpak remote-add --if-not-exists \
|
|
|
|
flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
|
|
|
|
|
|
flatpak install flathub xyz.mx_moment.moment
|
|
|
|
|
|
|
|
flatpak run xyz.mx_moment.moment
|
|
|
|
```
|
2020-11-21 23:52:47 +11:00
|
|
|
|
|
|
|
2. If your operating system doesn't already have built-in support for Flatpaks,
|
|
|
|
follow [these instructions](https://flatpak.org/setup/) to install Flatpak
|
|
|
|
support on your system.
|
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
##### Configuration migration
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
Note that automatic migration of data from Mirage is not supported when using
|
|
|
|
Flatpak. If you would like to manually migrate your logins, encryption keys,
|
|
|
|
configuration and themes from Mirage, you can do it like so:
|
2020-03-28 08:29:42 +11:00
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
###### Migration from Mirage's Flatpak
|
2020-03-28 08:29:42 +11:00
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
Issue the following commands:
|
|
|
|
|
|
|
|
$ mkdir -p ~/.var/app/xyz.mx_moment.moment/{config,data}
|
|
|
|
$ cd ~/.var/app
|
|
|
|
$ cp -r io.github.mirukana.mirage/config/mirage/* xyz.mx_moment.moment/config/moment
|
|
|
|
$ cp -r io.github.mirukana.mirage/data/mirage/* xyz.mx_moment.moment/data/moment
|
|
|
|
|
|
|
|
###### Migration from a distribution package
|
|
|
|
|
|
|
|
Issue the following commands:
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
$ mkdir -p ~/.var/app/xyz.mx_moment.moment/{config,data}
|
|
|
|
$ cd ~/.var/app
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
If you are on Debian, replace mirage with mirage-matrix in the following
|
|
|
|
commands:
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2022-01-25 01:24:29 +11:00
|
|
|
$ cp -r ~/.config/mirage/* xyz.mx_moment.moment/config/moment
|
|
|
|
$ cp -r ~/.local/share/mirage/* xyz.mx_moment.moment/data/moment
|
2020-11-21 19:31:26 +11:00
|
|
|
|
2022-02-03 00:06:26 +11:00
|
|
|
#### Alpine Linux / postmarketOS
|
|
|
|
|
|
|
|
If you are on the Edge channel of Alpine Linux or postmarketOS, Moment can be
|
|
|
|
installed right from the testing repositry:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
apk add moment
|
|
|
|
```
|
|
|
|
|
|
|
|
If you are unsure about what Edge is and want to read more about it, you can do
|
|
|
|
so on the [Alpine Wiki](https://wiki.alpinelinux.org/wiki/Edge).
|
|
|
|
|
2022-02-05 20:37:21 +11:00
|
|
|
#### Arch Linux
|
|
|
|
|
|
|
|
AUR packages for the
|
|
|
|
[latest stable release](https://aur.archlinux.org/packages/moment/) and
|
|
|
|
[git `dev` branch](https://aur.archlinux.org/packages/moment-git/) are
|
|
|
|
available.
|
|
|
|
|
|
|
|
Installing the release version with an AUR helper, e.g.
|
|
|
|
[yay](https://github.com/Jguer/yay):
|
|
|
|
|
|
|
|
```sh
|
|
|
|
yay -S moment
|
|
|
|
```
|
|
|
|
|
2020-03-20 10:42:49 +11:00
|
|
|
## Manual Installation
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2020-03-21 05:11:47 +11:00
|
|
|
**Qt 5.12+**, **Python 3.6+** (with **pip** to install packages from the
|
|
|
|
[requirements.txt](requirements.txt)), **PyOtherSide 1.5+** and
|
|
|
|
**libolm 3+** are required.
|
|
|
|
The equivalent `-dev` or `-devel` packages are needed, if your distro
|
|
|
|
splits development headers into their own packages.
|
|
|
|
|
2020-07-17 13:03:43 +10:00
|
|
|
To enable X11-specific features on Linux,
|
|
|
|
**libX11** and **libXScrnSaver** / **libXss** are needed.
|
2020-07-17 09:26:21 +10:00
|
|
|
The requirements can be disabled by adding `CONFIG+=no-x11` to the
|
2022-01-15 11:01:25 +11:00
|
|
|
`qmake moment.pro` command.
|
2020-07-17 09:26:21 +10:00
|
|
|
|
2020-03-21 05:11:47 +11:00
|
|
|
For the Pillow Python package, these dependencies are recommended to support
|
|
|
|
all common image formats:
|
|
|
|
|
|
|
|
- **libjpeg-turbo**
|
|
|
|
- **zlib**
|
|
|
|
- **libtiff**
|
|
|
|
- **libwebp**
|
|
|
|
- **openjpeg2**
|
|
|
|
|
|
|
|
**libmediainfo** is also required for the pymediainfo package.
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2020-03-20 10:42:49 +11:00
|
|
|
### Environment Variables
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
To ensure Qt **5** will be used by default, compile using all CPU cores and
|
|
|
|
optimize the build for your machine:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
export QT_SELECT=5
|
|
|
|
export MAKEFLAGS="-j$(nproc)"
|
|
|
|
export CFLAGS="-march=native -O2 -pipe"
|
|
|
|
```
|
|
|
|
|
2020-03-20 10:42:49 +11:00
|
|
|
### Package Manager Dependencies
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
#### Alpine Linux 3.9+ / apk
|
|
|
|
|
|
|
|
[PyOtherSide](#installing-pyotherside-manually) and
|
|
|
|
[libolm](#installing-libolm-manually) must be manually installed.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo apk add qt5-qtquickcontrols2-dev qt5-qtsvg-dev qt5-qtimageformats \
|
2021-03-01 15:00:04 +11:00
|
|
|
libx11-dev libxscrnsaver-dev alsa-lib-dev \
|
2020-03-20 10:13:08 +11:00
|
|
|
python3-dev py3-setuptools \
|
|
|
|
build-base git cmake \
|
|
|
|
libjpeg-turbo-dev zlib-dev tiff-dev libwebp-dev openjpeg-dev \
|
|
|
|
libmediainfo-dev
|
2020-03-21 05:11:47 +11:00
|
|
|
|
2020-03-20 10:13:08 +11:00
|
|
|
export PATH="/usr/lib/qt5/bin:$PATH"
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Arch Linux / pacman & AUR
|
|
|
|
|
|
|
|
**libolm** is from the AUR, this example uses
|
|
|
|
[yay](https://github.com/Jguer/yay) to install it like other packages.
|
|
|
|
Alternatively, you can just use `pacman` and
|
|
|
|
[install libolm manually](#installing-libolm-manually).
|
|
|
|
|
|
|
|
```sh
|
|
|
|
yay -Syu qt5-base qt5-declarative qt5-quickcontrols2 qt5-svg \
|
2021-03-01 15:00:04 +11:00
|
|
|
qt5-graphicaleffects qt5-imageformats \
|
|
|
|
libx11 libxss alsa-lib \
|
2020-03-20 10:13:08 +11:00
|
|
|
python python-pip \
|
|
|
|
python-pyotherside \
|
|
|
|
libolm \
|
|
|
|
base-devel git cmake \
|
|
|
|
libjpeg-turbo zlib libtiff libwebp openjpeg2 libmediainfo
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Fedora 30+ / dnf
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo dnf groupinstall 'Development Tools'
|
2020-07-01 14:13:54 +10:00
|
|
|
sudo dnf install qt5-devel qt5-qtbase-devel qt5-qtdeclarative-devel \
|
|
|
|
qt5-qtquickcontrols2-devel qt5-qtsvg-devel \
|
|
|
|
qt5-qtgraphicaleffects qt5-qtimageformats \
|
|
|
|
python3-devel python3-pip pyotherside \
|
2021-03-01 15:00:04 +11:00
|
|
|
libX11-devel libXScrnSaver-devel alsa-lib-devel \
|
2020-03-20 10:13:08 +11:00
|
|
|
git cmake \
|
2020-07-01 14:13:54 +10:00
|
|
|
libolm-devel \
|
|
|
|
libjpeg-turbo-devel zlib-devel libtiff-devel libwebp-devel \
|
2020-03-20 10:13:08 +11:00
|
|
|
openjpeg2-devel libmediainfo-devel
|
2020-03-21 05:11:47 +11:00
|
|
|
|
2020-03-20 10:13:08 +11:00
|
|
|
sudo ln -s /usr/bin/qmake-qt5 /usr/bin/qmake
|
|
|
|
```
|
|
|
|
|
2020-03-21 05:11:47 +11:00
|
|
|
#### Gentoo / emerge
|
|
|
|
|
|
|
|
[libolm](#installing-libolm-manually) must be manually installed.
|
|
|
|
|
|
|
|
You might need to prepend the `emerge` command with `USE=bindist`,
|
|
|
|
if `emerge` says so.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo emerge -av qtcore qtdeclarative qtquickcontrols2 \
|
2021-03-01 15:00:04 +11:00
|
|
|
qtsvg qtgraphicaleffects qtimageformats \
|
|
|
|
libX11 libXScrnSaver alsa-lib \
|
2020-03-21 05:11:47 +11:00
|
|
|
dev-python/pip pyotherside \
|
|
|
|
dev-vcs/git cmake \
|
|
|
|
libjpeg-turbo zlib tiff libwebp openjpeg libmediainfo
|
|
|
|
```
|
|
|
|
|
2020-03-20 10:13:08 +11:00
|
|
|
#### Ubuntu 19.04 / apt
|
|
|
|
|
|
|
|
[libolm](#installing-libolm-manually) must be manually installed.
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install qt5-default qt5-qmake qt5-image-formats-plugins \
|
|
|
|
qml-module-qtquick2 qml-module-qtquick-window2 \
|
|
|
|
qml-module-qtquick-layouts qml-module-qtquick-dialogs \
|
|
|
|
qml-module-qt-labs-platform \
|
2020-05-22 10:00:20 +10:00
|
|
|
qml-module-qtquick-shapes \
|
2020-03-20 10:13:08 +11:00
|
|
|
qtdeclarative5-dev \
|
|
|
|
qtquickcontrols2-5-dev \
|
2021-03-01 15:00:04 +11:00
|
|
|
libx11-dev libxss-dev libasound2-dev \
|
2020-03-20 10:13:08 +11:00
|
|
|
python3-dev python3-pip \
|
2021-01-25 12:20:20 +11:00
|
|
|
qml-module-io-thp-pyotherside \
|
2020-03-20 10:13:08 +11:00
|
|
|
build-essential git cmake \
|
|
|
|
libjpeg-turbo8-dev zlib1g-dev libtiff5-dev libwebp-dev \
|
|
|
|
libopenjp2-7-dev libmediainfo-dev
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Ubuntu 19.10+, Debian bullseye / apt
|
|
|
|
|
|
|
|
Follow the steps for [Ubuntu 19.04](#ubuntu-1904--apt), but instead of
|
|
|
|
installing libolm manually:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo apt install libolm-dev
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Void Linux / xbps
|
|
|
|
|
|
|
|
[PyOtherSide](#installing-pyotherside-manually) must be manually installed.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo xbps-install -Su qt5-devel qt5-declarative-devel \
|
|
|
|
qt5-quickcontrols2-devel \
|
|
|
|
qt5-svg-devel qt5-graphicaleffects qt5-imageformats \
|
2021-03-01 15:00:04 +11:00
|
|
|
libx11-devel libXScrnSaver-devel alsa-lib-devel \
|
2020-03-20 10:13:08 +11:00
|
|
|
python3-devel python3-pip \
|
|
|
|
olm-devel \
|
|
|
|
base-devel git cmake \
|
|
|
|
libjpeg-turbo-devel zlib-devel tiff-devel libwebp-devel \
|
|
|
|
libopenjpeg2-devel libmediainfo-devel
|
|
|
|
```
|
|
|
|
|
2020-03-20 10:42:49 +11:00
|
|
|
### Installing PyOtherSide Manually
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
Skip this section if you already installed it from your
|
|
|
|
distro's package manager.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone https://github.com/thp/pyotherside
|
|
|
|
cd pyotherside
|
|
|
|
make clean
|
|
|
|
qmake
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
```
|
|
|
|
|
2020-03-20 10:42:49 +11:00
|
|
|
### Installing libolm Manually
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
Skip this section if you already installed it from your
|
|
|
|
distro's package manager.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone https://gitlab.matrix.org/matrix-org/olm/
|
|
|
|
cd olm
|
|
|
|
cmake . -Bbuild
|
|
|
|
cmake --build build
|
|
|
|
sudo make install
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-01-15 11:01:25 +11:00
|
|
|
### Installing or updating Moment
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2020-05-31 09:37:35 +10:00
|
|
|
After following the above sections instructions depending on your system;
|
|
|
|
clone the repository, initalize the submodules,
|
|
|
|
install the python dependencies, compile and install:
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
```sh
|
2022-01-15 11:01:25 +11:00
|
|
|
git clone https://gitlab.com/mx-moment/moment
|
|
|
|
cd moment
|
2020-05-31 09:37:35 +10:00
|
|
|
|
|
|
|
git pull
|
|
|
|
git submodule update --init submodules/*
|
2020-03-20 10:13:08 +11:00
|
|
|
pip3 install --user -Ur requirements.txt
|
|
|
|
|
2022-01-15 11:01:25 +11:00
|
|
|
qmake moment.pro
|
2020-03-20 10:13:08 +11:00
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
```
|
|
|
|
|
2020-07-17 13:03:43 +10:00
|
|
|
To compile without the X11-specific dependencies and features on Linux,
|
2022-01-15 11:01:25 +11:00
|
|
|
run `qmake moment.pro CONFIG+=no-x11` instead of `qmake moment.pro`.
|
2020-07-17 09:26:21 +10:00
|
|
|
|
2022-01-15 11:01:25 +11:00
|
|
|
If everything went fine, run `moment` to start.
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
|
2020-03-27 22:06:38 +11:00
|
|
|
### Common Issues
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2020-03-27 22:06:38 +11:00
|
|
|
#### cffi version mismatch
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
When installing the python dependencies, if you get a version mismatch error
|
|
|
|
related to `cffi`, try:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
pip3 install --user --upgrade --force-reinstall cffi
|
|
|
|
```
|
|
|
|
|
2020-09-04 02:55:56 +10:00
|
|
|
#### Type XYZ unavailable
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2020-09-04 02:55:56 +10:00
|
|
|
If the application exits without showing any window and you get a terminal
|
|
|
|
message like this:
|
2020-03-20 10:13:08 +11:00
|
|
|
|
2020-09-04 02:55:56 +10:00
|
|
|
file:///.../src/gui/Window.qml:83:5: Type PythonRootBridge unavailable
|
|
|
|
|
|
|
|
then a QML component/type failed to import due to either a missing
|
|
|
|
dependency or a programming error.
|
|
|
|
If the type has `Python` in its name, ensure PyOtherSide is correctly
|
|
|
|
installed. You should see a similar message:
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
Got library name: "/usr/lib/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
|
|
|
|
|
|
|
|
To ensure the correct permissions are set for the PyOtherSide plugin files:
|
|
|
|
|
2020-09-04 02:55:56 +10:00
|
|
|
```sh
|
|
|
|
sudo chmod -R 755 /usr/lib/qt5/qml/io
|
|
|
|
sudo chmod 644 /usr/lib/qt5/qml/io/thp/pyotherside/*
|
|
|
|
sudo chmod 755 /usr/lib/qt5/qml/io/thp/pyotherside/*.so
|
|
|
|
```
|
2020-03-20 10:13:08 +11:00
|
|
|
|
|
|
|
Note that the Qt lib path might be `/usr/lib/qt/` instead of `/usr/lib/qt5/`,
|
|
|
|
depending on the distro.
|