Commit Graph

9787 Commits

Author SHA1 Message Date
Robert Adam
c2b42aecb4 CI: Use --output-on-failure flag for ctest
This flag makes sure that the verbose output of running the test cases
is not shown, unless the test fails. In that case the full output is
displayed (for that test case).
2022-02-07 20:13:03 +01:00
Robert Adam
2480e1342e TEST(client): Settings JSON serialization 2022-02-07 20:10:23 +01:00
Robert Adam
900378756c BUILD(cmake): Use object-library for client-sources
Previously all source files were added to a single executable file
(library on Windows). This makes reusing the source files (e.g. linking
them to test cases) close to impossible.

Therefore, this commit changes this by compiling all source files into
an object library that can be used for the aforementioned
executable/library but also be reused (e.g. in tests).
2022-02-07 20:07:58 +01:00
Robert Adam
20f47f1bbf FEAT(client): Immediately save settings
Previously settings were only saved upon Mumble's exit. This commit
makes sure that the settings are also saved to file every time, the user
accepts the settings window. That way settings are guaranteed to survive
potential crashes or other hard-exits of Mumble (e.g. Ctrl+C, Task
manager, etc.).
2022-02-07 20:05:35 +01:00
Robert Adam
d0628628d3 REFAC(client): Don't delete shortcuts on save
The Database::setShortcut function is used to save server-specific
shortcuts to the DB. However, at the same time it also deletes these
shortcuts from the passed list. This is a very unintuitive side-effect
of this function that also prevents saving shortcuts intermediately
instead of only upon disconnecting from a server (at which point we
indeed want to remove server-specific shortcuts).

Therefore, this commit removes this side-effect and instead explicitly
removes these shortcuts on disconnecting from a server.
2022-02-07 20:03:03 +01:00
Robert Adam
fe9f48331b FEAT(client): Prompt to load backup settings after crash
We save a flag into our settings that indicates whether Mumble has quit
normally at the time the settings were saved. If upon loading, we don't
find this flag set, we have to assume that this may be because Mumble
has crashed the last time. Since the crash may be caused by changed
settings, we offer the user the possibility to load the backup settings
instead.
2022-02-07 20:00:43 +01:00
Robert Adam
2002e6d668 CHANGE(client): Use JSON file for storing settings
Previously we used different formats on different platforms (registry on
Windows, plists on macOS, ini files on Linux). This commit makes sure
that the same format is used on all platforms, regardless of the used
OS.

In this process a few unneeded settings have been removed and the
settings migration path has been tidied up as well (the code from
main.cpp was moved to Settings.cpp and the original uiUpdateCounter
variable was completely removed and replaced with logic inside the
routines handling the JSON (de)serialization of settings.

The old settings should be overtaken without issues and converted into
the new format on-the-fly without the user taking any notice of this.
From that on, the JSON settings file will be used instead.

Fixes #1940
2022-02-07 20:00:41 +01:00
Robert Adam
516d9418e5
Merge PR #5521: FIX(installer): Re-add URL protocol registration registry keys on install
In the installer refactor (88e1786) these registry keys were removed, so new installs did not register a URL protocol and users weren't able to use mumble:// links.
This is a direct translation of Files.wxs to equivalent WixSharp code.

Closes #5473
2022-01-27 09:29:54 +01:00
Mitchell Skaggs
55be4a6450
FIX(installer): Re-add URL protocol registration registry keys on install
In the installer refactor (88e1786849) these registry keys were removed, so new installs did not register a URL protocol and users weren't able to use `mumble://` links.
This is a translation of the registry values from `Files.wxs` to equivalent WixSharp code.

Closes #5473
2022-01-26 14:29:03 -06:00
Robert Adam
0e204e1d61
Merge PR #5438: FEAT(client): Industry standard for hold time
As request in #2453, this commit implements the industry standard
for microphone hold time for voice activation detection. The calculation
that yields hold time (s) from the iVoiceHold setting is described and
comments are added to describe the function of related fields.

Implements #2453.
2022-01-25 17:22:16 +01:00
Robert Adam
d55bb99ce1
Merge PR #5458: MAINT: Remove AUTHORS & CHANGES files 2022-01-24 08:14:56 +01:00
Robert Adam
1b8f5db332
Merge PR #5500: DOCS: General intro to Mumble's source code 2022-01-23 20:08:53 +01:00
Robert Adam
25dfe2236a
Merge PR #5513: MAINT: Update copyright notice to 2022 2022-01-23 15:25:09 +01:00
Robert Adam
5a93c1d5ec
Merge PR #5504: MAINT(client): Remove SBCELT leftovers
This is dead code since c5644c7.
2022-01-23 15:24:06 +01:00
Robert Adam
6571d0cb03
Merge PR #5503: BUILD(client): CELT: Require version 0.7.x when using the system library
The bundled version is 0.7.0 and versions >0.7.x are NOT supported.

At least on OpenBSD (only packaging 0.11.x), the built would fail.
Yield and error at configure time with this fix.

CMake's find_package() function accepts an optional version argument
but Mumble's find_pkg() wrapper does not (treating it as package), so
roll our own check/error:

-- celt found | Version: 0.11.1
CMake Error at src/mumble/CMakeLists.txt:677 (message):
  CELT 0.7.x is required, found 0.11.1!

Relates to #4476.
2022-01-23 15:23:07 +01:00
Robert Adam
f07f48fce9 DOCS: General intro to Mumble's source code 2022-01-23 15:14:03 +01:00
Robert Adam
361e1b02f6
Merge PR #5486: BUILD: Build tests in package builds by default
Encourage OS package maintainers to run tests by packaging=ON implying
tests=ON.

Keep online-tests=OFF by default since it is common practise for
packages to be built in unprivileged environments, e.g. without network.
2022-01-23 14:59:55 +01:00
Klemens Nanni
7a1a908842 MAINT: Update copyright notice to 2022
Varioues files were bumped but not this one.  Spotted by following the
https://www.mumble.info/LICENSE link in another file.
2022-01-23 14:41:25 +03:00
Klemens Nanni
bceec3dbfe MAINT(client): Remove SBCELT leftovers
This is dead code since
```
commit c5644c7d73
Author: Robert Adam <dev@robert-adam.de>
Date:   Thu May 7 08:14:09 2020 +0200

    3rdparty: Removed sbcelt submodule as it is not used and broken
```
2022-01-22 11:36:52 +03:00
Klemens Nanni
22f1fa8752 BUILD(client): CELT: Require version 0.7.x when using the system library
The bundled version is 0.7.0 and versions >0.7.x are NOT supported.

At least on OpenBSD (only packaging 0.11.x), the built would fail.
Yield and error at configure time with this fix.

CMake's `find_package()` function accepts an optional `version` argument
but Mumble's `find_pkg()` wrapper does not (treating it as package), so
roll our own check/error:

```
-- celt found | Version: 0.11.1
CMake Error at src/mumble/CMakeLists.txt:677 (message):
  CELT 0.7.x is required, found 0.11.1!
```

Relates to #4476.
2022-01-22 03:07:20 +03:00
Klemens Nanni
6a621f0a0c BUILD: Build tests in package builds by default
Encourage OS package maintainers to run tests by `packaging=ON` implying
`tests=ON`.

Keep `online-tests=OFF` by default since it is common practise for
packages to be built in unprivileged environments, e.g. without network.
2022-01-21 23:39:00 +03:00
Robert Adam
db3a280585
Merge PR #5487: BUILD(client): Enable XInput2 support on OpenBSD by default 2022-01-21 21:20:54 +01:00
Klemens Nanni
904bae159d BUILD(client): Enable XInput2 support on OpenBSD by default
The library is readily available in OpenBSD's version of X[0].
Follow suit with Linux in enabling.

Noticed by the warning upon startup:

```
-<W>2022-01-21 02:30:40.548 GlobalShortcutX: No XInput support, falling back to polled input. This wastes a lot of CPU resources, so please enable one of the other methods.
+<W>2022-01-21 02:34:00.159 GlobalShortcutX: Using XI2 2.4
```

0: https://xenocara.org/
2022-01-21 22:06:53 +03:00
Robert Adam
e504c9711c
Merge PR #5468: Improve appstream metadata
This changes the appstream id to info.mumble.Mumble, which is correct in regards to the specification.

This mostly upstreams the appstream metadata that was previously used for flatpak.
2022-01-21 19:54:09 +01:00
Robert Adam
27ad2debec
Merge PR #5479: BUILD: Fix -Wunused-function when compiling without rnnoise
The clampFloatSample function is only used when rnnoise support is enabled, when it isn't this the presence of the function (since it is static) causes a -Wunused-function warning which ultimately ends up causing a build error due to -Werror.
2022-01-21 19:02:23 +01:00
Robert Adam
28c3f6f251
Merge PR #5480: BUILD: include poll.h for poll(3) (instead of sys/poll.h)
As per POSIX.1-2008, the correct header to include for poll(3) is
poll.h. Including sys/poll.h instead of poll.h causes the following
warning message on Alpine Linux:

/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>

Due to -Werror, this ultimately causes the build to fail.
2022-01-21 19:01:09 +01:00
Robert Adam
394aec8b1c
Merge PR #5478: BUILD: include libgen.h for files which use basename(3)
As per POSIX, basename(3) is defined in libgen.h. Without including this header file the code presently does not compile (on musl) due to -Werror and a -Wimplicit-function-declaration warning.
2022-01-21 18:59:53 +01:00
Robert Adam
481fb22669
Merge PR #5489: MAINT(github): List OpenBSD as supported OS 2022-01-21 09:50:05 +01:00
Klemens Nanni
0ba01161bf MAINT(github): List OpenBSD as supported OS
Noticed while creating #5488.
2022-01-21 03:35:40 +03:00
Jonah Brüchert
36e6592603
FIX(client): Improve appstream metadata
This changes the appstream id to info.mumble.Mumble, which is correct in regards to the specification.

Fixes #5441
2022-01-19 19:23:28 +01:00
Jameson Wright
5a3f6780c8 FEAT(client): Industry standard for hold time
As request in #2453, this commit implements the industry standard
for microphone hold time for voice activation detection. The calculation
that yields hold time (s) from the iVoiceHold setting is described and
comments are added to describe the function of related fields.

Implements #2453.
2022-01-19 12:25:19 -05:00
Sören Tempel
b47eb5055b BUILD: include libgen.h for files which use basename(3)
As per POSIX, basename(3) is defined in libgen.h. Without including
this header file the code presently does not compile (on musl) due to
`-Werror` and a `-Wimplicit-function-declaration` warning.
2022-01-19 11:28:15 +01:00
Robert Adam
a517b06fb5
Merge PR #5467: DOCS: Updated build instructions to remove duplicated step 2022-01-19 08:16:58 +01:00
Sören Tempel
930aa1a532 BUILD: Fix -Wunused-function when compiling without rnnoise
The clampFloatSample function is only used when rnnoise support is
enabled, when it isn't this the presence of the function (since it is
static) causes a `-Wunused-function` warning which ultimately ends up
causing a build error due to `-Werror`.
2022-01-19 00:32:08 +01:00
Sören Tempel
f6a546b7f6 BUILD: include poll.h for poll(3) (instead of sys/poll.h)
As per POSIX.1-2008, the correct header to include for poll(3) is
poll.h. Including sys/poll.h instead of poll.h causes the following
warning message on Alpine Linux:

	/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
	    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>

Due to `-Werror`, this ultimately causes the build to fail.
2022-01-19 00:19:46 +01:00
Brigzzy
223610b21d DOCS: Updated build instructions to remove duplicated step
There's a duplicated step in the build instructions, which is already covered on line 8. This change removes the unneeded duplicate step.
2022-01-18 13:01:14 -08:00
Robert Adam
1a5dd7c72c
Merge PR #5463: DOCS(build): Clean up leftovers from RELEASE_ID concept 2022-01-18 18:17:48 +01:00
Felix Singer
7e39ae927d DOCS(build): Clean up leftovers from RELEASE_ID concept
The concept of RELEASE_ID was dropped with PR #5401 in commit 6caa808e6.
Thus, drop its leftovers from the documentation.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2022-01-18 17:28:32 +01:00
Robert Adam
e0890d5b04 MAINT: Remove CHANGES file
This file hasn't been updated in ages and is therefore removed.
Consequently the corresponding script is also removed.

The actual changes can be taken from the git commit history or (more
compact) in the changelogs published with out releases.
2022-01-18 12:14:40 +01:00
Robert Adam
1dcf678a68 MAINT: Remove AUTHORS file
This file is not used anymore, since GitHub has a dedicated tab of
listing all contributions. Therefore, we now remove the AUTHORS file in
favor of that.

As a consequence, we also remove the generate-AUTHORS.py script.
2022-01-18 12:12:41 +01:00
Robert Adam
37c33fe01b
Merge PR #5443: FIX(server): Add missing line breaks to --help output 2022-01-18 12:03:36 +01:00
Robert Adam
239be45b8c
Merge PR #5442: BUILD: Use GNUInstallDirs to install resources into share
GNUInstallDirs is already used in cmake/install-paths.cmake. This fixes
arch-independent files ending up in $prefix/share instead of /usr/share.
This is required on multiarch/cross layouts setting the prefix to e.g.
/usr/x86_64-pc-linux-gnu or /usr/i686-pc-linux-gnu.
2022-01-18 08:17:25 +01:00
Felix Singer
00983b8be0 FIX(server): Add missing line breaks to --help output
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2022-01-17 17:05:25 +01:00
Robert Adam
5574cc8e24
Merge PR #5437: MAINT(docker): Set Docker Compose restart policy to 'unless-stopped' 2022-01-17 16:57:30 +01:00
Timo Gurr
d2838e2731 BUILD: Use GNUInstallDirs to install resources into share
GNUInstallDirs is already used in cmake/install-paths.cmake. This fixes
arch-independent files ending up in $prefix/share instead of /usr/share.
This is required on multiarch/cross layouts setting the prefix to e.g.
/usr/x86_64-pc-linux-gnu or /usr/i686-pc-linux-gnu.
2022-01-17 16:29:05 +01:00
Robert Adam
551d4e87f7
Merge PR #5435: DOCS(docker): Document Docker Compose '--build' switch 2022-01-17 15:49:28 +01:00
pataquets
36fba0524c MAINT(docker): Set Docker Compose restart policy to 'unless-stopped'. 2022-01-17 13:41:13 +01:00
pataquets
c05f7194b1 DOCS(docker): Document Docker Compose '--build' switch. 2022-01-17 12:09:29 +01:00
Robert Adam
acda34d928
Merge PR #5431: CI: Update clang-format action 2022-01-17 09:29:32 +01:00
Robert Adam
df89dc1030 CI: Update clang-format action 2022-01-17 08:16:44 +01:00