indexzero / ps-tree

MIT License
149 stars 29 forks source link

Windows support #13

Closed fritx closed 8 years ago

fritx commented 9 years ago

How do you guys think about getting this work in Windows? There is no ps command in my Windows. I'm currently trying this one: https://github.com/1j01/process-tree

indexzero commented 9 years ago

A pull-request would be welcome for this. The module you linked to has the command to run for Windows: https://github.com/1j01/process-tree/blob/master/index.coffee#L8. I'd like to setup Appveyor as well to ensure we don't break Windows in the future.

... @nelsonic what do you think?

nelsonic commented 9 years ago

@indexzero yes to Appveyor as a Windows CI tool. (I can help setup if required) @fritx if you have time to prepare a PR that would be sweet. :+1:

huan commented 8 years ago

would love to use this module if support windows... because my code need to run both linux & windows.

huan commented 8 years ago

@indexzero I had just finished a runable win32 version of ps-tree, include the following changes:

Code:

  1. use wmic.exe to simulate ps under win32 platform.
  2. map output header of wmic to ps
  3. strip the linux <defunct> from the output

Test

  1. modify istanbul command line to support win32
  2. use npm module tree-kill to replace the kill to support win32
  3. use npm module cross-env to enable set environment variable in package.json

Hope this helps. :)