Releasing a Linux port on steam?

So, I’m on the last stages of releasing my game on steam but there still one problem I have to solve, just sending my game files to the end user isn’t enough, I have to make sure that the mono binaries are installed on the user’s computer. What is the best method to make sure everyone will be able to run my game without running into dependency problems?

You’ll likely want to bundle Mono and other dependencies so users don’t have to install it. You can use MonoKickstart for that purpose. There are some WIP instructions on how to do this stuff in a pull request on GitHub. Find those here.

1 Like

This is exactly what I was looking for!
Sadly I’m running against some problems, after following the instructions, trying to run by launching the kick script results in a System.DllNotFoundException, apparently it is still looking for libSDL2-2.0.so.0 in the x64 folder.

If I copy the lib64 folder and rename it to x64, it runs the game, but returns a new error when I try to serialize a new game save.

System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceModel.Internals, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.ServiceModel.Internals, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph) [0x00000] in <f8d2b18981224b27bedec6805b1f75a5>:0 
  at System.Runtime.Serialization.DataContractSerializer.WriteObject (System.Xml.XmlWriter writer, System.Object graph) [0x00007] in <f8d2b18981224b27bedec6805b1f75a5>:0 
  at DumaLegend.Save.SaveGame () [0x000dd] in <e22645ba6f4940328008b71fa9dce03e>:0 

Strangely enough, the game run just fine when I run it normally from terminal using mono.
Any Idea on what I’m doing wrong?

I’m not sure, but maybe it has to do with the version of the included Mono runtime. I’ve never used MonoKickstart myself.

1 Like

@Jjagg I’ll point out that those instructions are bad, do not point at them until they are finished.

Edit “MonoGame.Framework.dll.config” file if you want to change where MonoGame looks at for native libraries.

You are missing a c# system library in the mono kickstart folder, simply copy it from the system. To do so go to your mono installation dir (usually “/usr/lib/mono”), go into the folder named after version of .net framework you are using (I’m guessing “4.5”), and copy over the file named “System.ServiceModel.Internals.dll” to your mono kickstart dir.

It might have a dependency on another system lib, but the error will tell you what other library you might need.

It is working now!
In my case there was a missing System.ServiceModel.Internals.dll, I’ve also replaced all dll files for the ones from mono-complete just to make sure.

Noted!
Related question: do you have any plans for working on https://github.com/MonoGame/MonoGame.Packager in the near future? Would be great to have packaging as automated as possible.

I have a nuget package that auto packages .run Linux installer, and I think it might be a better idea to go that route.

1 Like

Could you send me that? The MonoKickstart is working but I’m still now able to run it through steam.

It’s meant for packaging an installer, it’s not usable for Steam. That being said start steam using terminal, and you’ll be able to see the error output you get when you try and launch your game.

Hmm, looks like MonoKickstart can bungle the mono dependencies really well but ignores all my .so files, the game is launching normally but it crashes every time it tries to run any of my dependencies, does anyone knows how to deal with this?

Run your game like this to see where Mono looks for the dll’s
MONO_LOG_LEVEL=debug mono MyGame.exe

This is about mono bundled in monokicstart, not system mono, that command is very unhelpful.

Use monokickstart from: GitHub - MonoGame/MonoKickstart: Kick start executable for running stand-alone distributed Mono applications , long story short you are probably missing dependency that other dependency depend on :slight_smile:

How does that matter? It will still show where Mono looks for the libs.

The problem is that the game only crashes when trying to load the dll’s if I run it through MonoKickstart, if I run the game from the terminal using the mono command, it runs normally and looks for the .dll’s and .so’s in the game folder.

I just noticed some of mine dlls are loading fine and some aren’t, FMOD and TheoraPlay loads normally under monokicstart, but Newtonsoft.Json and steamworks.Net don’t.
But as cra0zy said, it is probably that case of missing dependency that other dependency depend on.

Because system mono and monokickstart act differently (do also note that there is no mono executable in the monokickstart folder).

When you launch the game with mono command mono will try to load libs in your game folder, if not found it will try to load them from the system. That is why you can launch the game with mono command, but cannot with monokickstart.

2 Likes

Just to be clear, by that I mean there is no executable named mono in the folder.