make kernel32 interop optional to support linux (and probably macOS)#1
Open
zivillian wants to merge 2 commits intoaybe:masterfrom
Open
make kernel32 interop optional to support linux (and probably macOS)#1zivillian wants to merge 2 commits intoaybe:masterfrom
zivillian wants to merge 2 commits intoaybe:masterfrom
Conversation
- replace Thread.Sleep with ResetEvent + Timer
|
I am not sure why this wasn't merged, as I understand mac support was 0 before. Native terminal may need other commands (like windows) but certainly it would be better than nothing:) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR moves all interop calls to nested
NativeMethodsto prevent the runtime from trying to load thekernel32.dllon non windows systems and also adds a few Platform checks to just skip the windows specific calls.I had to disable the console resize for the plasma demo, since this is not supported on linux.
I've succesfully tested the plasma demo with this patch under dotnet 2.1.3 running on Ubuntu 16.04.5 LTS using the latest PuTTY snapshot
Development snapshot 2018-08-26.6c924ba(True Color support was added after the latest stable release 0.70).WriteFastseems to be superflous on linux - the plasma demo produced 10MBit/s of network traffic and showed only some small artifacts.Sadly I don't own an apple device, so I was not able to test this on macOS.