From 8ad8594ef42af57e9e566b3ea9b9e13f01c5dc53 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 11 Jan 2011 08:38:15 +0000 Subject: Build OSX application bundle. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2826 a436a847-0d15-0410-975c-d299462d15a1 --- Info.plist.in | 26 ++++++++++++++++++++++++++ icons/Patchage.icns | Bin 0 -> 177383 bytes wscript | 23 ++++++++++++++++++++--- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 Info.plist.in create mode 100644 icons/Patchage.icns diff --git a/Info.plist.in b/Info.plist.in new file mode 100644 index 0000000..69f8fee --- /dev/null +++ b/Info.plist.in @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + Patchage + CFBundleExecutable + patchage + CFBundleGetInfoString + @PATCHAGE_VERSION@, Copyright © 2010 David Robillard + CFBundleIconFile + Patchage + CFBundleIdentifier + net.drobilla.Patchage + CFBundleName + Patchage + CFBundlePackageType + APPL + CFBundleShortVersionString + @PATCHAGE_VERSION@ + CFBundleSignature + patc + + diff --git a/icons/Patchage.icns b/icons/Patchage.icns new file mode 100644 index 0000000..83364a2 Binary files /dev/null and b/icons/Patchage.icns differ diff --git a/wscript b/wscript index 1469022..dcfa6ee 100644 --- a/wscript +++ b/wscript @@ -109,10 +109,14 @@ def configure(conf): print def build(bld): + out_base = '' + if Options.platform == 'darwin': + out_base = 'Patchage.app/Contents/' + # Program prog = bld(features = 'cxx cxxprogram') prog.includes = ['.', 'src'] - prog.target = bld.env['APP_INSTALL_NAME'] + prog.target = out_base + bld.env['APP_INSTALL_NAME'] prog.install_path = '${BINDIR}' autowaf.use_lib(bld, prog, 'DBUS FLOWCANVAS GLADEMM DBUS_GLIB GNOMECANVASMM GTHREAD RAUL') prog.source = ''' @@ -146,12 +150,12 @@ def build(bld): prog.source += ' src/AlsaDriver.cpp ' prog.uselib += ' ALSA ' if bld.env['PATCHAGE_BINLOC']: - prog.linkflags = '-ldl' + prog.linkflags = ['-ldl'] # Glade XML UI definition bld(features = 'subst', source = 'src/patchage.glade', - target = 'patchage.glade', + target = out_base + 'patchage.glade', install_path = '${DATADIR}/' + bld.env['APP_INSTALL_NAME'], chmod = 0644, PATCHAGE_VERSION = PATCHAGE_VERSION) @@ -166,6 +170,19 @@ def build(bld): APP_INSTALL_NAME = bld.env['APP_INSTALL_NAME'], APP_HUMAN_NAME = bld.env['APP_HUMAN_NAME']) + if Options.platform == 'darwin': + # Property list + bld(features = 'subst', + source = 'Info.plist.in', + target = out_base + 'Info.plist', + install_path = '', + chmod = 0644) + + # Icons + bld(rule='cp ${SRC} ${TGT}', + source = 'icons/Patchage.icns', + target = out_base + 'Resources/Patchage.icns') + # Icons # After installation, icon cache should be updated using: # gtk-update-icon-cache -f -t $(datadir)/icons/hicolor -- cgit v1.2.1