Commit Graph

8462 Commits

Author SHA1 Message Date
Robert Adam
40090d297f MAINT: Make use of cmake configure for version
Instead of having to change the version number and the build year in all
those files manually, we let cmake do the work by replacing the
respective values in templates.
2020-09-02 18:30:33 +02:00
Robert Adam
8bdf32d480
Merge pull request #4448: BUILD(qmake): Remove
This commit removes all qmake-related build-files from the system. We
have now migrated to cmake and are no longer maintaining qmake anyways
and therefore there is no reason to keep it.

Removing it also clearly states to any potential user/programmer that
this project is no longer intended to be compiled with qmake.

Given that the .pri files no longer exist, the mumble-version.py script
had to be adapted to read the version from the CMakeLists.txt file
instead.

Furthermore a few of the submodules support cmake natively and therefore
we no longer need the src/buid-directory approach in order to build
them. The respective build dirs have been removed and the src-dirs have
been renamed.
2020-09-02 16:38:28 +02:00
Robert Adam
34c602c85b BUILD(qmake): Remove
This commit removes all qmake-related build-files from the system. We
have now migrated to cmake and are no longer maintaining qmake anyways
and therefore there is no reason to keep it.

Removing it also clearly states to any potential user/programmer that
this project is no longer intended to be compiled with qmake.

Given that the .pri files no longer exist, the mumble-version.py script
had to be adapted to read the version from the CMakeLists.txt file
instead.

Furthermore a few of the submodules support cmake natively and therefore
we no longer need the src/buid-directory approach in order to build
them. The respective build dirs have been removed and the src-dirs have
been renamed.
2020-09-02 08:29:45 +02:00
Robert Adam
756a35e334 MAINT(mumble-version.py): Fix indentation 2020-09-02 08:11:28 +02:00
Robert Adam
46fd81c080
BUILD(cmake): Fix typo 2020-09-02 07:48:19 +02:00
Davide Beatrici
03a48e0530
Merge PR #4449: FIX(client): Make PulseAudio always sample at 48000 Hz 2020-09-02 00:55:14 +02:00
Davide Beatrici
a797042237
Merge PR #4450: FIX(client): Initialize variable before use 2020-09-02 00:49:50 +02:00
TredwellGit
d007f45a08 FIX(client): Initialize variable before use
'ALSA_ERRCHECK' is an unsafe function-like macro that should be replaced with a function. 'avail' is used uninitialized whenever 'bOk' is false which is undefined behavior.
2020-09-01 16:49:18 -04:00
TredwellGit
aa3d708f53 FIX(client): Make PulseAudio always sample at 48000 Hz
A prominent feature of PulseAudio is automatic sample rate management. Mumble always wants 48000 Hz sample rate yet will often tell PulseAudio to sample at a different rate, such as 44100 Hz, and then resample internally reducing audio quality and wasting CPU time.
2020-09-01 14:33:36 -04:00
Robert Adam
0ebe6c1e51
Merge pull request #4447: BUILD: More CMake usability enhancements
Followup on #4446
2020-09-01 12:43:34 +02:00
Robert Adam
968f320322 BUILD(cmake): Print out build type
In addition to Mumble's version and the target architecture, also print
the used build type.
2020-09-01 11:05:15 +02:00
Robert Adam
385341937c BUILD(cmake): Use GENERATOR_IS_MULTI_CONFIG
Instead of checking for the variable CMAKE_CONFIGURATION_TYPES, we now
use the dedicated property GENERATOR_IS_MULTI_CONFIG in order to
determine whether the used generator is a multi-config generator and
therefore does not respect the CMAKE_BUILD_TYPE variable.
2020-09-01 11:05:00 +02:00
Robert Adam
918f8c0d62 BUILD(cmake): Fix architecture output
The previous output used x86 and 32bit as synonyms (as well as x64 and
64bit) which is incorrect.
2020-09-01 11:00:35 +02:00
Robert Adam
898d339819
Merge pull request #4446: BUILD: CMake usability enhancements 2020-08-31 18:26:49 +02:00
Robert Adam
fda302af98 BUILD(cmake): Added debug-dependency-search option
If the user uses -Ddebug-dependency-search=OFF, then the find_pkg
function will not perform its searches using the QUIET flag causing a
lot of (valuable) information to be printed to the screen.
2020-08-31 17:30:53 +02:00
Robert Adam
9697863c1f BUILD(cmake): Start cmake output with info header
Instead of only printing the Mumble version that is being built, the
architecture that cmake is currently configuring for is displayed as
well.
In order to make this information more visible, they are surrounded by a
row of hashtags.

This change should make it more obvious to users if they happen to build
the wrong version/architecture (as can easily happen on Windows).
2020-08-31 17:30:53 +02:00
Robert Adam
e97b2293b3 MAINT: Added BUILD type to commit guidelines 2020-08-31 17:30:53 +02:00
Robert Adam
9768626971
Merge pull request #4441: FIX(cmake): Set QT_RESTRICTED_CAST_FROM_ASCII
With the old qmake buildsystem we used to set QT_NO_CAST_FROM_ASCII (for
the Mumble client) in order to avoid problems with character encodings
in our Strings. This was not done in the new cmake system yet.

Instead of the aforementioned macro, this commit sets
QT_RESTRICTED_CAST_FROM_ASCII instead in order to be able to
automatically convert direct String literals to QString as these usually
don't contain any problematic characters (non-ASCII) in the first place.
And this allows to e.g. compare a QString against a String literal or do
something like
QString myString = "This is a test";
which we know to be unproblematic.

Note however that (quote from Qt's docs)
"Using this macro together with source strings outside the 7-bit range,
non-literals, or literals with embedded NUL characters is undefined."
2020-08-31 11:18:23 +02:00
Robert Adam
ced1fdd37c FIX(cmake): Set QT_RESTRICTED_CAST_FROM_ASCII
With the old qmake buildsystem we used to set QT_NO_CAST_FROM_ASCII (for
the Mumble client) in order to avoid problems with character encodings
in our Strings. This was not done in the new cmake system yet.

Instead of the aforementioned macro, this commit sets (for all targets)
QT_RESTRICTED_CAST_FROM_ASCII instead in order to be able to
automatically convert direct String literals to QString as these usually
don't contain any problematic characters (non-ASCII) in the first place.
And this allows to e.g. compare a QString against a String literal or do
something like
QString myString = "This is a test";
which we know to be unproblematic.

Note however that (quote from Qt's docs)
"Using this macro together with source strings outside the 7-bit range,
non-literals, or literals with embedded NUL characters is undefined."
2020-08-31 09:59:05 +02:00
Robert Adam
ade9e9e46b
Merge pull request #4439: FEAT(client, mainwindow): Show volume adjustments
This feature optionally allows users to display the set volume
adjustments next to the user's/listener's name.
It will only be shown if it is not equal to 0 dB (aka: it is actually
having an effect).

By default this option is enabled since it is only visible if volume
adjustments are set up anyways.
2020-08-29 19:35:40 +02:00
Robert Adam
7c1f1c9d77 Translation update
Updating 'mumble_en.ts'...
    Found 1893 source text(s) (2 new and 1891 already existing)
2020-08-29 16:51:29 +02:00
Robert Adam
72deaf9401 FEAT(client, mainwindow): Show volume adjustments
This feature optionally allows users to display the set volume
adjustments next to the user's/listener's name.
It will only be shown if it is not equal to 0 dB (aka: it is actually
having an effect).

By default this option is enabled since it is only visible if volume
adjustments are set up anyways.
2020-08-29 16:51:29 +02:00
Robert Adam
6a28394a0d
Merge pull request #4443 from Krzmbrzl/ci-showExtractionProgressbar
CI: Show progress for decompressing
As tar doesn't support a proper progress bar this commit adds a helper
script that'll print a rough progress.
2020-08-28 18:36:47 +02:00
Robert Adam
e1c8f05afd CI: Show progress for decompressing
As tar doesn't support a proper progress bar this commit adds a helper
script that'll print a rough progress.
2020-08-28 17:39:45 +02:00
Robert Adam
f04f3c6317
Merge pull request #4442: CI(macOS): Use axel instead of wget
Axel is a CLI download utility that'll open multiple concurrent streams
and thereby increasing the overall download speed.
Ref.: https://www.linuxjournal.com/content/speed-your-downloads-axel

Using axel to download the environment seems to be up to 5x faster than
using wget.
2020-08-28 14:46:39 +02:00
Robert Adam
eed8c44a24 CI(macOS): Use axel instead of wget
Axel is a CLI download utility that'll open multiple concurrent streams
and thereby increasing the overall download speed.
Ref.: https://www.linuxjournal.com/content/speed-your-downloads-axel

Using axel to download the environment seems to be up to 5x faster than
using wget.
2020-08-28 14:03:18 +02:00
Robert Adam
d8100e5b42 FEAT(code): Emit signal on volume adjustment
A ClientUser object will now emit a signal every time its local volume
adjustment is being changed.
2020-08-28 10:27:25 +02:00
Robert Adam
407cdc95d7
Merge pull request #4438: FEAT(talking-ui): Save last position
In order for the UI to not pop-up in the middle of the MainWindow (or
any other default location) after you have placed it carefully the last
time, this commit makes the UI's position to be saved and restored.

For cases in which there is no position set yet, it will be positioned
to the right of the initial position of the MainWindow.

Note that the UI's position is only saved if it is visible at the time
Mumble is closed which is used as an indication that the user is
actually using it (and has thus placed it explicitly).
2020-08-27 18:05:08 +02:00
Robert Adam
42a7ce4e53 FEAT(talking-ui): Save last position
In order for the UI to not pop-up in the middle of the MainWindow (or
any other default location) after you have placed it carefully the last
time, this commit makes the UI's position to be saved and restored.

For cases in which there is no position set yet, it will be positioned
to the right of the initial position of the MainWindow.

Note that the UI's position is only saved if it is visible at the time
Mumble is closed which is used as an indication that the user is
actually using it (and has thus placed it explicitly).
2020-08-27 17:00:18 +02:00
Robert Adam
62d9c41d9d
Merge pull request #4433: CI(lgtm): Remove LGTM
Since LGTM does not provide a recent enough cmake version, it can no
longer build our repository without falling back to the old qmake system
that'll be removed in the future.
Thus we no longer require LGTM to run as CI.
2020-08-22 19:09:01 +02:00
Robert Adam
0481122651 MAINT(readme): Removed reference to LGTM 2020-08-22 17:19:26 +02:00
Robert Adam
2a7fcdadbf CI(lgtm): Remove LGTM
Since LGTM does not provide a recent enough cmake version, it can no
longer build our repository without falling back to the old qmake system
that'll be removed in the future.
Thus we no longer require LGTM to run as CI.
2020-08-22 17:17:40 +02:00
Robert Adam
0e6e36d76a
Merge pull request #4430: Fix raceconditions in the client
This PR fixes 2 raceconditions that both occur due to the MainWindow::serverDisconnected being able to trigger while certain client-server communication is still happening (unfinished).

The effects of these are

    Loss of server-specific shortcuts due to them being saved from emory before having been loaded into it in the first place (due to msgServerSync not having been called yet)
    Loss of ChannelListeners due to them being saved before their synchronisation with the server being done (and therefore again not having been loaded into memory yet but being saved from there).
2020-08-21 12:22:19 +02:00
Robert Adam
ba06bb184a FIX(client): Don't delay ChannelListener processing
The processing of ChannelListeners was delayed until the next iteration
of the Qt event loop since it was thought that msgServerSync was running
in another thread. Given that this function already accesses the DB,
this can't be though.

Thus the delay is unnecessary and was therefore removed.
2020-08-21 11:31:44 +02:00
Robert Adam
3a55fb4a66 FIX(client): Racecondition deleting ChannelListeners
As ChannelListeners are only synchronised with the server once
msgServerSync has been received, there is still a racecondition for them
even though we only save them if the ServerSync has happened yet.
The connection could be terminated before the answer of the server for
the request to add the respective listeners reaches the client. In that
case the listeners would be erased by the call to
ChannelListener::saveToDB().

Thus this commit introduces yet another flag indicating whether the
listeners have synchronised with the server yet.
2020-08-21 11:30:26 +02:00
Robert Adam
f2acfb50f4 FIX(client): Racecondition deleting shortcuts
Server-specific shortcuts are read into memory in
MainWindow::msgServerSync and are saved into the DB again in
MainWindow::serverDisconnected.
If however the disconnect function runs before the server
synchronization has finished, the shortcut list in memory is empty and
by writing that into the DB all existing server-specific shortcuts are
lost (overwritten).

This commit adds checks before saving the shortcuts (and
ChannelListeners) so that saving only occurs if the synchronization has
happened before and thus the shortcuts have been loaded in the first
place.
2020-08-21 11:29:30 +02:00
Robert Adam
9b736da76f
Merge pull request #4432: DOCS(man): Add missing options from help messages to man pages
Missing options from the help messages of mumble and murmur have
been added to the respective man pages.
2020-08-21 10:59:49 +02:00
Popkornium18
52d5bd1618 DOCS(man): Add missing options from help messages to man pages
Missing options from the help messages of mumble and murmur have
been added to the respective man pages.
2020-08-20 00:04:29 +02:00
Davide Beatrici
43975f3a87
Merge PR #4429: FIX(client): define and export "MumbleMain" also in debug builds 2020-08-18 08:08:34 +02:00
Davide Beatrici
bee21a18a6 FIX(client): define and export "MumbleMain" also in debug builds
This fixes the loader not being able to load the DLL due to the missing symbol.

Previously, the function was defined and exported only when "QT_NO_DEBUG" was not defined (i.e. release builds).

This was probably the case due to:

- Our old environment not providing debug libraries.
- The DLL + loader idea only making sense when Mumble is installed. See PR #1684 for further info.
2020-08-18 03:54:57 +02:00
Davide Beatrici
b7e8db2ad1
Merge PR #4426: FIX(packaging): Enable mac-script to run multiple times 2020-08-14 22:53:35 +02:00
Robert Adam
32d685517e FIX(packaging): Enable mac-script to run multiple times
Before this commit the MacOS packaging script failed on copying Codecs
if the respective directory already existed (e.g. because the packaging
script has been run before).

Furthermore the script called a function to delete a directory (tree)
on a file. This error never surfaced before because usually when this
script is run, the respective file doesn't exist yet.

Both issues are fixed by this commit. It is now possible to run the
packaging script multiple times consecutively without it erroring on
already existing files.
2020-08-14 22:03:47 +02:00
Robert Adam
18b531b6b4
Merge pull request #4416: CI(azure): Disable environment caching
This feature of AzurePipelines has only been introduced recently.
However it turned out that on average the caching of the environment
takes significantly more time than simply downloading it on every run.
Thus this commit disables environment caching again.
2020-08-14 16:54:07 +02:00
Robert Adam
0a335d00e2
Merge pull request #4423: FIX(client): Compile error without manual plugin
Whe using CONFIG+=no-manual-plugin with the old qmake buildsystem or
-Dmanual-plugin=OFF with the new cmake one, there were compile errors
due to the ManualPlugin being referenced in other files without include
guards.

This commit makes sure that in case the manual plugin is not included,
other code won't reference it either.

Fixes #4422
2020-08-13 21:23:00 +02:00
Robert Adam
a0fa7cc0b1 FIX(client): Compile error without manual plugin
Whe using CONFIG+=no-manual-plugin with the old qmake buildsystem or
-Dmanual-plugin=OFF with the new cmake one, there were compile errors
due to the ManualPlugin being referenced in other files without include
guards.

This commit makes sure that in case the manual plugin is not included,
other code won't reference it either.

Fixes #4422
2020-08-13 20:18:21 +02:00
Robert Adam
f0b8a1683a CI(azure): Disable environment caching
This feature of AzurePipelines has only been introduced recently.
However it turned out that on average the caching of the environment
takes significantly more time than simply downloading it on every run.
Thus this commit disables environment caching again.
2020-08-12 18:26:36 +02:00
Davide Beatrici
83182a771d
Merge PR #4408: FEAT(client): print extended error when QOSRemoveSocketFromFlow() fails 2020-08-12 18:21:22 +02:00
Robert Adam
b11ac8f7c5
Merge pull request #4414: FIX(certificate): Retrieve QSslConfiguration after setting CA
Commit bdb12c6 added a regression for servers built with QT older than version
5.15. After this commit these servers do not server intermediate certificates
anymore. This happens because the QSslConfiguration is retrieved before adding
the CA certificates to the socket and is reinserted into the socket again after
adding the CA certificates, thereby overwriting the CA certificates added in
between.

This commit fixes that by retrieving the QSslConfiguration just after setting
the CA certificates in case an older QT version than 5.15 is used.
2020-08-12 17:21:01 +02:00
MadMaurice
b47e309f31 FIX(certificate): Retrieve QSslConfiguration after setting CA
Commit bdb12c6 added a regression for servers built with QT older than version
5.15. After this commit these servers do not serve intermediate certificates
anymore.  This happens because the QSslConfiguration is retrieved before adding
the CA certificates to the socket and is reinserted into the socket again after
adding the CA certificates, thereby overwriting the CA certificates added in
between.

This commit fixes that by retrieving the QSslConfiguration just after setting
the CA certificates in case an older QT version than 5.15 is used.
2020-08-11 23:06:25 +02:00
Davide Beatrici
54bd01f9e6
Merge PR #4413: FIX(cmake): set CMAKE_WIX_UPGRADE_GUID and generate CMAKE_WIX_PRODUCT_GUID 2020-08-11 22:59:57 +02:00