When blogging about the Windows port, I should also have mentioned the thanks to Jesse, gedit trunk also compiles and runs on OSX. Help with the creation of an installable bundle would be warmly appreciated!
Hongli: the integration is done by a separate lib provided by imendio called ige-mac-integration. It provides some useful functions to automatically integrate the menu (+mapping key bindings to mac bindings) and handle the dock.
I’ve written a number of scripts for Banshee to create both .app and .dmg bundles, they’re fairly application agnostic, so please feel free to lift them.
Additionally I wrote a dependency build system of sorts that builds libraries, strips, and relocates them. For instance, this builds GStreamer, the Xiph stack, FLAC, etc, and makes sure the resulting binaries are relocatable inside the .app.