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

Provide Windows information without FFI #35

Closed
arciisine opened this issue Jan 9, 2019 · 8 comments
Closed

Provide Windows information without FFI #35

arciisine opened this issue Jan 9, 2019 · 8 comments

Comments

@arciisine
Copy link
Contributor

I'm currently using this module in a vscode plugin, and platform specific binaries are complicated to handle. I was looking at some powershell scripts what should be able to produce the necessary information, and was wondering if you would be open to a PR that removed the use of ffi.

@arciisine
Copy link
Contributor Author

@sindresorhus
Copy link
Owner

I’m happy to add support for a fallback, but anything other than native will be very slow, especially powershell. One day Node.js will have native FFI support and all will be good.

@arciisine
Copy link
Contributor Author

Cool, I was thinking of this as a fallback, specifically for vscode plugins where I can't compile. Well send a PR in the next few days.

@sindresorhus sindresorhus changed the title Provide Windows information without ffi Provide Windows information without FFI Jan 10, 2019
@arciisine
Copy link
Contributor Author

I ended up creating a big fork, and I'm not sure if it makes sense to merge in. The biggest changes:

  • Removed the use of FFI by writing an entire C# program to produce the desired JSON output (similar to OSX). The C# program can be compiled using Mono and so can be built on non-win32 platforms.
  • Moved Linux to a separate process (like OSX, and C#)
  • Added support for multiple desktops, returning screen information (dimensions, origin, index)

@sindresorhus
Copy link
Owner

@arciisine Totally up to you. I'm happy to add you as a maintainer if you would like to maintain it here. Alternatively, we could add a link in the readme to your fork.

@arciisine
Copy link
Contributor Author

@sindresorhus I think I'm going to fork for now, given the magnitude of change. I want to make sure I have proper attribution, beyond the MIT license inclusion. Is there anything specifically you would want to see regarding acknowledgement/attribution?

@sindresorhus
Copy link
Owner

That's totally fine.

Is there anything specifically you would want to see regarding acknowledgement/attribution?

Just ensure you have proper MIT license inclusion.

@sindresorhus
Copy link
Owner

Do a PR with a link to your fork when it's out. Should be added here: https://github.com/sindresorhus/active-win#related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants