[Solved] Runnable file on OSX MKBundle

Hi,

I have a noob question: Apogees in advanced if I’m in the wrong place and for bothering you all fine folks. I made a executable x86_64 for OS X with MKBundle using this guide https://www.mono-project.com/docs/tools+libraries/tools/mkbundle/ and it works great if i type ./MyFile but if i try to run it from finder using the terminal it fails to load the dll files in the folder.

Its like its not running from the path. If i copy the path and past it in a new terminal window it works. Am i missing something obvious? or do i have the same problem as this: Failed to load SDL library when running game on Mac

If so is my only option to compile monogame?
How do you all make a release version of your Monogame projects on OS X?

Hi Gronk,
The only piece of the puzzle you should be missing is a small script to put in the “./” for you. This gives your application the “kick” that it needs to launch successfully, and is also used by Monokickstart and some other Mac apps.

You can use this script which I modified from Ethan Lee’s Monokickstart file for your use. ./MyFile is already referenced. Copy that text and save it as a file with no extension, with a name you’ll remember like MyFileLaunch. You can now double-click on that to launch your game.

I mentioned this in the comments for that file, but you will be moving this and your other game files around once you finish and publish your game as a .app. You’ll be renaming the file I gave you to main.command and it will auto-execute when your user clicks on your published MyFile.app, launches it from Steam, etc. The kick script also launches silently once it’s in a .app, no more pesky Terminal window popping up for your users.

I’m planning on writing a tutorial for MKBundle and packaging a Mac .app someday, I should get around to it in a few months, or sooner if you need help with it.

1 Like

Aaaah i was so close :slight_smile:

Thank you!