diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/Cargo.toml | 11 | ||||
-rw-r--r-- | cli/build.rs | 21 | ||||
-rw-r--r-- | cli/deno.ico | bin | 0 -> 109963 bytes |
3 files changed, 32 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 000000000..6bb4a0453 --- /dev/null +++ b/cli/deno.ico |