Ruby/Gosu Packaging on Mac OS X with the Ruby 1.9.1 Bundle

The Mac package of Gosu (on the Google Code Downloads list) comes with a mysterious RubyGosu App.app bundle. All you have to do to share your game with the public is following these easy steps:

  • Duplicate this bundle and open its contents via the right-click menu
  • Edit the Info.plist file, and change at least the bundle identifier.
  • Copy your game files into the Contents/Resources subfolder (Gosu libraries are not necessary, they are built in)
  • Rename your game‘s main source file to Main.rb

And you‘re done! You now have a fully functional .app bundle. The .app is a self-contained Ruby 1.9.1 (core) installation. This especially means that you need to put comments of the form # Encoding: UTF -8 on the first line of every source file that uses non-ASCII characters. If you need to use libraries other than Ruby‘s core and Gosu, see the Extending Gosu forum for advice.