WireGuardApp: Add back the wireguard-go version extraction script and use WIREGUARD_GO_VERSION directly
Avoids linking against libwg-go.a in order to access the WireGuard backend version. Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
@@ -49,7 +49,7 @@ public class Logger {
|
||||
if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
|
||||
appVersion += " (\(appBuild))"
|
||||
}
|
||||
Logger.global?.log(message: "App version: \(appVersion); Go backend version: \(wireGuardVersion)")
|
||||
Logger.global?.log(message: "App version: \(appVersion); Go backend version: \(WIREGUARD_GO_VERSION)")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ extension SettingsTableViewController {
|
||||
}
|
||||
cell.value = appVersion
|
||||
} else if field == .goBackendVersion {
|
||||
cell.value = wireGuardVersion
|
||||
cell.value = WIREGUARD_GO_VERSION
|
||||
}
|
||||
return cell
|
||||
} else if field == .exportZipArchive {
|
||||
|
||||
@@ -208,7 +208,7 @@ extension AppDelegate {
|
||||
}
|
||||
let appVersionString = [
|
||||
tr(format: "macAppVersion (%@)", appVersion),
|
||||
tr(format: "macGoBackendVersion (%@)", wireGuardVersion)
|
||||
tr(format: "macGoBackendVersion (%@)", WIREGUARD_GO_VERSION)
|
||||
].joined(separator: "\n")
|
||||
let donateString = NSMutableAttributedString(string: tr("donateLink"))
|
||||
donateString.addAttribute(.link, value: "https://www.wireguard.com/donations/", range: NSRange(location: 0, length: donateString.length))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../WireGuardKitC/WireGuardKitC.h"
|
||||
#include "../WireGuardKitGo/wireguard.h"
|
||||
|
||||
#include "wireguard-go-version.h"
|
||||
#include "ringlogger.h"
|
||||
|
||||
Reference in New Issue
Block a user