summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock24
-rw-r--r--mullvad-daemon/Cargo.toml10
-rw-r--r--mullvad-daemon/build.rs16
-rw-r--r--mullvad-daemon/resources.rc8
-rw-r--r--mullvad-daemon/version.rc25
5 files changed, 43 insertions, 40 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 44a7c4bf64..5418b80e24 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -946,7 +946,7 @@ dependencies = [
"uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"windows-service 0.1.0 (git+https://github.com/mullvad/windows-service-rs.git?rev=55c5dfb372e6b3f5607a3159c5388d27b6b84ff6)",
- "windres 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winres 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1217,7 +1217,7 @@ source = "git+https://github.com/nikvolf/parity-tokio-ipc#306ea3e6ff8b8c1bb03081
dependencies = [
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"mio-named-pipes 0.1.6 (git+https://github.com/alexcrichton/mio-named-pipes)",
"miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1234,7 +1234,7 @@ source = "git+https://github.com/NikVolf/parity-tokio-ipc?rev=master#306ea3e6ff8
dependencies = [
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"mio-named-pipes 0.1.6 (git+https://github.com/alexcrichton/mio-named-pipes)",
"miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1978,6 +1978,14 @@ dependencies = [
]
[[package]]
+name = "toml"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "try-lock"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2157,6 +2165,14 @@ dependencies = [
]
[[package]]
+name = "winres"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "ws2_32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2357,6 +2373,7 @@ dependencies = [
"checksum tokio-timer 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1c76b4e97a4f61030edff8bd272364e4f731b9f54c7307eb4eb733c3926eb96a"
"checksum tokio-udp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "43eb534af6e8f37d43ab1b612660df14755c42bd003c5f8d2475ee78cc4600c0"
"checksum tokio-uds 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "424c1ed15a0132251813ccea50640b224c809d6ceafb88154c1a8775873a0e89"
+"checksum toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a0263c6c02c4db6c8f7681f9fd35e90de799ebd4cfdeab77a38f4ff6b3d8c0d9"
"checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2"
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
"checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a"
@@ -2384,4 +2401,5 @@ dependencies = [
"checksum windows-service 0.1.0 (git+https://github.com/mullvad/windows-service-rs.git?rev=55c5dfb372e6b3f5607a3159c5388d27b6b84ff6)" = "<none>"
"checksum windres 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6e13ff705d7fab032bdf857354035c56c8c889e364029e4300779eb6e1d729"
"checksum winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a"
+"checksum winres 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f07dabda4e79413ecac65bc9a2234ad3d85dc49f9d289f868cd9d8611d88f28d"
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
diff --git a/mullvad-daemon/Cargo.toml b/mullvad-daemon/Cargo.toml
index 89d7a7aa2e..2892869152 100644
--- a/mullvad-daemon/Cargo.toml
+++ b/mullvad-daemon/Cargo.toml
@@ -44,4 +44,12 @@ windows-service = { git = "https://github.com/mullvad/windows-service-rs.git", r
winapi = "0.3"
[target.'cfg(windows)'.build-dependencies]
-windres = "0.2"
+winres = "0.1"
+winapi = "0.3"
+
+[package.metadata.winres]
+ProductName = "Mullvad VPN"
+CompanyName = "Amagicom AB"
+LegalCopyright = "(c) 2018 Amagicom AB"
+InternalName = "mullvad-daemon"
+OriginalFilename = "mullvad-daemon.exe"
diff --git a/mullvad-daemon/build.rs b/mullvad-daemon/build.rs
index 45ce36bdba..e629f39232 100644
--- a/mullvad-daemon/build.rs
+++ b/mullvad-daemon/build.rs
@@ -4,18 +4,28 @@ use std::path::PathBuf;
use std::process::Command;
#[cfg(windows)]
-extern crate windres;
+extern crate winapi;
+#[cfg(windows)]
+extern crate winres;
fn main() {
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
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("product-version.txt"), &product_version).unwrap();
fs::write(out_dir.join("git-commit-date.txt"), commit_date()).unwrap();
#[cfg(windows)]
{
- windres::Build::new().compile("resources.rc").unwrap();
+ let mut res = winres::WindowsResource::new();
+ res.set("ProductVersion", &product_version);
+ res.set_icon("../dist-assets/icon.ico");
+ res.set_language(winapi::um::winnt::MAKELANGID(
+ winapi::um::winnt::LANG_ENGLISH,
+ winapi::um::winnt::SUBLANG_ENGLISH_US,
+ ));
+ res.set_manifest_file("mullvad-daemon.manifest");
+ res.compile().expect("Unable to generate windows resources");
}
}
diff --git a/mullvad-daemon/resources.rc b/mullvad-daemon/resources.rc
deleted file mode 100644
index d55f0136e3..0000000000
--- a/mullvad-daemon/resources.rc
+++ /dev/null
@@ -1,8 +0,0 @@
-IDI_MAIN ICON "../dist-assets/icon.ico"
-
-#include "version.rc"
-
-#define RT_MANIFEST 24
-#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
-
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "mullvad-daemon.manifest"
diff --git a/mullvad-daemon/version.rc b/mullvad-daemon/version.rc
deleted file mode 100644
index 1c7360bbc0..0000000000
--- a/mullvad-daemon/version.rc
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "../dist-assets/windows/version.h"
-
-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