From 70b26db85a8e452b9b2fb65634e21d00baf04042 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 8 Jan 2015 14:10:15 +0000 Subject: [PATCH] Add OS X metadata to make Puzzles.app searchable in Spotlight. Thanks to Stephen Norman for most of the work, particularly working out what all the metadata had to be in the first place. This patch is mostly his work, and all I've done is fiddle with the plumbing that gets the right version number into the right places. --- Buildscr | 6 ++++++ osx-info.plist | 24 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Buildscr b/Buildscr index a677531..e3997a0 100644 --- a/Buildscr +++ b/Buildscr @@ -18,6 +18,12 @@ in puzzles do perl -e 'print "\n\\versionid Simon Tatham'\''s Portable Puzzle Co in puzzles do echo '/* Generated by automated build script */' > version.h in puzzles do echo '$#define VER "Version $(Version)"' >> version.h +# And do the same substitution in the OS X metadata. (This is a bit +# icky in principle because it presumes that my version numbers don't +# need XML escaping, but frankly, if they ever do then I should fix +# them!) +in puzzles do perl -i -pe 's/Unidentified build/$(Version)/' osx-info.plist + # First build some local binaries, to run the icon build. in puzzles do perl mkfiles.pl -U in puzzles do make diff --git a/osx-info.plist b/osx-info.plist index afe6f58..50c1cc3 100644 --- a/osx-info.plist +++ b/osx-info.plist @@ -1,5 +1,5 @@ - + CFBundleIconFile @@ -8,5 +8,27 @@ Help CFBundleHelpBookName Puzzles Help + CFBundleName + Puzzles + CFBundleDisplayName + Puzzles + CFBundleExecutable + Puzzles + CFBundleVersion + Unidentified build + CFBundleShortVersionString + Unidentified build + CFBundleDevelopmentRegion + en + CFBundleIndentifier + uk.org.greenend.chiark.sgtatham.puzzles + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + NSHumanReadableCopyright + This software is copyright (c) 2004-2014 Simon Tatham