Requesting Instruction/Tutorial for compiling to Mac and Linux from Windows.

Hi all,

I’ve been searching for a while and getting conflicting information based on the age of the post and the version of Monogame. I’ve seen people suggest tools like MonoKickstart and One click deploy while others talk about Monogame Templates that no longer exist, some say I need to install Xamarin for Windows, others say I can compile from Visual Studio, some sources say I need to compile an *.app file, while others say the *.exe works under Mono (I believe I have established the latter is the correct answer?).

Long story short, I am horrendously confused and no longer have the slightest clue what process I’m supposed to follow to release my game on Mac and Linux.

So I’d like to ask for a bit of assistance. Here’s where I’m at:

  • I have absolutely zero experience with the Linux or Mac platforms.I have never used either, and do not currently have access to either a Linux or Mac machine.Do I need this?

  • I do have friends offering to test the cross-platform release on their own machines before release. I attempted this once for mac (using Mono’s command line to run the exe) and the friend sent back an exception report I have had no luck parsing.

  • My Monogame project is 3.6 (OpenGL), upgraded from XNA 3.1 originally, currently being developed with Visual Studio 2015. It references Winforms for exception handling, but all the other libraries are custom.

  • The game itself is quite complex and uses custom shaders, render targets and at one point the HalfVector2 SurfaceFormat.But I can deal with these later if they cause graphical problems: for now I just need it to run.

So can you help me get from here to a working Mac/Linux port (or at least, a running Mac/Linux port)?

Appreciate your time,

I’ve had a lot of success with Mono’s mkbundle. Check the instructions under the Builds section of my project here for a tutorial link and a few other things I discovered while following said tutorial.

After you’ve successfully built with mkbundle, you will have a file that they can execute from the terminal like so: ./MyGame. For the other builds, you can simply replace the .exe file with the native executable for the respective platform. I’ve tested this method on both a Linux VM and hardware, and it has been very reliable. I doubt I’ve used it with any projects as complex as yours, but I’ve had no issues with multiple render targets and custom pixel shaders.

If you want to see examples of builds, check the releases on the repo I linked. If you want to test without having to dual boot or purchase new hardware, I recommend running your target platform in a VM. I hope this helps!

Does this help at all?