blob: c7f2265c7f40254461dabd81b05c595075f2ff3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
The Qt Messaging Framework, QMF, consists of a C++ library and daemon
server process that can be used to build email clients, and more
generally software that interacts with email and mail servers.
Building and Compiling
======================
To build the Messaging Framework, ensure Qt5/Qt6 development packages
are installed. Preferably also zlib and libicu. The Qt6 build is done
with cmake and Qt5 with qmake.
For basic buid on Qt6 one can do:
mkdir build
cd build
cmake ..
make
make install
On Qt5:
mkdir build
cd build
qmake .. QMF_INSTALL_ROOT=/usr # or qmake-qt5 depending on the environment
make
make install
Note: On Qt5 the QmfWidgets module, which depends on QtWidgets, will be built by default.
To remove this dependency use the define QMF_NO_WIDGETS, e.g. on qmake run
qmake .. DEFINES+=QMF_NO_WIDGETS
For other qmake options DEFINES+=USE_HTML_PARSER enables HTML preview parsing via QtGui
which might be a good idea.
Note: By default QMF operations on the message store are atomic and durable, so
long as the underlying OS supports durable writes, e.g. on Linux based systems
so long as fsync makes durable writes. Atomic means all of an operation such
as a delete/update/add take effect or none of it does. Durable means once an
operation is reported to have succeeded it will survive permanently even in
the event of a system crash. Ensuring these properties has a considerable
performance cost. To increase performance both durability and atomicity can
be disabled using the define QMF_NO_DURABILITY e.g.: DEFINES+=QMF_NO_DURABILITY
Running Messaging Framework
===========================
After make install has run the messageserver binary should be located in
the bin directory.
For custom paths some environment variables can be set prior to launching
qmf related apps:
PATH=<imagedir/bin>:$PATH
LD_LIBRARY_PATH=<imagedir/lib>:$LD_LIBRARY_PATH
QT_PLUGIN_PATH=<imagedir/lib/qt6/plugins>
Optionally set QMF_DATA to the location where you want the framework data
files stored. If this is not set, the default of $HOME/.local/share/qmf will be used.
Testing the Messaging Framework
===============================
The messaging framework includes a series of unit tests designed to ensure
that it is functioning correctly in an operating environment. Unit tests
are located in the tests top-level directory.
To run the tests execute 'make test' with cmake or 'make check' with qmake.
With qmake building the tests needs to be also enabled with QT_BUILD_PARTS+=tests
on the qmake execution.
Note: some tests alter or remove data from the mailstore they operate against.
It is prudent to use a different value for the QMF_DATA environment variable
Code status
===========
The QtWidgets side hasn't had much attention for years and should be considered
unstable API. Likely any real life usage is better anyway to create their
own widgets and UI.
Qt5 has been used for years. Qt6 less so and might have issues.
Fixes and enhancements are welcome.
At the moment only Linux is really supported with D-Bus as IPC. Other platforms would
need some other mechanism for IPC implemented.
|