-
-
Notifications
You must be signed in to change notification settings - Fork 902
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 support? #150
Comments
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 page (https://mintty.github.io) says: If 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. |
Are you interesting in native cmd support? https://asciinema.org/a/0nsiofsbhypumh6vy5jx6wuog But currently experimental. |
@mattn whoa! Sure, I'm curious to hear how this was achieved. |
For anyone interested in recording on Windows, @mattn has an experimental branch here: https://github.com/mattn/asciinema/tree/windows |
Hi! Perhaps this project is useful? https://github.com/adoxa/ansicon |
Guys, can I use this tool in git bash for Windows? I just installed fork from https://github.com/mattn/asciinema/tree/windows but it runs |
@andkirby I heard it worked in bash under Windows but haven't tried myself. |
Rumors... :) Thanks.) |
@sickill Was this closed because it's merged or because you don't plan to support it? |
@masaeedu Thanks for your interest. I don't plan to support Windows because:
At the moment I believe it's not worth it. |
asciinema installs and works perfectly fine under Win10 (WSL): https://asciinema.org/a/123255 |
Recording Windows terminals really need hacks, AFAIK they still support to write to the console buffer directly with MOV instructions. @miniksa |
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. :) |
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: winptywinpty 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
This is useful for:
node-pty supports Linux, macOS and Windows. Windows support is possible by utilizing the winpty library. |
@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? |
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. |
@tajmone @andkirby A little late, but you can set different shells with Matt's fork using Cmd: WSL Bash (launched from within standard terminal): Powershell: Personally I think it works jolly well... |
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! |
So asciinema, didn't run on Windows cmd, right? |
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. |
What @joelhandwell said :) Thanks for suggesting this Joe, and look forward to hearing from y'all on the repo above ;) |
@bitcrazed I went ahead and try to make an issue but already @be5invis submitted microsoft/terminal#57 ! People in this issue hopefully give a lot of 👍 to the issue and catch more Microsoft attention. |
If you don't want workaround or hacks, go-winpty can be used for this. |
@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 Thanks. |
Try to build like below:
|
@mattn , D:\>go version
go version go1.10 windows/amd64
D:\>go get -d github.com/mattn/asciinema
package github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/docopt/docopt-go: cannot find package "github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/docopt/docopt-go" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\Godeps\_workspace\src\github.com\docopt\docopt-go (from $GOROOT)
C:\Users\SashaChernykh\go\src\github.com\asciinema\asciinema\Godeps\_workspace\src\github.com\docopt\docopt-go (from $GOPATH)
package github.com/asciinema/asciinema/api: cannot find package "github.com/asciinema/asciinema/api" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\api (from $GOROOT)
C:\Users\SashaChernykh\go\src\github.com\asciinema\asciinema\api (from $GOPATH)
package github.com/asciinema/asciinema/commands: cannot find package "github.com/asciinema/asciinema/commands" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\commands (from $GOROOT)
C:\Users\SashaChernykh\go\src\github.com\asciinema\asciinema\commands (from $GOPATH)
package github.com/asciinema/asciinema/util: cannot find package "github.com/asciinema/asciinema/util" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\util (from $GOROOT)
C:\Users\SashaChernykh\go\src\github.com\asciinema\asciinema\util (from $GOPATH) Thanks. |
Sorry, it was my mistake. Please try again as above. |
D:\go\src\github.com\mattn\asciinema>go build
main.go:11:2: cannot find package "github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/docopt/docopt-go" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\Godeps\_workspace\src\github.com\docopt\docopt-go (from $GOROOT)
D:\go\src\github.com\asciinema\asciinema\Godeps\_workspace\src\github.com\docopt\docopt-go (from $GOPATH)
main.go:12:2: cannot find package "github.com/asciinema/asciinema/api" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\api (from $GOROOT)
D:\go\src\github.com\asciinema\asciinema\api (from $GOPATH)
main.go:13:2: cannot find package "github.com/asciinema/asciinema/commands" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\commands (from $GOROOT)
D:\go\src\github.com\asciinema\asciinema\commands (from $GOPATH)
main.go:14:2: cannot find package "github.com/asciinema/asciinema/util" in any of:
C:\tools\go\src\github.com\asciinema\asciinema\util (from $GOROOT)
D:\go\src\github.com\asciinema\asciinema\util (from $GOPATH)
main.go:15:2: cannot find package "github.com/mattn/go-colorable" in any of:
C:\tools\go\src\github.com\mattn\go-colorable (from $GOROOT)
D:\go\src\github.com\mattn\go-colorable (from $GOPATH) Thanks. |
Please move discussion about mattn's fork installation issues to mattn's repo. Thanks! ;) |
If you'd like to discuss Windows support in general please use asciinema's discussion forum: https://discourse.asciinema.org/ |
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?
The text was updated successfully, but these errors were encountered: