From cd88c51ccea0f7495c8448d41aca7148bae53030 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sat, 30 Mar 2013 14:41:30 +0100 Subject: [PATCH] Pass the binary dir to the configure script to find tex2lyx When using CMake, the binary files are stored in /bin. LyX can't fin tex2lyx with the current code. So, we have to point configure.py to explicitly look in the binary dir. --- lib/configure.py | 9 ++++++++- src/support/Package.cpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 47e91dacd1..2a6b80eecd 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -652,7 +652,10 @@ def checkConverterEntries(): in_place = os.path.join(srcdir, '..', 'src', 'tex2lyx', 'tex2lyx') in_place = os.path.abspath(in_place) - path, t2l = checkProg('a LaTeX/Noweb -> LyX converter', [in_place, 'tex2lyx' + version_suffix, 'tex2lyx'], + in_binary_dir = os.path.join(lyx_binary_dir, 'tex2lyx') + in_binary_dir = os.path.abspath(in_binary_dir) + + path, t2l = checkProg('a LaTeX/Noweb -> LyX converter', [in_place, in_place + version_suffix, in_binary_dir, in_binary_dir + version_suffix, 'tex2lyx' + version_suffix, 'tex2lyx'], rc_entry = [r'''\converter latex lyx "%% -f $$i $$o" "" \converter literate lyx "%% -n -m noweb -f $$i $$o" ""'''], not_found = 'tex2lyx') if path == '': @@ -1394,6 +1397,7 @@ if __name__ == '__main__': rc_entries = '' lyx_keep_temps = False version_suffix = '' + lyx_binary_dir = '' ## Parse the command line for op in sys.argv[1:]: # default shell/for list is $*, the options if op in [ '-help', '--help', '-h' ]: @@ -1404,6 +1408,7 @@ Options: --without-kpsewhich do not update TeX files information via kpsewhich --without-latex-config do not run LaTeX to determine configuration --with-version-suffix=suffix suffix of binary installed files + --binary-dir=directory directory of binary installed files ''' sys.exit(0) elif op == '--without-kpsewhich': @@ -1414,6 +1419,8 @@ Options: lyx_keep_temps = True elif op[0:22] == '--with-version-suffix=': # never mind if op is not long enough version_suffix = op[22:] + elif op[0:13] == '--binary-dir=': + lyx_binary_dir = op[13:] else: print "Unknown option", op sys.exit(1) diff --git a/src/support/Package.cpp b/src/support/Package.cpp index bd4fcfda24..c2fb90b82c 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -141,7 +141,7 @@ Package::Package(string const & command_line_arg0, FileName const configure_script(addName(system_support().absFileName(), "configure.py")); configure_command_ = os::python() + ' ' + quoteName(configure_script.toFilesystemEncoding(), quote_python) + - with_version_suffix(); + with_version_suffix() + " --binary-dir=" + binary_dir().absFileName(); LYXERR(Debug::INIT, "\n" << "\tbinary_dir " << binary_dir().absFileName() << '\n' -- 2.39.2