Giter Site home page Giter Site logo

Can't install on windows about dijo HOT 11 CLOSED

nerdypepper avatar nerdypepper commented on August 21, 2024 4
Can't install on windows

from dijo.

Comments (11)

gentoid avatar gentoid commented on August 21, 2024 3

Just FYI guys. cargo install --no-default-features --features "crossterm-backend" work perfectly fine on Win 10 1909. Thank you for shipping this on the Windows platform :-)

from dijo.

oppiliappan avatar oppiliappan commented on August 21, 2024 2

@ntqr the cursive crate uses ncurses as a default feature, which I have disabled as of 02bba5. This should work fine with either crossterm or pancurses.

I am working towards setting up CI and a testing suite for all platforms, please put up with my trial and error until then 😅.

from dijo.

oppiliappan avatar oppiliappan commented on August 21, 2024 2

@rafamerlin sweet, that seems to be working as expected. I have released v0.2.3 that fully supports windows with the crossterm backend. The installation process is similar:

cargo build --release --no-default-features --features "crossterm-backend"

This might seem a little clunky, but enabling features (on target os basis) for a dependency is a nightly only feature at the moment :/

Alternatively, you can download pre-compiled binaries from the release page.

Cheers.

from dijo.

ntqr avatar ntqr commented on August 21, 2024 1

It looks like ncurses isn't supported on Windows:

error: failed to run custom build command for `ncurses v5.99.0`
...
c1: fatal error C1083: Cannot open source file: 'D:\apps\dijo\target\release\build\ncurses-a01b84948c9e0b70\out\chtype_size.c': Permission denied

Maybe consider using pancurses?

from dijo.

rafamerlin avatar rafamerlin commented on August 21, 2024 1

I haven't tried it with Crossterm. I will try it tonight and will get back to you.

from dijo.

rafamerlin avatar rafamerlin commented on August 21, 2024 1

Thank you for all the help :)

from dijo.

oppiliappan avatar oppiliappan commented on August 21, 2024

dijo does not support windows at the moment, because termion does not support windows at the moment. However, using the crossterm backend for cursive could help dijo run on windows, so I have made a branch specifically for this. You can try it out with:

$ git clone -b feature/windows https://github.com/NerdyPepper/dijo/
$ cargo install --force --path ./dijo

crossterm is not built for powershell, but it has been tested console host on Win 10 and Win 8.1. Let me know how it goes, this would help make dijo truly cross platform.

The only reason I am not using crossterm because it flashes the screen while redrawing.

from dijo.

jjn2009 avatar jjn2009 commented on August 21, 2024

similarly maybe add a note in the WIKI about the ncurses library requirement for building from source in 18.04 solved this with: apt install libncursesw5-dev

from dijo.

rafamerlin avatar rafamerlin commented on August 21, 2024

It did work now, but it does look a bit weird.

I can just see the highlighted text and the others just show if I use the arrows on my keyboard.

dijo

from dijo.

oppiliappan avatar oppiliappan commented on August 21, 2024

@rafamerlin was the text rendering fine with crossterm?

from dijo.

rafamerlin avatar rafamerlin commented on August 21, 2024

So, I'm still a beginner on rust and I wasn't used to TUIs before.

Gave a quick look and saw that currently the one being used is pancurses-backend so on windows it will use pdcurses-sys so I checked out this commit which was in theory still using crossterm:
d7c303d

However, when I try to build this one it will give me this issue:

error[E0432]: unresolved import `cursive::crossterm`
  --> src\main.rs:20:5
   |
20 | use cursive::crossterm;
   |     ^^^^^^^^^^^^^^^^^^ no `crossterm` in the root

I tried to add crossterm as a dependency just as a test but still doesn't work. Googled it but couldn't find anything as well. Maybe I'm missing something on my box?

Edit:
Oh, just realised that the windows/linux is not something that happens automatically, we have to tell which features we are using when we build:
So just built it with: cargo build --all --no-default-features --features windows

And then ran it the same way and now it looks much better, not as good as the image on your readme.md but still much better than the other one:

image

from dijo.

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.