From 6c064a1dd84e039ea2a971d5c82992474bf4e026 Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Mon, 28 Mar 2022 22:29:45 +0200 Subject: [PATCH 1/3] enable ansi terminal on windows 10 cmd --- Cargo.lock | 1 + Cargo.toml | 3 ++- src/main.rs | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index e17b649..02c0735 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2332,6 +2332,7 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" name = "uw8" version = "0.1.2" dependencies = [ + "ansi_term", "anyhow", "curlywas", "minifb", diff --git a/Cargo.toml b/Cargo.toml index 4ea7539..cd82124 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,4 +23,5 @@ same-file = "1" warp = { version = "0.3.2", optional = true } tokio = { version = "1.17.0", features = ["sync", "rt"], optional = true } tokio-stream = { version = "0.1.8", features = ["sync"], optional = true } -webbrowser = { version = "0.6.0", optional = true } \ No newline at end of file +webbrowser = { version = "0.6.0", optional = true } +ansi_term = "0.12.1" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 71d03f2..b304112 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,9 @@ use uw8::Runtime; fn main() -> Result<()> { let mut args = Arguments::from_env(); + // try to enable ansi support in win10 cmd shell + let _ = ansi_term::enable_ansi_support(); + match args.subcommand()?.as_deref() { Some("version") => { println!("{}", env!("CARGO_PKG_VERSION")); From 8a10b99eebb4e7fa9b5ce5cf9b26836c9a5ae8c1 Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Fri, 8 Apr 2022 21:22:34 +0200 Subject: [PATCH 2/3] fix non-windows build --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index b304112..a820f36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ fn main() -> Result<()> { let mut args = Arguments::from_env(); // try to enable ansi support in win10 cmd shell + #[cfg(target_os="windows")] let _ = ansi_term::enable_ansi_support(); match args.subcommand()?.as_deref() { From f32b0762b0954f394c1de3991e84b7cf45d68cf4 Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Mon, 11 Apr 2022 00:17:25 +0200 Subject: [PATCH 3/3] update curlywas --- Cargo.lock | 2 +- Cargo.toml | 2 +- platform/Cargo.lock | 2 +- platform/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02c0735..e3cbbe5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -499,7 +499,7 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "curlywas" version = "0.1.0" -source = "git+https://github.com/exoticorn/curlywas.git?rev=557c3a84#557c3a842675a1ebd77e84021f9f5236d4fa5648" +source = "git+https://github.com/exoticorn/curlywas.git?rev=aac7bbd#aac7bbd8786a26da0dcbe8320b1afefaf6086464" dependencies = [ "anyhow", "ariadne", diff --git a/Cargo.toml b/Cargo.toml index cd82124..b3abb91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ anyhow = "1" minifb = { version = "0.20", default-features = false, features = ["x11"] } notify = "4" pico-args = "0.4" -curlywas = { git = "https://github.com/exoticorn/curlywas.git", rev = "557c3a84" } +curlywas = { git = "https://github.com/exoticorn/curlywas.git", rev = "aac7bbd" } wat = "1" uw8-tool = { path = "uw8-tool" } same-file = "1" diff --git a/platform/Cargo.lock b/platform/Cargo.lock index 8168af9..edb179c 100644 --- a/platform/Cargo.lock +++ b/platform/Cargo.lock @@ -146,7 +146,7 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "curlywas" version = "0.1.0" -source = "git+https://github.com/exoticorn/curlywas.git?rev=557c3a84#557c3a842675a1ebd77e84021f9f5236d4fa5648" +source = "git+https://github.com/exoticorn/curlywas.git?rev=aac7bbd#aac7bbd8786a26da0dcbe8320b1afefaf6086464" dependencies = [ "anyhow", "ariadne", diff --git a/platform/Cargo.toml b/platform/Cargo.toml index a3da896..bdd6c11 100644 --- a/platform/Cargo.toml +++ b/platform/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -curlywas = { git="https://github.com/exoticorn/curlywas.git", rev="557c3a84" } +curlywas = { git="https://github.com/exoticorn/curlywas.git", rev="aac7bbd" } uw8-tool = { path="../uw8-tool" } anyhow = "1" lodepng = "3.4" \ No newline at end of file