mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
BUILD(installer): Include binaries only if built
The overlay binaries were expected to be present in any case when the installer was built. Same goes for the g15-helper binary. This commit makes sure these binaries are only included if the respective feature was actually built before. Fixes #5058
This commit is contained in:
parent
11f7a1c10e
commit
5b379527da
@ -15,8 +15,13 @@ using System.Collections.Generic;
|
||||
using WixSharp;
|
||||
using WixSharp.CommonTasks;
|
||||
|
||||
public struct Features {
|
||||
public bool overlay;
|
||||
public bool g15;
|
||||
}
|
||||
|
||||
public class ClientInstaller : MumbleInstall {
|
||||
public ClientInstaller(string version, string arch) {
|
||||
public ClientInstaller(string version, string arch, Features features) {
|
||||
string upgradeGuid = "D269FC55-4F2C-4285-9AA9-4D034AF305C4";
|
||||
List<string> binaries = new List<string>();
|
||||
string[] plugins = {
|
||||
@ -87,12 +92,18 @@ public class ClientInstaller : MumbleInstall {
|
||||
"speex.dll",
|
||||
"mumble.exe",
|
||||
"mumble_app.dll",
|
||||
"mumble_ol.dll",
|
||||
"mumble_ol_helper.exe",
|
||||
"mumble_ol_helper_x64.exe",
|
||||
"mumble_ol_x64.dll",
|
||||
"mumble-g15-helper.exe"
|
||||
};
|
||||
|
||||
if (features.overlay) {
|
||||
binaries.Add("mumble_ol.dll");
|
||||
binaries.Add("mumble_ol_helper.exe");
|
||||
binaries.Add("mumble_ol_helper_x64.exe");
|
||||
binaries.Add("mumble_ol_x64.dll");
|
||||
}
|
||||
|
||||
if (features.g15) {
|
||||
binaries.Add("mumble-g15-helper.exe");
|
||||
}
|
||||
} else if (arch == "x86") {
|
||||
// 32 bit
|
||||
this.Platform = WixSharp.Platform.x86;
|
||||
@ -103,10 +114,16 @@ public class ClientInstaller : MumbleInstall {
|
||||
"speex.dll",
|
||||
"mumble.exe",
|
||||
"mumble_app.dll",
|
||||
"mumble_ol.dll",
|
||||
"mumble_ol_helper.exe",
|
||||
"mumble-g15-helper.exe"
|
||||
};
|
||||
|
||||
if (features.overlay) {
|
||||
binaries.Add("mumble_ol.dll");
|
||||
binaries.Add("mumble_ol_helper.exe");
|
||||
}
|
||||
|
||||
if (features.g15) {
|
||||
binaries.Add("mumble-g15-helper.exe");
|
||||
}
|
||||
}
|
||||
|
||||
this.Name = "Mumble (client)";
|
||||
@ -171,6 +188,7 @@ class BuildInstaller
|
||||
string version = "";
|
||||
string arch = "";
|
||||
bool isAllLangs = false;
|
||||
Features features = new Features();
|
||||
|
||||
for (int i = 0; i < args.Length; i++) {
|
||||
if (args[i] == "--version" && Regex.IsMatch(args[i + 1], @"^([0-9]+\.){3}[0-9]+$")) {
|
||||
@ -184,10 +202,18 @@ class BuildInstaller
|
||||
if (args[i] == "--all-languages") {
|
||||
isAllLangs = true;
|
||||
}
|
||||
|
||||
if (args[i] == "--g15") {
|
||||
features.g15 = true;
|
||||
}
|
||||
|
||||
if (args[i] == "--overlay") {
|
||||
features.overlay = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (version != null && arch != null) {
|
||||
var clInstaller = new ClientInstaller(version, arch);
|
||||
var clInstaller = new ClientInstaller(version, arch, features);
|
||||
clInstaller.Version = new Version(version);
|
||||
|
||||
if (isAllLangs) {
|
||||
|
||||
@ -59,6 +59,18 @@ if(packaging)
|
||||
"--arch" ${ARCH}
|
||||
)
|
||||
|
||||
if(overlay)
|
||||
list(APPEND installer_vars
|
||||
"--overlay"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(g15)
|
||||
list(APPEND installer_vars
|
||||
"--g15"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(COPY
|
||||
${CMAKE_SOURCE_DIR}/installer/MumbleInstall.cs
|
||||
${CMAKE_SOURCE_DIR}/installer/ClientInstaller.cs
|
||||
|
||||
Loading…
Reference in New Issue
Block a user