From 58d68f3d10dcfa34ed9ce04e2e5aa81a70a8feca Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Tue, 5 May 2015 20:42:28 +0300 Subject: Qrc resources should be relative to the .qrc file and not the meson.build one. Closes #105. --- modules/qt4.py | 3 ++- modules/qt5.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/qt4.py b/modules/qt4.py index ebc7a13..c10eb48 100644 --- a/modules/qt4.py +++ b/modules/qt4.py @@ -83,6 +83,7 @@ class Qt4Module(): def parse_qrc(self, state, fname): abspath = os.path.join(state.environment.source_dir, state.subdir, fname) + relative_part = os.path.split(fname)[0] try: tree = ET.parse(abspath) root = tree.getroot() @@ -92,7 +93,7 @@ class Qt4Module(): mlog.log("Warning, malformed rcc file: ", os.path.join(state.subdir, fname)) break else: - result.append(os.path.join(state.subdir, child.text)) + result.append(os.path.join(state.subdir, relative_part, child.text)) return result except Exception: return [] diff --git a/modules/qt5.py b/modules/qt5.py index 5312416..be996fb 100644 --- a/modules/qt5.py +++ b/modules/qt5.py @@ -90,6 +90,7 @@ class Qt5Module(): def parse_qrc(self, state, fname): abspath = os.path.join(state.environment.source_dir, state.subdir, fname) + relative_part = os.path.split(fname)[0] try: tree = ET.parse(abspath) root = tree.getroot() @@ -99,7 +100,7 @@ class Qt5Module(): mlog.log("Warning, malformed rcc file: ", os.path.join(state.subdir, fname)) break else: - result.append(os.path.join(state.subdir, child.text)) + result.append(os.path.join(state.subdir, relative_part, child.text)) return result except Exception: return [] -- cgit v1.1