Am 02.08.2013 um 12:13 schrieb Vincent van Ravesteijn <v...@lyx.org>:
> > > > On Fri, Aug 2, 2013 at 12:00 PM, Stephan Witt <st.w...@gmx.net> wrote: > > > > > > > With your patch we look for the 'tex2lyx' binary in the directory > > > <lyx_binary_dir>/tex2lyx. My latest change made it possible to also look > > > in <lyx_binary_dir>. > > > > Because of the variable naming I didn't got it. > > > > > This was needed for CMake builds and is no longer possible now. > > > > Ok, so this updated patch is correct then? > > > > Stephan > > > > > > No, because checkProg writes an entry with addToRC and it omits the path > > itself (as it probably assumes that it is in the "PATH" environment > > variable). So, our customly supplied path is lost. > > So, then our customly supplied path has to be added to PATH by LyX too > > I'd rather do something like the following: > > {{{ > env_path = os.environ["PATH"] > > .... > > for ac_dir in path + env_path: > ... > if ac_dir in path: > addToRC(rc_entry[0].replace('%%', os.path.join(path, ac_prog)) > else > addToRC(rc_entry[0].replace('%%', ac_prog) > ... > }}} > > This alters the behaviour of this function, but I don't seem to be able to > find a case where we actually use this path variable, so it might be safe to > do this. If you do so, please check whether it was actually used or not. > > Vincent I've tried this already. It ends up with illegal(?) converter lines: \converter latex lyx "/tmp/lyx-build/LyX 2.1.0dev.build/src/tex2lyx/tex2lyx -f $$i $$o" "" \converter literate lyx "/tmp/lyx-build/LyX 2.1.0dev.build/src/tex2lyx/tex2lyx -n -m noweb -f $$i $$o" "" How should the space in the path name be escaped? I think the only safe solution is to add lyx_binary_dir and lyx_binary_dir+"/tex2lyx" to PATH. Stephan