Closed ghost closed 5 years ago
It should be Linux ready, I just have no easy way to test it yet at the moment. It is MacOS compatible so it shoooould be Linux compatible since they both just use Unix pipes.
@Lachee Ok. For testing you can just install MonoDevelop on a Linux VM. I would recommend either Ubuntu or Debian for that purpose
I think the C++ version of Discord's official library has native mono support built in. The thing is though, to use the C++ binary in C#, the DllImport
attribute only works on Windows, and 32bit processes at that.
I think the C++ version of Discord's official library has native mono support built in. The thing is though, to use the C++ binary in C#, the
DllImport
attribute only works on Windows, and 32bit processes at that.
Its possible. You just import the discord-rpc .so file with DllImport and it does work. https://www.mono-project.com/docs/advanced/pinvoke/
I think the C++ version of Discord's official library has native mono support built in. The thing is though, to use the C++ binary in C#, the
DllImport
attribute only works on Windows, and 32bit processes at that.Its possible. You just import the discord-rpc .so file with DllImport and it does work. https://www.mono-project.com/docs/advanced/pinvoke/
This library doesnt use the discord-rpc.so. Its a managed library written entirely in C# using managed named pipes. It should just work directly with Mono. The only use of DllImport
is for the Unity Package and isn't in the actual DiscordRPC.dll
.
@Lachee I know. What im saying is that in case it wouldnt work with mono directly you could just make a c# wrapper of the c++ library
Hey guys, I would love to help you with testing, on my current Linux setup the log produces some errors:
INFO: Attempting a new connection
INFO: Attempting to connect to /run/user/1000/discord-ipc-0
ERR : Failed connection to /run/user/1000/discord-ipc-0. Asynchronous pipe mode is not supported
WARN: Tried to close a already closed pipe.
INFO: Attempting to connect to /run/user/1000/discord-ipc-1
ERR : Failed connection to /run/user/1000/discord-ipc-1. Asynchronous pipe mode is not supported
WARN: Tried to close a already closed pipe.
And etc, all pipes fail.
@egordorichev Thank you. This is exactly what i meant. It might be fixable but if it isnt, the simplest solution is too make a wrapper for the c++ library
@Lachee could you look into it? (@egordorichev's test)
Moved to a new issue.
For what it's worth, on my Linux system it works out of the box now.
Mono 5.18.1 x64, fwiw.
If it works in the original discord-rpc library made in c++ why wouldnt it work in c#.
Just make a seperate thingy designed for the Linux operating system.
I belive in you.