mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 05:12:40 +03:00
Embed icon into windows executable and titlebar
This also applies to X11 when using the glutin frontend
This commit is contained in:
parent
1980e738c7
commit
a56f37598c
@ -8,6 +8,9 @@ build = "build.rs"
|
||||
[build-dependencies]
|
||||
vergen = "3"
|
||||
|
||||
[target.'cfg(windows)'.build-dependencies]
|
||||
embed-resource = "1.1"
|
||||
|
||||
[dependencies]
|
||||
base91 = { path = "base91" }
|
||||
bitflags = "1.0"
|
||||
@ -20,7 +23,7 @@ failure_derive = "0.1"
|
||||
foreign-types = "0.3"
|
||||
freetype = { path = "deps/freetype" }
|
||||
gl = "0.11"
|
||||
glium = { version = "0.23", default-features = false, features = ["glutin"]}
|
||||
glium = { version = "0.23", default-features = false, features = ["glutin", "icon_loading"]}
|
||||
harfbuzz = { path = "deps/harfbuzz" }
|
||||
lazy_static = "1.3"
|
||||
leb128 = "0.2"
|
||||
|
9
assets/windows/manifest.manifest
Normal file
9
assets/windows/manifest.manifest
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
|
||||
manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
|
||||
<dpiAwareness>PerMonitorV2, unaware</dpiAwareness>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
</assembly>
|
5
assets/windows/resource.rc
Normal file
5
assets/windows/resource.rc
Normal file
@ -0,0 +1,5 @@
|
||||
#define IDI_ICON 0x101
|
||||
IDI_ICON ICON "terminal.ico"
|
||||
#define RT_MANIFEST 24
|
||||
#define APP_MANIFEST 1
|
||||
APP_MANIFEST RT_MANIFEST manifest.manifest
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
3
build.rs
3
build.rs
@ -7,4 +7,7 @@ fn main() {
|
||||
|
||||
// Generate the 'cargo:' key output
|
||||
generate_cargo_keys(ConstantsFlags::all()).expect("Unable to generate the cargo keys!");
|
||||
|
||||
#[cfg(windows)]
|
||||
embed_resource::compile("assets/windows/resource.rc");
|
||||
}
|
||||
|
@ -214,6 +214,9 @@ impl GliumTerminalWindow {
|
||||
.with_pixel_format(24, 8);
|
||||
let window = glutin::WindowBuilder::new()
|
||||
.with_dimensions(logical_size)
|
||||
.with_window_icon(Some(glutin::Icon::from_bytes(include_bytes!(
|
||||
"../../../assets/icon/terminal.png"
|
||||
))?))
|
||||
.with_title("wezterm");
|
||||
|
||||
let mut_loop = event_loop.event_loop.borrow_mut();
|
||||
|
Loading…
Reference in New Issue
Block a user