void icon indicating copy to clipboard operation
void copied to clipboard

Test/add Windows support

Open hugows opened this issue 7 years ago • 7 comments

Hi, since this is written in a modern language, I had the expectation it would work on Windows as well.

hugows avatar Jan 09 '17 13:01 hugows

I'll fire up windows today and get it working!

spacejam avatar Jan 10 '17 17:01 spacejam

I think its a termion thing, unfortunately..

On 10 January 2017 at 15:13, Tyler Neely [email protected] wrote:

I'll fire up windows today and get it working!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spacejam/void/issues/8#issuecomment-271636238, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAtGcQ8p8ftdW9PxyqBoQ4nChIRkeUbks5rQ7w3gaJpZM4LePXa .

hugows avatar Jan 10 '17 19:01 hugows

termion claims it will work on any system with an ansi terminal, so later today I'll try it out on bash for windows

spacejam avatar Jan 10 '17 21:01 spacejam

That will probably work, I didn't try that.

On Jan 10, 2017 7:29 PM, "Tyler Neely" [email protected] wrote:

termion claims it will work on any system with an ansi terminal, so later today I'll try it out on bash for windows

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spacejam/void/issues/8#issuecomment-271703572, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAtGU654jx1KHefeuNu68In91iri4A2ks5rQ_gmgaJpZM4LePXa .

hugows avatar Jan 10 '17 23:01 hugows

I tried installing this to my windows using cargo install with git bash but with no luck.

Here's the error message:

error[E0432]: unresolved import `libc::termios`
 --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\termios.rs:4:9
  |
4 | pub use libc::termios as Termios;
  |         ^^^^^^^^^^^^^^^^^^^^^^^^ no `termios` in `libc`

error[E0432]: unresolved import `libc::ioctl`
  --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\size.rs:50:9
   |
50 |     use libc::ioctl;
   |         ^^^^^^^^^^^ no `ioctl` in `libc`

error[E0432]: unresolved import `libc::STDOUT_FILENO`
  --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\size.rs:51:9
   |
51 |     use libc::STDOUT_FILENO;
   |         ^^^^^^^^^^^^^^^^^^^ no `STDOUT_FILENO` in `libc`

error[E0432]: unresolved import `std::os::unix::io::AsRawFd`
 --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\tty.rs:2:5
  |
2 | use std::os::unix::io::AsRawFd;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `unix` in `std::os`

error: cannot continue compilation due to previous error

   Compiling getopts v0.2.14
Build failed, waiting for other jobs to finish...
error: failed to compile `voidmap v0.4.4`, intermediate artifacts can be found at `C:\Users\mrZalli\AppData\Local\Temp\cargo-install.ShnNPDqXuQie`

Caused by:
  Could not compile `termion`.

To learn more, run the command again with --verbose.

TheZalli avatar Jan 19 '17 15:01 TheZalli

@mrZalli thank you for testing this out! it seems like I should investigate alternative terminal libraries. I use pretty basic functionality, so another one may be able to be swapped in without too much effort.

spacejam avatar Jan 24 '17 02:01 spacejam

To whom it may interest: I had a rough try at porting void to crossterm (for native, non-WSL Windows support) here: https://github.com/pmf/void/tree/crossterm-for-windows-support

Issues that I'll still have to handle:

  • some ugliness in function signatures introduced due to my unfamiliarity with Rust
  • I had to dumb down the "atomic saving" feature because Windows complained about locking
  • the "open in external editor" feature does not work

Would be good if someone who is more familiar with void could try it out and compare performance under Linux (I've just compared the Linux termios and crossterm versions in a VM, and not with large files) and check what other features might be broken that I do not know of.

pmf avatar Mar 11 '20 06:03 pmf