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

Add Windows and Powershell support #280

Merged
merged 37 commits into from
Dec 3, 2023

Conversation

jtschuster
Copy link
Collaborator

@jtschuster jtschuster commented Sep 4, 2022

This builds off of the PR @dmfay made a while back to use crossterm, adds workarounds for windows related to paths and the fake_typer, and a powershell init script. Behavior should be identical as far as I can tell, but I may have missed something.

Replaces relative-path with path-absolutize.

@cantino
Copy link
Owner

cantino commented Sep 23, 2022

Thank you for working on this @jtschuster!

Is there anyone who uses Powershell who could test this?

@jtschuster
Copy link
Collaborator Author

FWIW I've been using this personally for the past few months and haven't really hit issues (though I didn't have any baseline usage on Linux or Mac with the original version)

@cantino
Copy link
Owner

cantino commented Mar 18, 2023

Is this ready?

@jtschuster
Copy link
Collaborator Author

Not quite, there are still some scenarios with multiline commands that don't work yet.

@jtschuster jtschuster changed the title Use crossterm instead of termion and add powershell support Add Windows and Powershell support Sep 12, 2023
@jtschuster
Copy link
Collaborator Author

@cantino this is finally ready

@cantino cantino merged commit 8d23d89 into cantino:master Dec 3, 2023
27 checks passed
@cantino
Copy link
Owner

cantino commented Dec 3, 2023

Merged, thank you for this contribution @jtschuster!

@cantino
Copy link
Owner

cantino commented Dec 3, 2023

Released, do you mind testing it? You may want to build master and make sure my change of

 [target.'cfg(windows)'.dependencies]
-autopilot = {git="https://github.com/autopilot-rs/autopilot-rs"}
+autopilot = "0.4.0"

works okay.

@jtschuster
Copy link
Collaborator Author

Released, do you mind testing it? You may want to build master and make sure my change of

 [target.'cfg(windows)'.dependencies]

-autopilot = {git="https://github.com/autopilot-rs/autopilot-rs"}

+autopilot = "0.4.0"

works okay.

I'll have to double check but IIRC autopilot panicked in the code mcfly uses, so I had to fix it upstream, but it hasn't been released.

@cantino
Copy link
Owner

cantino commented Dec 3, 2023 via email

@jtschuster
Copy link
Collaborator Author

jtschuster commented Dec 4, 2023

cargo publish wouldn't work with a git dependency, it only supports versioned dependencies unfortunately.

Ah, okay. It does work with the powershell init script since that uses a file output by default, but it does require the file. We could just remove the dependency and require -o on windows, or copy the necessary source from autopilot. I think it would be a fairly thin slice to get just windows typing capability. I'm not sure autopilot is being actively maintained.

@cantino
Copy link
Owner

cantino commented Dec 4, 2023

I don't have a Windows setup to test building so whichever you think is best is fine.

Also, are the builds that GitHub is making sufficient for Windows users?

@jtschuster
Copy link
Collaborator Author

I don't see any windows builds on the releases page, should I be looking somewhere else? My local build of main is working on my machine, though.

@cantino
Copy link
Owner

cantino commented Dec 5, 2023

@praveenperera do you know how to enable windows builds?

@cantino
Copy link
Owner

cantino commented Apr 29, 2024

Could we add usage instructions to the README @jtschuster? #400

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