summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon
diff options
context:
space:
mode:
authorOdd Stranne <odd@mullvad.net>2018-07-11 16:13:46 +0200
committerOdd Stranne <odd@mullvad.net>2018-07-12 14:52:02 +0200
commitb5b8cf466a0858168b117281a8836f2a60dfd25f (patch)
tree8362e03f61e78e34ed9d65b0ea6aea7c06b7aa98 /mullvad-daemon
parentad7f1a05a28b883c2e73fbf7b3d6053af98b5c04 (diff)
downloadmullvadvpn-b5b8cf466a0858168b117281a8836f2a60dfd25f.tar.xz
mullvadvpn-b5b8cf466a0858168b117281a8836f2a60dfd25f.zip
Add version information for Rust binaries
Diffstat (limited to 'mullvad-daemon')
-rw-r--r--mullvad-daemon/Cargo.toml3
-rw-r--r--mullvad-daemon/build.rs7
-rw-r--r--mullvad-daemon/version.rc27
3 files changed, 37 insertions, 0 deletions
diff --git a/mullvad-daemon/Cargo.toml b/mullvad-daemon/Cargo.toml
index c40209c897..c24304c35e 100644
--- a/mullvad-daemon/Cargo.toml
+++ b/mullvad-daemon/Cargo.toml
@@ -41,3 +41,6 @@ simple-signal = "1.1"
ctrlc = "3.0"
windows-service = { git = "https://github.com/mullvad/windows-service-rs.git", rev = "55c5dfb372e6b3f5607a3159c5388d27b6b84ff6" }
winapi = "0.3"
+
+[target.'cfg(windows)'.build-dependencies]
+windres = "0.1"
diff --git a/mullvad-daemon/build.rs b/mullvad-daemon/build.rs
index f1f507670e..246b38d13d 100644
--- a/mullvad-daemon/build.rs
+++ b/mullvad-daemon/build.rs
@@ -3,6 +3,8 @@ use std::fs;
use std::path::PathBuf;
use std::process::Command;
+#[cfg(windows)]
+extern crate windres;
fn main() {
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
@@ -10,6 +12,11 @@ fn main() {
let product_version = env!("CARGO_PKG_VERSION").replacen(".0", "", 1);
fs::write(out_dir.join("product-version.txt"), product_version).unwrap();
fs::write(out_dir.join("git-commit-date.txt"), commit_date()).unwrap();
+
+ #[cfg(windows)]
+ {
+ windres::Build::new().compile("version.rc").unwrap();
+ }
}
fn commit_date() -> String {
diff --git a/mullvad-daemon/version.rc b/mullvad-daemon/version.rc
new file mode 100644
index 0000000000..70733c046b
--- /dev/null
+++ b/mullvad-daemon/version.rc
@@ -0,0 +1,27 @@
+#include "../dist-assets/windows/version.h"
+
+IDI_MAIN ICON "../dist-assets/icon.ico"
+
+1 VERSIONINFO
+FILEVERSION MAJOR_VERSION,MINOR_VERSION,PATCH_VERSION,0
+PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,PATCH_VERSION,0
+BEGIN
+BLOCK "StringFileInfo"
+BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "Amagicom AB"
+ VALUE "FileDescription", "Daemon that manages the VPN tunnel and system security"
+ VALUE "FileVersion", PRODUCT_VERSION
+ VALUE "InternalName", "mullvad-daemon"
+ VALUE "LegalCopyright", "(c) 2018 Amagicom AB"
+ VALUE "OriginalFilename", "mullvad-daemon.exe"
+ VALUE "ProductName", "Mullvad VPN"
+ VALUE "ProductVersion", PRODUCT_VERSION
+ END
+END
+BLOCK "VarFileInfo"
+BEGIN
+ VALUE "Translation", 0x409, 1252
+END
+END