and for Firefox specifically, the answer is: if OS X finds multiple applications that can handle an URL scheme, it will use the app with the highest version number. So, to fake out OS X, you can edit mozilla-central/browser/app/macbuild/Contents/Info.plist.in
, and change the CFBundleShortVersionString
from
<string>%APP_VERSION%</string>
to
<string>0.%APP_VERSION%</string>
This way, OS X will think the app is, say, version 0.3.2apre1, and it'll prefer the "real" version of Firefox.
A more general solution might be possible. OS X will prefer apps on a local volume to apps on a remote volume, and among local apps, it'll prefer those on the boot volume. So it might be possible to do some type of loopback mount, and keep your source code on a looped-back "volume", which again will lower its priority.
How OS X decides which app to launch for a given document or URL:
Launch Services Programming Guide: Preferred Applications