Only install extension data files if extensions are built

This commit is contained in:
Christian Dywan 2009-11-03 23:40:53 +01:00
parent 643b59eeb2
commit 3a491840f5

25
wscript
View file

@ -455,22 +455,25 @@ def build (bld):
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', blddir + '/data/logo-shade.png') bld.install_files ('${MDATADIR}/' + APPNAME + '/res', blddir + '/data/logo-shade.png')
else: else:
Utils.pprint ('BLUE', "logo-shade could not be rasterized.") Utils.pprint ('BLUE', "logo-shade could not be rasterized.")
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/error.html') bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/error.html')
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/speeddial-head.html') bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/speeddial-head.html')
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/speeddial.json') bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/speeddial.json')
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/mootools.js') bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/mootools.js')
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/autosuggestcontrol.js')
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/autosuggestcontrol.css')
# FIXME: Determine the library naming for other platforms if bld.env['addons']:
if Options.platform == 'linux': bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/autosuggestcontrol.js')
extensions = os.listdir ('data/extensions') bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/autosuggestcontrol.css')
for extension in extensions:
folder = 'lib' + extension + '.so' # FIXME: Determine the library naming for other platforms
source = 'data/extensions/' + extension + '/config' if Options.platform == 'linux':
if os.path.exists (source): extensions = os.listdir ('data/extensions')
bld.install_files ('${SYSCONFDIR}/' + APPNAME + \ for extension in extensions:
'/extensions/' + folder, source) folder = 'lib' + extension + '.so'
source = 'data/extensions/' + extension + '/config'
if os.path.exists (source):
bld.install_files ('${SYSCONFDIR}/' + APPNAME + \
'/extensions/' + folder, source)
if Options.commands['check']: if Options.commands['check']:
bld.add_subdirs ('tests') bld.add_subdirs ('tests')