Skip to content

Commit

Permalink
Merge pull request #44 from hbeni/updater
Browse files Browse the repository at this point in the history
Implement mumble plugin updater
  • Loading branch information
hbeni authored Aug 18, 2020
2 parents add7128 + a4fa4f2 commit d6e3d9f
Show file tree
Hide file tree
Showing 10 changed files with 32,230 additions and 40 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "client/mumble-plugin/lib/openssl"]
path = client/mumble-plugin/lib/openssl
url = git://git.openssl.org/openssl.git
branch = OpenSSL_1_1_1-stable
13 changes: 9 additions & 4 deletions README-de_DE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Installation / Einrichtung des Mumble-plugins
Vorraussetzungen
----------------------
- Du brauchst lediglich ein aktuelles Mumble mit Pluginunterstützung (>= v1.4.0)
- Eine aktuelle OpenSSL Installation

Installation
-----------------------
Expand Down Expand Up @@ -166,10 +167,14 @@ Das Plugin selbst Kompilieren
Das FGCom-mumble plugin muss in Maschinensprache vorliegen, um von Mumble geladen werden zu können.
Um den aktuellsten Quellcode zu benutzen, kannst du das Plugin selbst übersetzen.

- Vorraussetzungen: `make`, `g++`, `mingw32` (für Windows-Erzeugung unter Linux)
- Geh in das Verzeichnis `client/mumble-plugin/`
- Unter Linux, tippe `make`
- oder `make all-win64`, um eine Kreuzkompilierung für Windows auszuführen
- Vorraussetzungen:
- `git`, `make`, `g++`, `mingw32` (für Windows-Erzeugung unter Linux)
- OpenSSL: Linux baut dynamisch gegen das installierte `libssl-dev`. MingW/Windows linkt statisch gegen einen Bau des git submodules `lib/openssl` durch den Auruf von `make openssl-win`.

- Bauen:
- Geh in das Verzeichnis `client/mumble-plugin/`
- Unter Linux, tippe `make`
- oder `make all-win64`, um eine Kreuzkompilierung für Windows auszuführen

Weitere interessante make buildtargets:

Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Install / Setup for the Client
Setup requirements
----------------------
- have a standard mumble client with recent plugin support (>= v1.4.0)
- a recent OpenSSL installation

Installation
-----------------------
Expand Down Expand Up @@ -149,12 +150,16 @@ When you cannot hear other pilots or are unable to transmit on the radios, you c

Compiling the plugin
======================
The FGCom-mumble client plugin needs to be in binary form. If you want to use the latest code from github, you can compile yurself.
The FGCom-mumble client plugin needs to be in binary form. If you want to use the latest code from github, you can compile yurself.

- Prerequisites: `make`, `g++`, `mingw32` (for windows build)
- Go to the folder `client/mumble-plugin/`
- on linux type `make`
- or `make all-win64` for cross-compile to windows
- Prerequisites:
- `git`, `make`, `g++`, `mingw32` (for windows build)
- OpenSSL: Linux builds dynamically against the installed `libssl-dev`. MingW/Windows links statically against a build from the git submodule `lib/openssl` by invoking `make openssl-win`.

- Building:
- Go to the folder `client/mumble-plugin/`
- on linux type `make`
- or `make all-win64` to cross-compile to windows

Other interesting compile targets:

Expand Down
27 changes: 5 additions & 22 deletions client/mumble-plugin/fgcom-mumble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ void mumble_registerAPIFunctions(MumbleAPI api) {
void mumble_setMumbleInfo(version_t mumbleVersion, version_t mumbleAPIVersion, version_t minimalExpectedAPIVersion) {
// this function will always be the first one to be called. Even before init()
// In here you can get info about the Mumble version this plugin is about to run in.
pLog() << "Mumble version: " << mumbleVersion << "; Mumble API-Version: " << mumbleAPIVersion << "; Minimal expected API-Version: "
pLog() << "Plugin version: " << mumble_getVersion() << "; Mumble version: " << mumbleVersion << "; Mumble API-Version: " << mumbleAPIVersion << "; Minimal expected API-Version: "
<< minimalExpectedAPIVersion << std::endl;
}

Expand Down Expand Up @@ -797,25 +797,8 @@ bool mumble_onReceiveData(mumble_connection_t connection, mumble_userid_t sender
}


bool mumble_hasUpdate() {
// This plugin never has an update
// TODO: Implement this, maybe look at the github page? for new tags?
return false;
}

bool mumble_getUpdateDownloadURL(char *buffer, uint16_t bufferSize, uint16_t offset) {
// TODO: Implement me: get the latest release tar.gz suitable or the local platform
/*static std::string url = "https://i.dont.exist/testplugin.zip";
size_t writtenChars = url.copy(buffer, bufferSize, offset);

if (writtenChars < bufferSize) {
// URL has fit into the buffer -> append null byte and be done with it
buffer[writtenChars] = '\0';
return true;
} else {
std::cout << "Overflow" << std::endl;
return false;
}*/
return false;
}
#ifndef NO_UPDATER
// updater in separate file
#include "updater.cpp"
#endif
6 changes: 3 additions & 3 deletions client/mumble-plugin/lib/fgcom-mumble.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Define opwn plugin api
//

// Define own plugin api
//
#ifndef FGCOM_MUMBLE_H
#define FGCOM_MUMBLE_H

// Plugin Version
#define FGCOM_VERSION_MAJOR 0
#define FGCOM_VERSION_MINOR 3
#define FGCOM_VERSION_MINOR 4
#define FGCOM_VERSION_PATCH 0

/*
Expand Down
Loading

0 comments on commit d6e3d9f

Please sign in to comment.