summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-11 08:38:15 +0000
committerDavid Robillard <d@drobilla.net>2011-01-11 08:38:15 +0000
commit8ad8594ef42af57e9e566b3ea9b9e13f01c5dc53 (patch)
tree45be5c8b5be8ae47e7ff7c950996a3545a3f3498 /wscript
parenta1a115077fec38383d86e59229b1059de0493c75 (diff)
downloadpatchage-8ad8594ef42af57e9e566b3ea9b9e13f01c5dc53.tar.gz
patchage-8ad8594ef42af57e9e566b3ea9b9e13f01c5dc53.tar.bz2
patchage-8ad8594ef42af57e9e566b3ea9b9e13f01c5dc53.zip
Build OSX application bundle.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2826 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript23
1 files changed, 20 insertions, 3 deletions
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