Skip to content

make kernel32 interop optional to support linux (and probably macOS)#1

Open
zivillian wants to merge 2 commits intoaybe:masterfrom
zivillian:linux
Open

make kernel32 interop optional to support linux (and probably macOS)#1
zivillian wants to merge 2 commits intoaybe:masterfrom
zivillian:linux

Conversation

@zivillian
Copy link

This PR moves all interop calls to nested NativeMethods to prevent the runtime from trying to load the kernel32.dll on 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).

WriteFast seems 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.

grafik

@thomasDOTwtf
Copy link

Tested on MacOS. Works for me using iTerm.
image

Doesn't work using the native MacOS terminal
image

@mitchcapper
Copy link

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:)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants