endif
dist_noinst_DATA += lyx.desktop.in images/lyx.svg images/lyx.png
+exampleandtemplate_files = \
+ $(dist_caexamples_DATA) \
+ $(dist_csexamples_DATA) \
+ $(dist_daexamples_DATA) \
+ $(dist_deexamples_DATA) \
+ $(dist_elexamples_DATA) \
+ $(dist_esexamples_DATA) \
+ $(dist_euexamples_DATA) \
+ $(dist_faexamples_DATA) \
+ $(dist_frexamples_DATA) \
+ $(dist_glexamples_DATA) \
+ $(dist_heexamples_DATA) \
+ $(dist_huexamples_DATA) \
+ $(dist_idexamples_DATA) \
+ $(dist_itexamples_DATA) \
+ $(dist_jaexamples_DATA) \
+ $(dist_koexamples_DATA) \
+ $(dist_nlexamples_DATA) \
+ $(dist_plexamples_DATA) \
+ $(dist_ptexamples_DATA) \
+ $(dist_roexamples_DATA) \
+ $(dist_ruexamples_DATA) \
+ $(dist_slexamples_DATA) \
+ $(dist_skexamples_DATA) \
+ $(dist_srexamples_DATA) \
+ $(dist_svexamples_DATA) \
+ $(dist_springerexamples_DATA) \
+ $(dist_thesisexamples_DATA) \
+ $(dist_ukexamples_DATA) \
+ $(dist_examples_DATA) \
+ $(dist_templates_DATA)
+
install-data-hook:
$(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/configure.py
for i in $(DESTDIR)$(scriptsdir)/*.py $(DESTDIR)$(scriptsdir)/listerrors ; do \
$(CHMOD) 755 $$i; \
done
+ for i in $(exampleandtemplate_files); do \
+ if $(EGREP) -q "^\\\\origin " "$(DESTDIR)$(pkgdatadir)/$$i"; then \
+ origin=`dirname "/systemlyxdir/$$i"`/; \
+ sed -e "s|^\\\\origin .*|\\\\origin $$origin|" \
+ "$(DESTDIR)$(pkgdatadir)/$$i" > "$(DESTDIR)$(pkgdatadir)/$$i.tmp"; \
+ mv -f "$(DESTDIR)$(pkgdatadir)/$$i.tmp" "$(DESTDIR)$(pkgdatadir)/$$i"; \
+ chmod 644 "$(DESTDIR)$(pkgdatadir)/$$i"; \
+ fi; \
+ done
alltests: check alltests-recursive
install-data-hook:
for i in $(doc_files); \
do \
- if $(EGREP) -q "LYX_DIR_VER|LYX_USERDIR_VER|^\\origin " "$(DESTDIR)$(docdir)/$$i"; then \
- origin=`dirname "$(docdir)/$$i"`/; \
+ if $(EGREP) -q "LYX_DIR_VER|LYX_USERDIR_VER|^\\\\origin " "$(DESTDIR)$(docdir)/$$i"; then \
+ origin=`dirname "/systemlyxdir/doc/$$i"`/; \
sed -e "s/LYX_DIR_VER/$(LYX_DIR_VER)/g" \
-e "s/LYX_USERDIR_VER/$(LYX_USERDIR_VER)/g" \
-e "s|^\\\\origin .*|\\\\origin $$origin|" \
#include "support/gettext.h"
#include "support/Messages.h"
#include "support/mutex.h"
+#include "support/Package.h"
#include "support/Translator.h"
#include "support/lstrings.h"
} else if (token == "\\origin") {
lex.eatLine();
origin = lex.getString();
+ string const sysdirprefix = "/systemlyxdir/";
+ if (prefixIs(origin, sysdirprefix)) {
+ origin.replace(0, sysdirprefix.length() - 1,
+ package().system_support().absFileName());
+ }
} else if (token == "\\begin_preamble") {
readPreamble(lex);
} else if (token == "\\begin_local_layout") {
// Prints out the buffer info into the .lyx file given by file
// the document directory
- os << "\\origin "
- << (lyxrc.save_origin ? buf->filePath() : "unavailable") << '\n';
+ string filepath = buf->filePath();
+ string const sysdir = package().system_support().absFileName();
+ if (prefixIs(filepath, sysdir))
+ filepath.replace(0, sysdir.length(), "/systemlyxdir/");
+ else if (!lyxrc.save_origin)
+ filepath = "unavailable";
+ os << "\\origin " << filepath << '\n';
// the textclass
os << "\\textclass " << buf->includedFilePath(addName(buf->layoutPos(),