move gui into wezterm crate/binary

This commit is contained in:
Wez Furlong committed 2020-10-03 11:15:57 -07:00
1 parent 0c32963f1c
commit faba4d9074
54 files changed
+143 -143

No files matched your search

Generated
+1 -1
View File
@@ -4111,7 +4111,7 @@ dependencies = [
]
[[package]]
name = "wezterm"
name = "wezterm-gui"
version = "0.1.0"
dependencies = [
"allsorts",
+1 -125
View File
@@ -1,129 +1,5 @@
[package]
authors = ["Wez Furlong <wez@wezfurlong.org>"]
name = "wezterm"
version = "0.1.0"
edition = "2018"
build = "build.rs"
default-run = "wezterm"
[build-dependencies]
anyhow = "1.0"
[target.'cfg(windows)'.build-dependencies]
embed-resource = "1.3"
cc = "1.0"
[[bin]]
name = "strip-ansi-escapes"
path = "src/bin/strip-ansi-escapes.rs"
[dependencies]
allsorts = "0.4"
async-task = "1.2"
async-trait = "0.1"
anyhow = "1.0"
thiserror = "1.0"
base64 = "0.10"
rangeset = { path = "rangeset" }
bitflags = "1.0"
bstr = "0.2"
codec = { path = "codec" }
config = { path = "config" }
crossbeam = "0.7"
dirs = "2.0"
downcast-rs = "1.0"
euclid = "0.20"
filedescriptor = { version="0.7", path = "filedescriptor" }
filenamegen = "0.2"
pretty_env_logger = "0.4"
freetype = { path = "deps/freetype" }
image = "0.23"
harfbuzz = { path = "deps/harfbuzz" }
hostname = "0.3"
lazy_static = "1.4"
libc = "0.2"
log = "0.4"
lru = "0.5"
luahelper = { path = "luahelper" }
mux = { path = "mux" }
open = "1.2"
pulldown-cmark = "0.7"
metrics = { version="0.12", features=["std"]}
mlua = {version="0.2", features=["vendored"]}
hdrhistogram = "6.3"
openssl = "0.10"
palette = "0.5"
portable-pty = { path = "pty", features = ["serde_support", "ssh"]}
promise = { path = "promise" }
ratelim= { path = "ratelim" }
rcgen = "0.7"
http_req = {version="0.6", default-features=false, features=["rust-tls"]}
regex = "1"
serde = {version="1.0", features = ["rc", "derive"]}
serde_json = "1.0"
serial = "0.4"
ssh2 = "0.8"
structopt = "0.3"
tabout = { path = "tabout" }
wezterm-term = { path = "term", features=["use_serde"] }
terminfo = "0.7"
termwiz = { path = "termwiz" }
textwrap = "0.11"
tinyvec = "0.3"
toml = "0.4"
umask = { path = "umask" }
unicode-normalization = "0.1"
unicode-segmentation = "1.6"
unicode-width = "0.1"
url = "2"
walkdir = "2"
window = { path = "window", features=["opengl", "wayland"]}
[target.'cfg(unix)'.dependencies]
daemonize = { git = "https://github.com/wez/daemonize" }
[target.'cfg(not(windows))'.dependencies]
# show a notification
notify-rust = "3"
# on linux, font-loader pulls in servo-font* crates which conflict with
# our newer font related deps, so we avoid it on linux
[target.'cfg(any(windows, target_os = "macos"))'.dependencies]
font-loader = { version = "0.8" }
font-kit = "0.5"
[target."cfg(windows)".dependencies]
dwrote = "0.9"
shared_library = "0.1"
uds_windows = "0.1"
winapi = { version = "0.3", features = [
"winuser",
"consoleapi",
"handleapi",
"fileapi",
"namedpipeapi",
"synchapi",
"winsock2",
]}
winrt-notification = "0.2"
[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
fontconfig = { path = "deps/fontconfig" }
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.7"
core-graphics = "0.19"
core-text = "15.0"
objc = "0.2"
cocoa = "0.20"
[features]
default = ["vendor_openssl"]
# FIXME: find a way to magically disable vendor_openssl only on linux!
vendor_openssl = ["openssl/vendored"]
[workspace]
members = ["wezterm-mux-server"]
members = ["wezterm-mux-server", "wezterm"]
[profile.release]
opt-level = 3
+124
View File
@@ -0,0 +1,124 @@
[package]
name = "wezterm"
version = "0.1.0"
authors = ["Wez Furlong <wez@wezfurlong.org>"]
edition = "2018"
build = "build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
anyhow = "1.0"
[target.'cfg(windows)'.build-dependencies]
embed-resource = "1.3"
cc = "1.0"
[[bin]]
name = "strip-ansi-escapes"
path = "src/bin/strip-ansi-escapes.rs"
[dependencies]
allsorts = "0.4"
async-task = "1.2"
async-trait = "0.1"
anyhow = "1.0"
thiserror = "1.0"
base64 = "0.10"
rangeset = { path = "../rangeset" }
bitflags = "1.0"
bstr = "0.2"
codec = { path = "../codec" }
config = { path = "../config" }
crossbeam = "0.7"
dirs = "2.0"
downcast-rs = "1.0"
euclid = "0.20"
filedescriptor = { version="0.7", path = "../filedescriptor" }
filenamegen = "0.2"
pretty_env_logger = "0.4"
freetype = { path = "../deps/freetype" }
image = "0.23"
harfbuzz = { path = "../deps/harfbuzz" }
hostname = "0.3"
lazy_static = "1.4"
libc = "0.2"
log = "0.4"
lru = "0.5"
luahelper = { path = "../luahelper" }
mux = { path = "../mux" }
open = "1.2"
pulldown-cmark = "0.7"
metrics = { version="0.12", features=["std"]}
mlua = {version="0.2", features=["vendored"]}
hdrhistogram = "6.3"
openssl = "0.10"
palette = "0.5"
portable-pty = { path = "../pty", features = ["serde_support", "ssh"]}
promise = { path = "../promise" }
ratelim= { path = "../ratelim" }
rcgen = "0.7"
http_req = {version="0.6", default-features=false, features=["rust-tls"]}
regex = "1"
serde = {version="1.0", features = ["rc", "derive"]}
serde_json = "1.0"
serial = "0.4"
ssh2 = "0.8"
structopt = "0.3"
tabout = { path = "../tabout" }
wezterm-term = { path = "../term", features=["use_serde"] }
terminfo = "0.7"
termwiz = { path = "../termwiz" }
textwrap = "0.11"
tinyvec = "0.3"
toml = "0.4"
umask = { path = "../umask" }
unicode-normalization = "0.1"
unicode-segmentation = "1.6"
unicode-width = "0.1"
url = "2"
walkdir = "2"
window = { path = "../window", features=["opengl", "wayland"]}
[target.'cfg(unix)'.dependencies]
daemonize = { git = "https://github.com/wez/daemonize" }
[target.'cfg(not(windows))'.dependencies]
# show a notification
notify-rust = "3"
# on linux, font-loader pulls in servo-font* crates which conflict with
# our newer font related deps, so we avoid it on linux
[target.'cfg(any(windows, target_os = "macos"))'.dependencies]
font-loader = { version = "0.8" }
font-kit = "0.5"
[target."cfg(windows)".dependencies]
dwrote = "0.9"
shared_library = "0.1"
uds_windows = "0.1"
winapi = { version = "0.3", features = [
"winuser",
"consoleapi",
"handleapi",
"fileapi",
"namedpipeapi",
"synchapi",
"winsock2",
]}
winrt-notification = "0.2"
[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
fontconfig = { path = "../deps/fontconfig" }
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.7"
core-graphics = "0.19"
core-text = "15.0"
objc = "0.2"
cocoa = "0.20"
[features]
default = ["vendor_openssl"]
# FIXME: find a way to magically disable vendor_openssl only on linux!
vendor_openssl = ["openssl/vendored"]
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -495,21 +495,21 @@ fn load_built_in_fonts(
font_info: &mut Vec<(Names, PathBuf, FontDataHandle)>,
) -> anyhow::Result<()> {
for data in &[
include_bytes!("../../assets/fonts/JetBrainsMono-Bold-Italic.ttf") as &'static [u8],
include_bytes!("../../assets/fonts/JetBrainsMono-Bold.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-ExtraBold-Italic.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-ExtraBold.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-ExtraLight-Italic.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-ExtraLight.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-Italic.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-Light-Italic.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-Light.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-Medium-Italic.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-Medium.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-Regular.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-SemiLight-Italic.ttf"),
include_bytes!("../../assets/fonts/JetBrainsMono-SemiLight.ttf"),
include_bytes!("../../assets/fonts/NotoColorEmoji.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-Bold-Italic.ttf") as &'static [u8],
include_bytes!("../../../assets/fonts/JetBrainsMono-Bold.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-ExtraBold-Italic.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-ExtraBold.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-ExtraLight-Italic.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-ExtraLight.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-Italic.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-Light-Italic.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-Light.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-Medium-Italic.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-Medium.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-Regular.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-SemiLight-Italic.ttf"),
include_bytes!("../../../assets/fonts/JetBrainsMono-SemiLight.ttf"),
include_bytes!("../../../assets/fonts/NotoColorEmoji.ttf"),
] {
let scope = allsorts::binary::read::ReadScope::new(&data);
let file = scope.read::<OpenTypeFile>()?;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -982,7 +982,7 @@ impl TermWindow {
fn apply_icon(window: &Window) -> anyhow::Result<()> {
let icon_image =
image::load_from_memory(include_bytes!("../../../assets/icon/terminal.png"))?;
image::load_from_memory(include_bytes!("../../../../assets/icon/terminal.png"))?;
let image = icon_image.to_bgra();
let (width, height) = image.dimensions();
window.set_icon(Image::from_raw(
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
@@ -389,7 +389,7 @@ pub fn allocate(width: usize, height: usize) -> (TermWizTerminal, Rc<dyn Pane>)
}
fn new_wezterm_terminfo_renderer() -> TerminfoRenderer {
let data = include_bytes!("../termwiz/data/xterm-256color");
let data = include_bytes!("../../termwiz/data/xterm-256color");
let db = terminfo::Database::from_buffer(&data[..]).unwrap();
TerminfoRenderer::new(
File renamed without changes.