Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm building some software for OS X that isn't distributed through the Mac App Store. My software allows users to download different modules uploaded by various people too.

How can I create a software patcher to patch my software, as well as update modules that users might be uploading when necessary? I've looked a bit into diff and patch, which come with OS X but they seem to be largely for plaintext.

Any ideas? I've been googling but I'm a bit stumped which is surprising since software patching seems to be in most applications.

share|improve this question
sam way you do in any language on any platform... – Rig Jul 12 '12 at 20:18
Yes Rig, I'm not sure how that's done exactly which is why I asked ;). – ang Jul 13 '12 at 2:27
up vote 5 down vote accepted

The bsdiff utility should come with OSX. If that can't work for you, there are other binary diff tools.

However, with the advent of high bandwidth connections, the practice of distributing binary patches is becoming much less common. You can just as easily distribute a complete updated version of your program if need be..

FURTHER: A [good] module system should not require you to patch your program whenever someone wants to download and install another user's module. I suggest a system where this is not the case. For example, have your program scan a plugins directory and load any valid plugin files found.

share|improve this answer
This is good advice, but be aware of the security risks involved in running third party plugins. – Caleb Jul 12 '12 at 21:02
@Caleb you mean "also be aware of the security..."? From what I understand the OP is going to use 3rd party code either way. I don't think I suggested a less secure method. In either case, ideally you would have a plugin submission process if security is of the utmost concern. – David Cowden Jul 12 '12 at 21:06
Right -- anytime you create a system that lets third party plugins run in your app, you open up a security hole. I certainly didn't mean that your suggestion was any less secure except insomuch as it stands a better chance of actually working than the OP's plan. – Caleb Jul 12 '12 at 21:19
Yeah, it wouldn't update the whole application every time someone's module needs updating- but I was thinking that patching their software probably follows a pretty similar path as patching our own. Thanks for pointing me towards BSDiff, I'll check it out. – ang Jul 13 '12 at 2:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.