summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock19
-rw-r--r--cli/Cargo.toml11
-rw-r--r--cli/build.rs21
-rw-r--r--cli/deno.icobin0 -> 109963 bytes
4 files changed, 51 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 9b6b28831..126dbb012 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -426,6 +426,7 @@ dependencies = [
"webpki",
"webpki-roots",
"winapi 0.3.9",
+ "winres",
]
[[package]]
@@ -2523,6 +2524,15 @@ dependencies = [
]
[[package]]
+name = "toml"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"
+dependencies = [
+ "serde",
+]
+
+[[package]]
name = "tower-service"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2920,6 +2930,15 @@ dependencies = [
]
[[package]]
+name = "winres"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff4fb510bbfe5b8992ff15f77a2e6fe6cf062878f0eda00c0f44963a807ca5dc"
+dependencies = [
+ "toml",
+]
+
+[[package]]
name = "ws2_32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 082782d5b..25e0bdc31 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -18,6 +18,10 @@ path = "main.rs"
deno_core = { path = "../core", version = "0.49.0" }
deno_typescript = { path = "../deno_typescript", version = "0.49.0" }
+[target.'cfg(windows)'.build-dependencies]
+winres = "0.1"
+winapi = "0.3.8"
+
[dependencies]
deno_core = { path = "../core", version = "0.49.0" }
deno_lint = "0.1.16"
@@ -77,3 +81,10 @@ test_util = { path = "../test_util" }
[target.'cfg(unix)'.dev-dependencies]
pty = "0.2.2"
+
+[package.metadata.winres]
+# This section defines the metadata that appears in the deno.exe PE header.
+OriginalFilename = "deno.exe"
+LegalCopyright = "© Deno contributors & Deno Land Inc. MIT licensed."
+ProductName = "Deno"
+FileDescription = "A secure JavaScript/TypeScript runtime, built on V8 and Rust."
diff --git a/cli/build.rs b/cli/build.rs
index 5cf4b02e2..5d343c5f3 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -6,6 +6,11 @@ use std::collections::HashMap;
use std::env;
use std::path::PathBuf;
+#[cfg(target_os = "windows")]
+extern crate winapi;
+#[cfg(target_os = "windows")]
+extern crate winres;
+
fn main() {
// Don't build V8 if "cargo doc" is being run. This is to support docs.rs.
if env::var_os("RUSTDOCFLAGS").is_some() {
@@ -111,4 +116,20 @@ fn main() {
&main_module_name,
)
.expect("Failed to create snapshot");
+
+ set_binary_metadata();
}
+
+#[cfg(target_os = "windows")]
+fn set_binary_metadata() {
+ let mut res = winres::WindowsResource::new();
+ res.set_icon("deno.ico");
+ res.set_language(winapi::um::winnt::MAKELANGID(
+ winapi::um::winnt::LANG_ENGLISH,
+ winapi::um::winnt::SUBLANG_ENGLISH_US,
+ ));
+ res.compile().unwrap();
+}
+
+#[cfg(not(target_os = "windows"))]
+fn set_binary_metadata() {}
diff --git a/cli/deno.ico b/cli/deno.ico
new file mode 100644
index 000000000..6bb4a0453
--- /dev/null
+++ b/cli/deno.ico
Binary files differ