Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Installation #69

Closed
ghost opened this issue Oct 15, 2019 · 7 comments · Fixed by #99
Closed

Windows Installation #69

ghost opened this issue Oct 15, 2019 · 7 comments · Fixed by #99

Comments

@ghost
Copy link

ghost commented Oct 15, 2019

Hi,

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

Greetings

@Rigellute
Copy link
Owner

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

What issues are you encountering?

@nathanloisel
Copy link

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

@Rigellute
Copy link
Owner

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

@TimonPost
Copy link
Contributor

TimonPost commented 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.

@Rigellute
Copy link
Owner

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.

@MCOfficer
Copy link
Contributor

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

@Rigellute
Copy link
Owner

@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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants