xi-term icon indicating copy to clipboard operation
xi-term copied to clipboard

Would love windows support...

Open mrcaron opened this issue 7 years ago • 2 comments

Perhaps using something like this... https://github.com/rschmitt/heatseeker/blob/master/src/screen/windows.rs

mrcaron avatar Apr 17 '17 20:04 mrcaron

This is blocked by ticki/termion#103

wendivoid avatar Mar 11 '18 04:03 wendivoid

There is a termion PR for support for windows but it hasn't moved. https://gitlab.redox-os.org/redox-os/termion/merge_requests/151. I was able to compile xi-term to windows using it.

  • In Cargo.toml update the termion to use this instead and delete Cargo.lock file
diff --git a/Cargo.toml b/Cargo.toml
index 6e7a89c..77f95db 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ failure = "0.1.1"
 futures = "0.1.18"
 log = "0.4.1"
 log4rs = "0.8.0"
-termion = "1.5.1"
+termion = { git = "https://gitlab.redox-os.org/Jezza/termion", branch = "windows-support" }
 tokio = "0.1.7"
 xdg = "2.1.0"
 indexmap = "1.0.1"
  • Then update src/core/tui.rs
index 224032a..a4e1b76 100644
--- a/src/core/tui.rs
+++ b/src/core/tui.rs
@@ -11,7 +11,6 @@ use xrl::{
 };

 use failure::Error;
-use xdg::BaseDirectories;

 use core::{Command, Terminal, TerminalEvent};
 use widgets::{CommandPrompt, Editor};
@@ -26,11 +25,8 @@ pub struct Tui {

 impl Tui {
     pub fn new(mut client: Client, events: UnboundedReceiver<CoreEvent>) -> Result<Self, Error> {
-        let conf_dir = BaseDirectories::with_prefix("xi")
-            .ok()
-            .and_then(|dirs| Some(dirs.get_config_home().to_string_lossy().into_owned()));
         run(client
-            .client_started(conf_dir.as_ref().map(|dir| &**dir), None)
+            .client_started(Some("d:\\tmp"), None)
             .map_err(|_| ())
         );

Seems like xdg should be optional for windows builds.

It seems like the first step to get it working properly would be to have the termion PR merge to master.

image

prabirshrestha avatar Feb 02 '19 20:02 prabirshrestha