views:

57

answers:

2

I have a relatively simple application which I need to make native Mac OSX version of. I find it's easiest to learn from examples and I have never setup/developed/packaged a product on Mac yet. So, I was hoping to start from a project which has basic packaging scripts and includes as many components listed below as possible:

  • Installer build script which installs the program and makes the program run on startup.
  • Notify Icon (or whatever the Mac equivalent of a System Tray Icon is called) w/ a context menu
  • User Preference Storage (.Net equivalent of Settings files)

Anyone know of a say an open source project with those characteristics?

+2  A: 

I'm going to go out on a limb and say you're out of luck. In the few years I've been surfing the web for Cocoa-related stuff, I've rarely come across skeleton applications. Lots of sample projects, but not skeletons.

For your three requirements, you've happened to list them in order from most difficult to least.

  1. Installer build script - running on login happens one of a couple ways. Either the application can be added to the user's Login Items or you can load a launchctl script to run the application as a LaunchAgent. The first option would be much simpler and the 'proper' way to do it.

  2. That's called an NSStatusItem, and examples abound on the internet.

  3. There's a handy class called NSUserDefaults that's used for saving application settings. You can easily set and read objects into this hash-table-like object, and it will handle saving them to disk for you.

Dave DeLong
+1  A: 

Typical Mac applications don't use an installer. You distribute them on a DMG (disk image) or in a zip, the user (or the browser) mounts the DMG or unpacks the zip and the user copies the application to their Applications folder.

Ölbaum