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.

  • 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 ;). – aroooo Jul 13 '12 at 2:27

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.

  • 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. – aroooo Jul 13 '12 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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