Linux - How to make a standalone game?

Hello!
I’m having a really hard time with Mono, MonoGame and Linux.

So, I created a game that works flawlessly on Windows, Android and WindowsPhone and now I really want to port it to Linux. To do so I manually installed mono on Linux, compiled my game in VisualStudio, moved all the files to Linux and after a few fixes everything was working fine.

However, I don’t want anyone who plays my game to manually install the mono runtime so I tried to create a standalone package by using the Kickstart template from MonoGame repo. Unfortunately it didn’t work because there were countless DLLNotFoundExceptions complaining about Mono dependencies like “libgdiplus” or “libcairo2”.

I didn’t give up and tried to bundle all the assemblies using mkbundle tool, but when I try to run the bundled application I only get this error “Corlib not in sync with this runtime: expected corlib version 111, found 96.
Loaded from: mscorlib.dll”

Does anyone here know how to make a standalone Linux game that doesn’t require manual Mono installation? Any help is welcomed!

Also, I’m using the lastest develop branch.

Why don’t you just create an installer bash script that installs mono and other needed packages? For Ubuntu it would be::

sudo apt-get install libsdl2-dev libsdl2-mixer-2.0-0 libopenal-dev libsdl-mixer1.2 mono

Also if you get errors like missing dependencies, try doing something like: “sudo apt-get install libgdiplus libcairo2” in terminal in case of Ubuntu. Also, which Linux distro are you using?

Ok, I think I’ll use your solution. Thanks.

What if you were going to release on steam?

EDIT: Or some other platform where making the user run a dependency script isn’t really an option.

So, I have few ideas on how you can solve this:

Only Steam:

  1. From what I know, steam has an auto dependency installer for every platform(for example when you install call of duty, steam will install direcx and vs redistributable if you don’t have them)

Steam and other:

  1. You can put all the needed libraries in the same folder as your game and it should try to load the libraries from the game folder first before loading them from the system
  2. You can create a launcher script that first time it starts installs dependencies and every next time it just starts the game

Other:

  1. You can build distribution specific packages (.deb, .rpm…) which can install the dependency for the user