Git Product home page Git Product logo

Comments (7)

Rigellute avatar Rigellute commented on May 22, 2024 1

Ah dang! Thank you for doing this investigation, I'll add a note about Windows to the README.

from spotify-tui.

TimonPost avatar TimonPost commented on May 22, 2024 1

@Rigellute this app can support windows very easily. TUI has the crossterm backend which is made to support cross-platform. Although... their implementation uses crossterm 0.9 and 0.12 is already out and they didn't even release my latest patch - done a few months ago - with 0.10 yet.

I tried to move this library over to crossterm just to experiment to how easy it was to swap termion. It was very easily. Please have a look at this fork.

However, I encountered two problems:

  1. Because TUI uses crossterm 0.9 your library has to support this old one as well.
  2. KeyEvent (replacement for Key) does not implement Copy however, this is going to be fixed in 0.12.2.

Point two is the only blocker, point 1 is not great but it isn't a blocker because a lot is changed since release 0.12.

from spotify-tui.

Rigellute avatar Rigellute commented on May 22, 2024

Hi @roketman09, I've not tried installing on Windows yet.

What issues are you encountering?

from spotify-tui.

nathanloisel avatar nathanloisel commented on May 22, 2024

Windows installation doesn't work. After investigation, Termion dependency doesn't support Windows.
Here is the error i have:

error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\lib.rs:24:9
   |
24 | pub use sys::size::terminal_size;
   |         ^^^ maybe a missing `extern crate sys;`?

error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\lib.rs:25:9
   |
25 | pub use sys::tty::{is_tty, get_tty};
   |         ^^^ maybe a missing `extern crate sys;`?

error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
 --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\async.rs:5:5
  |
5 | use sys::tty::get_tty;
  |     ^^^ maybe a missing `extern crate sys;`?

error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:29:5
   |
29 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
   |     ^^^ maybe a missing `extern crate sys;`?

error[E0432]: unresolved import `sys`
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:28:5
   |
28 | use sys::Termios;
   |     ^^^ maybe a missing `extern crate sys;`?

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\async.rs:14:36
   |
14 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\async.rs:43:36
   |
43 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:45:9
   |
45 |         set_terminal_attr(&self.prev_ios).unwrap();
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:90:23
   |
90 |         let mut ios = get_terminal_attr()?;
   |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:93:9
   |
93 |         raw_terminal_attr(&mut ios);
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
  --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:95:9
   |
95 |         set_terminal_attr(&ios)?;
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:106:9
    |
106 |         set_terminal_attr(&self.prev_ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
   --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:111:23
    |
111 |         let mut ios = get_terminal_attr()?;
    |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
   --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:112:9
    |
112 |         raw_terminal_attr(&mut ios);
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Main\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.3\src\raw.rs:113:9
    |
113 |         set_terminal_attr(&ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

from spotify-tui.

Rigellute avatar Rigellute commented on May 22, 2024

I forgot to mention that you can run spotify-tui using the Windows Subsytem for Linux (which is what I've done).

However, natively supporting Windows would be much better for sure.

from spotify-tui.

MCOfficer avatar MCOfficer commented on May 22, 2024

Now that a new release is out: can the github actions be adjusted to also build and publish for windows? Should i PR that?

from spotify-tui.

Rigellute avatar Rigellute commented on May 22, 2024

@MCOfficer please do! I've been trying to work out how to create the windows binary from github actions and was going to ask for help.

So yes, please create a PR!

from spotify-tui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.