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 compatibility #12

Merged
merged 3 commits into from
Jan 5, 2020
Merged

Windows compatibility #12

merged 3 commits into from
Jan 5, 2020

Conversation

quark-zju
Copy link
Contributor

@quark-zju quark-zju commented Jan 5, 2020

Avoid RawFd on Windows compatibility. There are some missing pieces on the termwiz side.
But main issues on sp are resolved.

Make file.rs portable.
RawFd is the main blocker for Windows support. The other blocker is termwiz.
See:

- wez/wezterm#108
- wez/wzsh#4

To actually build on Windows with the unreleased termwiz now, use this patch:

    diff --git a/Cargo.toml b/Cargo.toml
    --- a/Cargo.toml
    +++ b/Cargo.toml
    @@ -33,5 +33,5 @@ scopeguard = "1.0.0"
     smallvec = "0.6.9"
     terminfo = "0.6"
    -termwiz = "0.5"
    +termwiz = { git = "https://github.com/wez/wezterm" }
     unicode-segmentation = "1.2.1"
     unicode-width = "0.1.5"
    diff --git a/src/event.rs b/src/event.rs
    --- a/src/event.rs
    +++ b/src/event.rs
    @@ -50,4 +50,9 @@ pub(crate) enum Envelope {
     pub(crate) struct EventSender(mpsc::Sender<Envelope>, TerminalWaker);

    +// XXX: Remove these once termwiz has fixed it.
    +unsafe impl Send for EventSender {}
    +unsafe impl Sync for EventSender {}
    +
     impl EventSender {
         pub(crate) fn send(&self, event: Event) -> Result<(), Error> {
Windows does not have `/bin/sh`.
@markbt
Copy link
Owner

markbt commented Jan 5, 2020

Thanks! I should've deleted the app module, as I moved all the functionality into the sp binary. I'll do that next.

@markbt markbt merged commit b2f6851 into markbt:master Jan 5, 2020
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 this pull request may close these issues.

3 participants