From 7601ff88655ac1b6d8693ef7079a1287f34f8218 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 13 Jan 2009 00:50:01 +0100 Subject: [PATCH] Fix installing of data files --- icons/wscript_build | 14 ++++---------- wscript | 18 ++++++------------ 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/icons/wscript_build b/icons/wscript_build index 05d22639..72a2326f 100644 --- a/icons/wscript_build +++ b/icons/wscript_build @@ -11,12 +11,6 @@ def add_image (bld, category, name): if not os.access (path, os.F_OK): os.mkdir (path) - def install_files (folder, destination, source): - try: - bld.install_files (folder, destination, source) - except: - pass - rsvg_convert = bld.env['RSVG_CONVERT'] if rsvg_convert: @@ -25,8 +19,8 @@ def add_image (bld, category, name): for size in [16, 22, 32, 48]: format = str (size) + 'x' + str (size) if os.access (srcdir + '/icons/' + format + '/' + name + '.png', os.F_OK): - install_files ('DATADIR', 'icons/hicolor/' + format + '/' + category, - srcdir + '/icons/' + format + '/' + name + '.png') + bld.install_files ('${DATADIR}/icons/hicolor/' + format + '/' + category, + srcdir + '/icons/' + format + '/' + name + '.png') elif not rsvg_convert: pass elif os.access (srcdir + '/icons/scalable/' + name + '.svg', os.F_OK): @@ -36,8 +30,8 @@ def add_image (bld, category, name): ' -o ' + blddir + '/icons/' + format + '/' + name + '.png' + \ ' ' + srcdir + '/icons/scalable/' + name + '.svg' if not Utils.exec_command (command): - install_files ('DATADIR', 'icons/hicolor/' + format + '/' + category, - blddir + '/icons/' + format + '/' + name + '.png') + bld.install_files ('${DATADIR}/icons/hicolor/' + format + '/' + category, + blddir + '/icons/' + format + '/' + name + '.png') else: Utils.pprint ('BLUE', "Optimized icons could not be created.") break diff --git a/wscript b/wscript index cccd3f82..4a5a16d9 100644 --- a/wscript +++ b/wscript @@ -262,19 +262,13 @@ def build (bld): if not os.access (path, os.F_OK): os.mkdir (path) - def install_files (folder, destination, source): - try: - bld.install_files (folder, destination, source) - except: - pass - bld.add_subdirs ('katze midori icons') if option_enabled ('addons'): bld.add_subdirs ('extensions') if option_enabled ('docs'): - install_files ('DOCDIR', '/' + APPNAME + '/', \ + bld.install_files ('${DOCDIR}/' + APPNAME + '/', \ 'AUTHORS ChangeLog COPYING EXPAT README TRANSLATE') if bld.env['RST2HTML']: @@ -291,7 +285,7 @@ def build (bld): '../../../docs/user/midori.txt ' + 'midori.html' Utils.exec_command (command) os.chdir ('../../..') - install_files ('DOCDIR', '/midori/user/', blddir + '/docs/user/midori.html') + bld.install_files ('${DOCDIR}/midori/user/', blddir + '/docs/user/midori.html') if bld.env['INTLTOOL']: obj = bld.new_task_gen ('intltool_po') @@ -300,14 +294,14 @@ def build (bld): if bld.env['GTKDOC_SCAN'] and Options.commands['build']: bld.add_subdirs ('docs/api') - install_files ('DOCDIR', '/midori/api/', blddir + '/docs/api/*') + bld.install_files ('${DOCDIR}/midori/api/', blddir + '/docs/api/*') if bld.env['INTLTOOL']: obj = bld.new_task_gen ('intltool_in') obj.source = APPNAME + '.desktop.in' obj.install_path = '${DATADIR}/applications' obj.flags = '-d' - install_files ('DATADIR', 'applications', APPNAME + '.desktop') + bld.install_files ('${DATADIR}/applications', APPNAME + '.desktop') else: folder = os.path.dirname (bld.env['waf_config_files'][0]) desktop = APPNAME + '.desktop' @@ -323,7 +317,7 @@ def build (bld): after.write (line) after.close () Utils.pprint ('BLUE', desktop + '.in -> ' + desktop) - install_files ('DATADIR', 'applications', folder + '/' + desktop) + bld.install_files ('${DATADIR}/applications', folder + '/' + desktop) except: Utils.pprint ('BLUE', 'File ' + desktop + ' not generated') finally: @@ -335,7 +329,7 @@ def build (bld): ' -o ' + blddir + '/data/logo-shade.png ' + \ srcdir + '/data/logo-shade.svg' if not Utils.exec_command (command): - install_files ('DATADIR', APPNAME, blddir + '/data/logo-shade.png') + bld.install_files ('${DATADIR}/' + APPNAME, blddir + '/data/logo-shade.png') else: Utils.pprint ('BLUE', "logo-shade could not be rasterized.") -- 2.39.5