This is basically a replacement for our old Perl script ("build_installer.pl").
Aside from using CPack instead of MSBuild, there's not much difference in terms of methodology.
The Perl script exclusively uses Windows SDK tools; the PowerShell one uses a COM object, a WiX tool and an extra one from FireGiant (WiX's developers).
In future we should investigate whether using the "WindowsInstaller.Installer" COM object (used to replace "msiinfo.exe") we can replace FireGiant's EmbedTransform, so that WiX remains the only dependency.
Co-authored-by: Davide Beatrici <git@davidebeatrici.dev>
target_link_libraries() automatically adds the library's include directories to the specified target and marks it as dependency.
Both steps are fine, however there's a third we don't need: linking to the library, because we load Opus and CELT at runtime.
To make it clear that we don't link to the libraries, this commit replaces target_link_libraries() with add_dependencies() and target_include_directories().
CMake prioritizes MinGW over MSVC, which means that the first is used if found in PATH.
Since overlay-xcompile is only meant to be used with MSVC (MinGW provides "-m32" to build as 32 bit), this commit forces the use of "cl".
GCC and Clang provide the "-m32" and "-m64" options, which tell the compiler to build as 32 bit and 64 bit, respectively.
Unfortunately MSVC doesn't provide similar options, thus this commit converts "overlay" from a subdirectory to a project.
If the build is 32 bit, the project is processed a single time and compiles a 32 bit library.
If the build is 64 bit, the project is processed two times and compiles a 64 bit and a 32 bit library.
Our qmake project forcibly put binaries into the "release" folder, inside the repository.
With the CMake project this is not the case: the source and binary directories can even reside on different drives.
Unfortunately the binary directory was hardcoded in both "build-overlay-installer" and "osxdist.py".
As for the source directory, both scripts simply expected to be run from the repository's root.
This commit adds the "--source-dir" and "--binary-dir" options to "osxdist.py". Default values: "." and "build", respectively.
"build-overlay-installer" now expects its working directory to be the binary folder.
No options are added; they are not required because the script is executed by "osxdist.py", which takes care of setting the working directory.
Extra change: "build-overlay-installer" now uses "PlistBuddy" rather than "defaults", because the latter doesn't support reading from a file anymore in macOS Catalina (10.15).
<shlwapi.h> defines "StrCat", resulting in the following issue when compiling WASAPI.cpp with MinGW:
In file included from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/message_lite.h:50:0,
from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/generated_enum_util.h:36,
from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/map.h:48,
from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/generated_message_table_driven.h:34,
from src/Mumble.pb.h:26,
from ../src/mumble/MainWindow.h:17,
from ../src/mumble/WASAPI.cpp:9:
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:706:31: error: expected unqualified-id before 'const'
PROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b);
^
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:706:31: error: expected ')' before 'const'
In file included from ../src/mumble/WASAPI.h:18:0,
from ../src/mumble/WASAPI.cpp:6:
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:707:24: error: redefinition of 'std::__cxx11::string google::protobuf::StrCat_instead_use_StringCbCat_or_StringCchCat'
PROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
^
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:706:24: note: 'std::__cxx11::string google::protobuf::StrCat_instead_use_StringCbCat_or_StringCchCat' previously declared here
PROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b);
^
Right now after having removed a shortcut from the UI, the next shortcut
in the list is selected automatically. This could cause the user to
accidentally delete this next shortcut by accident as the mouse is
hovering over the remove button anyways.
This change makes mass-removing of shortcuts a bit tedious but I don't
think that this is a common thing to do. Given that you can't undo the
deletion of a shortcut, we should better be safe than sorry with this.
With this change the positions of other speakers are also displayed in
the UI of the ManualPlugin (next to your own position) as red dots. This
allows for better understanding of the positional audio feature.
It is also possible to specify a time for these dots to persist even if
the corresponding speaker has stopped talking. In this time the
respective dot will start to fade out until it gets removed completely.
This does not show the names of the associated speakers in order to not
clutter the UI too much. If this information is needed, the TalkingUI
can be opened alongside the ManualPlugin to get an overview of who's
currently talking.
We had several README files at the project's root. This PR merges and/or moves them around so that we end up with only a single one that's left at the project root.
Right now after having removed a shortcut from the UI, the next shortcut
in the list is selected automatically. This could cause the user to
accidentally delete this next shortcut by accident as the mouse is
hovering over the remove button anyways.
This change makes mass-removing of shortcuts a bit tedious but I don't
think that this is a common thing to do. Given that you can't undo the
deletion of a shortcut, we should better be safe than sorry with this.
With this change the positions of other speakers are also displayed in
the UI of the ManualPlugin (next to your own position) as red dots. This
allows for better understanding of the positional audio feature.
It is also possible to specify a time for these dots to persist even if
the corresponding speaker has stopped talking. In this time the
respective dot will start to fade out until it gets removed completely.
This does not show the names of the associated speakers in order to not
clutter the UI too much. If this information is needed, the TalkingUI
can be opened alongside the ManualPlugin to get an overview of who's
currently talking.
This implements #4070 and makes it possible to hide the public-server-list from the connect dialog.
The save location was left under ui for backwards compatibility.
This is a follow-up on #4305
This option allows to set a threshold on how long a user's channel
should be remembered. This is useful for scenarios where users usually
don't want their channel to be remembered by the server unless they had
a disconnect (aka have ot re-connect after a short period of time).
Implements #4143