[GH-ISSUE #69] Windows Installation #45

Closed
opened 2026-02-28 14:46:34 +03:00 by kerem · 7 comments
Owner

Originally created by @ghost on GitHub (Oct 15, 2019).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/69

Hi,

About spotify-tui windows installation, there is a tutorial to use it?

Greetings

Originally created by @ghost on GitHub (Oct 15, 2019). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/69 Hi, About spotify-tui windows installation, there is a tutorial to use it? Greetings
kerem closed this issue 2026-02-28 14:46:35 +03:00
Author
Owner

@Rigellute commented on GitHub (Oct 15, 2019):

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

What issues are you encountering?

<!-- gh-comment-id:542332606 --> @Rigellute commented on GitHub (Oct 15, 2019): Hi @roketman09, I've not tried installing on Windows yet. What issues are you encountering?
Author
Owner

@nathanloisel commented on GitHub (Oct 21, 2019):

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
<!-- gh-comment-id:544410662 --> @nathanloisel commented on GitHub (Oct 21, 2019): 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 ```
Author
Owner

@Rigellute commented on GitHub (Oct 21, 2019):

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

<!-- gh-comment-id:544423612 --> @Rigellute commented on GitHub (Oct 21, 2019): Ah dang! Thank you for doing this investigation, I'll add a note about Windows to the README.
Author
Owner

@TimonPost commented on GitHub (Oct 22, 2019):

@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.

<!-- gh-comment-id:545099851 --> @TimonPost commented on GitHub (Oct 22, 2019): @Rigellute this app can support windows very easily. TUI has the [crossterm backend](https://github.com/fdehau/tui-rs/blob/master/Cargo.toml#L33) 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](https://github.com/TimonPost/spotify-tui/tree/crossterm_impl). 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.
Author
Owner

@Rigellute commented on GitHub (Oct 23, 2019):

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.

<!-- gh-comment-id:545332565 --> @Rigellute commented on GitHub (Oct 23, 2019): 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.
Author
Owner

@MCOfficer commented on GitHub (Jan 23, 2020):

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

<!-- gh-comment-id:577649806 --> @MCOfficer commented on GitHub (Jan 23, 2020): Now that a new release is out: can the github actions be adjusted to also build and publish for windows? Should i PR that?
Author
Owner

@Rigellute commented on GitHub (Jan 23, 2020):

@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!

<!-- gh-comment-id:577694866 --> @Rigellute commented on GitHub (Jan 23, 2020): @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!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#45
No description provided.