I discovered that Xcode includes a diff tool called FileMerge. Where is it and how do you launch it?
Launching is easy enough:
- From Spotlight, type
filemerge
- From a terminal prompt, type
opendiff <file1> <file2>
to compare two files
But, it's not possible to add it to Applications or Launchpad. I'd rather add it, since who can remember commands nowadays?
Here's what I tried and the error I got:
- Open Finder > Applications
- Search for
filemerge
, and it'll be found in your Device somewhere (instead of in Applications) - Launch it and it'll run just fine
- Drag that to Applications
- Now if I launch it from Applications or Launchpad, I get an error, "FileMerge cannot be opened because of a problem... Check with the developer to make sure FileMerge works with this version of OS X"
Instead, this is what you do, since FileMerge.app
is part of the Xcode application bundle:
- From Finder > Applications
- Right click Xcode.app > Show Package Contents
- Navigate to Contents > Applications and there it is
- Right click Filemerge.app and select Make Alias
- Drag the alias to Applications, then delete it in the bundle (entering your password each time)
- Then under Applications, I renamed it to from FileMerge.app alias to just Filemerge.app dropping the suffix.
- And now that it shows up in Launchpad (without .app), I can move it to my "Development Tools" group.
It's got a little arrow on it too, just like a Windows Shortcut. Finally, something that makes sense.
Credit to whomever pointed it out over on Apple Support.