Having different include files that are needed (and which are
inter-dependent) to create your own plugin, makes things harder than it
needs to be.
Therefore, all plugin header files (those for the "new" (1.4) plugin
framework anyway) have been combined into one header file. Thus,
developers now only have to download a single file and include that
instead of having to figure out what files to download and what to
include where.
Taking the chance, the version number has been removed from the header
file's name. This allows one to track changes made to the API via git
(which is not quite as easy if you create a new file every time you make
a change).
When performing a debug build, the "deadlock plugin" will be included
in the build, which uses the thread functionality of the std. However,
during compiling there would be an error about a symbol in thread.hpp
not being found (_beginthreadex). As it turns out, this was due to us
having a header file called Process.h, which would shadow the windows-
specific header file defining the mentioned symbol.
Therefore, in this commit we rename the Process base class to
AbstractProcess and rename the files accordingly, fixing that error.
See also: https://stackoverflow.com/q/27230258
Instead of excluding all plugins but the link one on OSes other than
Windows and Linux, the new approach allows for a more granular control
by introducing a list of plugins that is supported on the different
platforms.
This replaces the globbing approach which means that new plugins have
now to be included in this list explicitly.
The advantage of this is that this allows for a much greater flexibility
for handling plugins on different OS.
Furthermore the plugin's own directory is no longer added to the
include-path by default. If a plugin wishes to do this, it should do so
explicitly. This should help make the plugins easier to move around in
the future.
This commit introduces a new plugin framework into the codebase of the
Mumble client. Note that "plugin" here really refers to a (more or less)
general purpose plugin and is therefore not to be confused with the
previously available positional data plugins (only responsible for
fetching positional data from a running game and passing that to
Mumble).
The plugin interface is written in C, removing the compiler-dependence
the old "plugins" had. Instead plugins can now be written in an
arbitrary language as long as that language is capable of being compiled
into a shared library and also being capable of being C-compatible.
As already indicated a plugin is essentially a shared library that
provides certain functions that allow Mumble to interface with it.
Inside Mumble the so-called PluginManager is responsible for managing
the plugins and relaying events to the respective callbacks. Plugins
themselves can also interact with Mumble on their own initiative by
using the provided API functions.
Fixes#2455Fixes#2148Fixes#1594Fixes#2051Fixes#3742Fixes#4575Fixes#4751
Apparently the first commit (59ae429972)
did not include all files.
Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
The reason why the signature has to be stricter now is due to a very similar function being present at an earlier address:
il2cpp:10E99B02 83 C4 08 add esp, 8
il2cpp:10E99B05 84 C0 test al, al
il2cpp:10E99B07 74 39 jz short loc_10E99B42
il2cpp:10E99B09 A1 AC 7C C5 11 mov eax, HLBNNHFCNAJ__TypeInfo ; HLBNNHFCNAJ
il2cpp:10E99B0E 8B 40 5C mov eax, [eax+5Ch]
il2cpp:10E99B11 8B 38 mov edi, [eax]
il2cpp:112CC4B8 83 C4 08 add esp, 8
il2cpp:112CC4BB 84 C0 test al, al
il2cpp:112CC4BD 74 39 jz short loc_112CC4F8
il2cpp:112CC4BF A1 54 7F C5 11 mov eax, FMLLKEACGIO__TypeInfo ; FMLLKEACGIO
il2cpp:112CC4C4 8B 40 5C mov eax, [eax+5Ch]
il2cpp:112CC4C7 8B 00 mov eax, [eax]
FMLLKEACGIO is AmongUsClient, the object we need.
See https://wiki.weewoo.net/wiki/Translations for more info on the obfuscated names.
Tested with v2020.10.22s and v2020.09.22s.
Unless the pattern we're searching for becomes invalid or the structures we're using change, the plugin should keep working.