Skip to content

Commit d070117

Browse files
committed
Refresh README.md and BUILDING.md
1 parent f9fc184 commit d070117

File tree

2 files changed

+38
-19
lines changed

2 files changed

+38
-19
lines changed

BUILDING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Depending on your case, either option can be preferrable. For instance, Option 2
4141
is more convenient if you're actively hacking on Quaternion and libQMatrixClient
4242
at the same time. On the other hand, packagers should make a separate package
4343
for libQMatrixClient so should use Option 1. 0.0.9.3 is the only version using
44-
Option 1 as default; due to popular demand, Option 2 is used by default (but
45-
with a fallback to Option 1) from 0.0.9.4 beta.
44+
Option 1 as default; due to popular demand, Option 2 is used by default
45+
(with a fallback to Option 1) from 0.0.9.4 beta.
4646

4747
### Pre-requisites
4848
- a Linux, macOS or Windows system (desktop versions tried; mobile Linux/Windows
@@ -82,32 +82,32 @@ dnf install git cmake qt5-qtdeclarative-devel qt5-qtquickcontrols qt5-qtquickcon
8282
```
8383

8484
#### macOS
85-
`brew install qt5` should get you Qt5. You have to point CMake at the Qt5
86-
installation location, with something like:
85+
`brew install qt5` should get you Qt5. If you want to build with QtKeychain,
86+
call `brew install qtkeychain`.
87+
88+
You have to point CMake at the Qt5 installation location, with something like:
8789

8890
```bash
8991
# if using in-tree libqmatrixclient:
90-
cmake .. -DUSE_INTREE_LIBQMC=1 -DUSE_QQUICKWIDGET=ON -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
92+
cmake .. -DUSE_QQUICKWIDGET=ON -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
9193
# or otherwise...
92-
cmake .. -DCMAKE_PREFIX_PATH=../../libqmatrixclient -DUSE_QQUICKWIDGET=ON -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
94+
cmake .. -DCMAKE_PREFIX_PATH=/path/to/libqmatrixclient -DUSE_QQUICKWIDGET=ON -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
9395
```
9496
(read on to find out about `USE_QQUICKWIDGET`).
9597

9698
#### Windows
9799
1. Install CMake. The commands in further sections imply that cmake is in your
98100
PATH - otherwise you have to prepend them with actual paths.
99101
1. Install Qt5, using their official installer.
102+
1. Optionally, get the QtKeychain sources and make them available to CMake
103+
(TODO: elaborate the steps).
100104
1. Make sure CMake knows about Qt and the toolchain - the easiest way is to run
101105
`qtenv2.bat` script that can be found in `C:\Qt\<Qt version>\<toolchain>\bin`
102106
(assuming you installed Qt to `C:\Qt`). The only thing it does is adding
103107
necessary paths to `PATH` - you might not want to run it on system startup
104108
but it's very handy to setup environment before building.
105109
Setting `CMAKE_PREFIX_PATH`, the same way as for macOS (see above), also helps.
106110

107-
Be prepared that a VS 64-bit build won't give you a working Quaternion -
108-
the last time checked Quaternion ran but could not get anything from the network.
109-
PRs are welcome. MinGW-based 64-bit builds (with Qt 5.12) run fine.
110-
111111
### Build
112112
In the root directory of the project sources:
113113
```bash

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,26 @@ brew cask install quaternion
5959
```
6060

6161
## Running
62-
Just start the executable in your most preferred way - either from build directory or from the installed location.
62+
Just start the executable in your most preferred way - either from the build
63+
directory or from the installed location. If you're interested in tweaking
64+
configuration beyond what's available in the UI, read the "Configuration"
65+
section further below.
6366

64-
### Configuration and cache files
67+
## Translation
68+
Quaternion uses [Lokalise.co](https://lokalise.co) for the translation effort.
69+
It's easy to participate:
70+
[join the project at Lokalise.co](https://lokalise.co/public/730769035bbc328c31e863.62506391/),
71+
ask to add your language (either in #qmatrixclient:matrix.org or in
72+
the Lokalise project chat) and start translating! Many languages are still
73+
longing for contributors.
74+
75+
## Configuration
6576
The only non-trivial command-line option available so far is `--locale` - it
6677
allows you to override the locale Quaternion uses (an equivalent of setting
6778
`LC_ALL` variable on UNIX-based systems). As of version 0.0.9.3, Quaternion has
6879
no translations to other languages, so you will hardly notice the difference in
69-
messages; number and date formats will be following the setting though.
80+
messages; number and date formats will be following the setting though. Version
81+
0.0.9.4 gains German, Polish, and Russian translations.
7082

7183
Quaternion stores its configuration in a way standard for Qt applications. It will read and write the configuration in the user-specific location (creating it if non-existent) and will only read the system-wide location with reasonable defaults if the configuration is nowhere to be found.
7284
- Linux:
@@ -146,7 +158,7 @@ Settings not exposed in UI:
146158
the beginning and end of the quote. By default it's `(.+)(?:\n|$)`.
147159

148160
Since version 0.0.9.4, AppImage binaries for Linux and .dmg files for macOS
149-
are compiled with Qt Keychain support. That means that Quaternion will try
161+
are compiled with Qt Keychain support. It means that Quaternion will try
150162
to store your access token(s) in the secure storage configured for your
151163
platform. If the storage or Qt Keychain are not available (Qt Keychain is off
152164
by default on Windows - you have to rebuild Quaternion to enable it),
@@ -168,7 +180,16 @@ Quaternion caches the rooms state and user/room avatars on the file system in a
168180
- macOS: `$HOME/Library/Cache/QMatrixClient/quaternion`
169181
- Windows: `%LOCALAPPDATA%/QMatrixClient/quaternion/cache`
170182

171-
Cache files are safe to delete at any time but Quaternion only looks for them when starting up and overwrites them regularly while running; so it only makes sense to delete cache files when Quaternion is not running. If Quaternion doesn't find cache files at startup it downloads the whole state from Matrix servers, which can take much time (up to a minute and even more, depending on the number of rooms and the number of users in them). Deleting cache files may help with problems such as missing avatars, rooms stuck in a wrong state etc.
183+
Cache files are safe to delete at any time but Quaternion only looks for them
184+
when starting up and overwrites them regularly while running; so it only
185+
makes sense to delete cache files when Quaternion is not running. If Quaternion
186+
doesn't find or cannot fully load cache files at startup it downloads
187+
the whole state from Matrix servers. It tries to optimise this process by
188+
lazy-loading if the server supports it; in an unlucky case when the server
189+
cannot do lazy-loading, initial sync can take much time (up to a minute and
190+
even more, depending on the number of rooms and the number of users in them).
191+
Deleting cache files may help with problems such as missing avatars,
192+
rooms stuck in a wrong state etc.
172193

173194
## Troubleshooting
174195

@@ -201,15 +222,13 @@ Especially on Windows, if Quaternion starts up but upon an attempt to connect re
201222
If you have troubles with dynamic libraries on Windows, [the Dependencies Walker tool aka depends.exe](http://www.dependencywalker.com/) helps a lot in navigating the DLL hell - especially when you have a mixed 32/64-bit environment or have different versions of the same library scattered around. OpenSSL, in particular, is notoriously often dragged along by all kinds of software; and you may have other copies of Qt around which you didn't even know about - e.g., with CMake GUI.
202223

203224
#### Logging
204-
If you run Quaternion from a console on Windows, you should set `QT_LOGGING_TO_CONSOLE=1` in order for the debug output be redirected to the console.
225+
If you run Quaternion from a console on Windows and want to see log messages,
226+
set `QT_LOGGING_TO_CONSOLE=1` so that the output is redirected to the console.
205227

206228
When chasing bugs and investigating crashes, it helps to increase the debug level. Thanks to [@eang:matrix.org](https://matrix.to/#/@eang:matrix.org]), libqmatrixclient uses Qt logging categories - the "Troubleshooting" section of the library's `README.md` elaborates on how to setup logging. Note that Quaternion itself doesn't use Qt logging categories yet, only the library does.
207229

208230
You may also want to set `QT_MESSAGE_PATTERN` to make logs slightly more informative (see https://doc.qt.io/qt-5/qtglobal.html#qSetMessagePattern for the format description). My (@kitsune's) `QT_MESSAGE_PATTERN` looks as follows:
209231
`%{time h:mm:ss.zzz}|%{category}|%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}|%{message}` (the scary `%{if}`s are just encoding the logging level into its initial letter).
210232

211-
## Translation
212-
Quaternion uses [Lokalise.co](https://lokalise.co) for the translation effort. It's easy to participate: [join the project at Lokalise.co](https://lokalise.co/public/730769035bbc328c31e863.62506391/), ask to add your language (either in #qmatrixclient:matrix.org or in the Lokalise project chat) and start translating!
213-
214233
## Screenshot
215234
![Screenshot](quaternion.png)

0 commit comments

Comments
 (0)