* demo/viewer/demodir.hh.in (SCRIBO_PREFIX_BINDIR): Remove macro.
(SCRIBO_PREFIX_LIBEXECDIR): New macro.
* demo/viewer/runner.cc:
s/SCRIBO_PREFIX_BINDIR/SCRIBO_PREFIX_LIBEXECDIR/.
* demo/viewer/Makefile.am (do_subst): Substitute $libexecdir.
Signed-off-by: Roland Levillain <roland(a)lrde.epita.fr>
---
scribo/ChangeLog | 10 ++++++++++
scribo/demo/viewer/Makefile.am | 2 +-
scribo/demo/viewer/demodir.hh.in | 4 ++--
scribo/demo/viewer/runner.cc | 4 ++--
4 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 87945b8..29d33f5 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,13 @@
+2011-09-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix paths in the SCRIBO viewer.
+
+ * demo/viewer/demodir.hh.in (SCRIBO_PREFIX_BINDIR): Remove macro.
+ (SCRIBO_PREFIX_LIBEXECDIR): New macro.
+ * demo/viewer/runner.cc:
+ s/SCRIBO_PREFIX_BINDIR/SCRIBO_PREFIX_LIBEXECDIR/.
+ * demo/viewer/Makefile.am (do_subst): Substitute $libexecdir.
+
2011-09-15 Guillaume Lazzara <lazzara(a)caroussel.lrde.epita.fr>
Adjust font size in PDF reconstruction.
diff --git a/scribo/demo/viewer/Makefile.am b/scribo/demo/viewer/Makefile.am
index 0b4e17f..d79abcf 100644
--- a/scribo/demo/viewer/Makefile.am
+++ b/scribo/demo/viewer/Makefile.am
@@ -113,7 +113,7 @@ noinst_HEADERS = viewer.hh \
# Generated files
do_subst = sed \
- -e 's|@bindir[@]|$(bindir)|g' \
+ -e 's|@libexecdir[@]|$(libexecdir)|g' \
-e 's|@abs_demodir[@]|$(abs_top_builddir)/scribo/demo|g'
demodir.hh: $(srcdir)/demodir.hh.in Makefile
diff --git a/scribo/demo/viewer/demodir.hh.in b/scribo/demo/viewer/demodir.hh.in
index e8a4a23..f26189d 100644
--- a/scribo/demo/viewer/demodir.hh.in
+++ b/scribo/demo/viewer/demodir.hh.in
@@ -1,4 +1,4 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2011 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -27,7 +27,7 @@
# define SCRIBO_DEMO_DEMODIR_HH
-# define SCRIBO_PREFIX_BINDIR "@bindir@"
+# define SCRIBO_PREFIX_LIBEXECDIR "@libexecdir@"
# define SCRIBO_LOCAL_DEMODIR "@abs_demodir@"
diff --git a/scribo/demo/viewer/runner.cc b/scribo/demo/viewer/runner.cc
index 4f020ac..da2f3bf 100644
--- a/scribo/demo/viewer/runner.cc
+++ b/scribo/demo/viewer/runner.cc
@@ -41,9 +41,9 @@ QString get_pathto(const QString& file,
if (f.exists())
return SCRIBO_LOCAL_DEMODIR "/" + localdirsuffix;
- f.setFileName(SCRIBO_PREFIX_BINDIR "/" + file);
+ f.setFileName(SCRIBO_PREFIX_LIBEXECDIR "/" + file);
if (f.exists())
- return SCRIBO_PREFIX_BINDIR;
+ return SCRIBO_PREFIX_LIBEXECDIR;
qDebug() << "FATAL ERROR: Can't locate file: " + file;
--
1.7.2.5