mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-24 23:45:50 +03:00
[GH-ISSUE #150] Windows support? #115
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rberteig on GitHub (Mar 3, 2016).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/150
A Windows console is a (quirky) ANSI terminal, bound up behind the Windows Console API. Assuming a recorder can be made, the existing asciicast file format should be capable of representing nearly anything a Windows Console application can do. The resulting recording should be as playable as any other.
The difficult trick is the recording. Has anyone put any thought or effort into building such a recorder for a Windows console?
Would a port of asciinema to Windows be possible?
@ku1ik commented on GitHub (Mar 3, 2016):
asciinema records raw stdout output of a child process (shell by default). It doesn't "capture" the screen contents in any way. It captures what gets printed (including all escape/control sequences) and it does that using pseudo-terminal (pty).
So far I didn't find any Windows terminal supporting pty but recently I stumbled upon http://babun.github.io . The page says:
Mintty is the console used in babun.Mintty page (https://mintty.github.io) says:
Similarly to other Cygwin/MSYS terminals based on pseudo terminal ("pty") devices (...), however there's a long discussion thread about related issue: https://github.com/mintty/mintty/issues/56If someone finds a way to use pty on Windows (or something faking pty but giving us raw stdout stream) then we could approach asciinema-on-windows.
@mattn commented on GitHub (Mar 14, 2016):
Are you interesting in native cmd support?
https://asciinema.org/a/0nsiofsbhypumh6vy5jx6wuog
But currently experimental.
@ku1ik commented on GitHub (Mar 14, 2016):
@mattn whoa! Sure, I'm curious to hear how this was achieved.
@ku1ik commented on GitHub (May 20, 2016):
For anyone interested in recording on Windows, @mattn has an experimental branch here: https://github.com/mattn/asciinema/tree/windows
@jromero2k commented on GitHub (Oct 23, 2016):
Hi! Perhaps this project is useful? https://github.com/adoxa/ansicon
@andkirby commented on GitHub (Nov 29, 2016):
Guys, can I use this tool in git bash for Windows?
I.e. in MinGW. Or in Babun...
I just installed fork from https://github.com/mattn/asciinema/tree/windows but it runs
cmd.exe.@ku1ik commented on GitHub (Nov 29, 2016):
@andkirby I heard it worked in bash under Windows but haven't tried myself.
@andkirby commented on GitHub (Nov 29, 2016):
Rumors... :) Thanks.)
@masaeedu commented on GitHub (May 4, 2017):
@sickill Was this closed because it's merged or because you don't plan to support it?
@ku1ik commented on GitHub (May 4, 2017):
@masaeedu Thanks for your interest.
I don't plan to support Windows because:
At the moment I believe it's not worth it.
@ku1ik commented on GitHub (Jun 3, 2017):
asciinema installs and works perfectly fine under Win10 (WSL): https://asciinema.org/a/123255
@be5invis commented on GitHub (Oct 22, 2017):
Recording Windows terminals really need hacks, AFAIK they still support to write to the console buffer directly with MOV instructions. @miniksa
@andkirby commented on GitHub (Oct 24, 2017):
I guess, it worth it. I really would love to have it the pocket to make some video in Git Bash for Windows.
I just have lots of stuff to show. :)
@ku1ik commented on GitHub (Oct 24, 2017):
@andkirby https://github.com/asciinema/asciinema/issues/150#issuecomment-305995768
@tajmone commented on GitHub (Oct 28, 2017):
I'm following with intrest the thread on this Issue. I hope that in the future a solution might come up for supporting use of Asciinema on Window's CMD, PowerShell and Git Bash (without WSL).
In the meantime I'm dropping a few links to resources I've found that might help in that direction:
winpty
winpty is a Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs. The package consists of a library (libwinpty) and a tool for Cygwin and MSYS for running Windows console programs in a Cygwin/MSYS pty.
node-pty
forkpty(3)bindings for node.js. This allows you to fork processes with pseudoterminal file descriptors. It returns a terminal object which allows reads and writes.This is useful for:
node-pty supports Linux, macOS and Windows. Windows support is possible by utilizing the winpty library.
@ku1ik commented on GitHub (Oct 28, 2017):
@tajmone thanks for the summary of the possible options. I don't think we'll be able to use node-pty though, as asciinema is written in Python.
I'm not very much familiar with WSL - is this part of Win10, or this needs to be installed separately?
@tajmone commented on GitHub (Oct 28, 2017):
Me neither ... but from what I read, WSL can be optionally installed in Win 10, and it will then install parts from an actual Ubuntu distro. Since I already have Git Bash for Windows, which offer me all I need right now, I'd rather not install it until I know a bit more about it — WSL surely offers more tools than just Git Bash, and has a broader scope; but I guess it also takes up more space.
@fquinner commented on GitHub (Nov 21, 2017):
@tajmone @andkirby A little late, but you can set different shells with Matt's fork using
COMSPEC=cmd,COMSPEC=bashorCOMSPEC=powershell. IMHO, COMSPEC would be the right windows variable to set for this sort of function. Example outputs below:Cmd:
https://asciinema.org/a/r0UNULw8K5r0HV35kTLOatAbX
WSL Bash (launched from within standard terminal):
https://asciinema.org/a/XtLu8rh65uFekim1VbWamNcmh
Powershell:
https://asciinema.org/a/HttJNKCwM9Tb1NlVP5PFy6Ftx
Personally I think it works jolly well...
@tajmone commented on GitHub (Nov 21, 2017):
Thanks a lot @fquinner ! I've read here and there about Matt's fork but didn't realize it had reached such an operative status. The links you provided clarified the situation.
I'll defiinitely look into it!
@raghavpuri31 commented on GitHub (Dec 16, 2017):
So asciinema, didn't run on Windows cmd, right?
@joelhandwell commented on GitHub (Jan 31, 2018):
One other option is to open issue in https://github.com/Microsoft/console to add pty compatible API to cmd. Microsoft Windows Console engineering team such as @bitcrazed is on Github to listen to you.
@bitcrazed commented on GitHub (Feb 1, 2018):
What @joelhandwell said :) Thanks for suggesting this Joe, and look forward to hearing from y'all on the repo above ;)
@joelhandwell commented on GitHub (Feb 1, 2018):
@bitcrazed I went ahead and try to make an issue but already @be5invis submitted https://github.com/Microsoft/console/issues/57 ! People in this issue hopefully give a lot of 👍 to the issue and catch more Microsoft attention.
@mattn commented on GitHub (Feb 2, 2018):
If you don't want workaround or hacks, go-winpty can be used for this.
https://github.com/iamacarpet/go-winpty
@Kristinita commented on GitHub (Mar 21, 2018):
@fquinner, I'm sorry, could you write in detail, how you record these videos?
I try install and run @mattn fork on Windows, but I don't understand, how I can fix
No module named 'termios'error.Thanks.
@mattn commented on GitHub (Mar 22, 2018):
Try to build like below:
@Kristinita commented on GitHub (Mar 22, 2018):
@mattn ,
Thanks.
@mattn commented on GitHub (Mar 22, 2018):
Sorry, it was my mistake. Please try again as above.
@Kristinita commented on GitHub (Mar 31, 2018):
@mattn,
pip install asciinemawindows.Thanks.
@ku1ik commented on GitHub (Mar 31, 2018):
Please move discussion about mattn's fork installation issues to mattn's repo. Thanks! ;)
@ku1ik commented on GitHub (Mar 31, 2018):
If you'd like to discuss Windows support in general please use asciinema's discussion forum: https://discourse.asciinema.org/