On 2011-01-17, Jean-Marc Lasgouttes wrote:
> Le 17/01/2011 11:29, Joost Verburg a écrit :
>> On 1/17/2011 11:16 AM, Jean-Marc Lasgouttes wrote:
>>> The reason why I never did it after me promises is that I stopped at
>>> the question "what is LyXDir exactly?" I failed to find an answer
>>> that is useful to windows, OSX and linux.

LyXDir is the location of the "LyX library". With 1.6.x,
Help>About LyX displays it as "Libary directory".

>> I'd say the location of the executable minus the "bin" if present, e.g.
>> "C:\Program Files\LyX20" on Windows.

> OK, this would give typically:

> unix: /usr/local

However, on my unix system (Debian), LyXDir is either

  /usr/local/share/lyx-svn 
  
(for the development version with binary /usr/local/bin/lyx-svn compiled
with --with-version-prefix=svn) or

  /usr/share/lyx 
  
(for the Debian package (currently 1.6.x) with binrary
/usr/local/bin/lyx)
  
For Unix (at least for Debian), the logic is rather 

1. get the complete path of the executable (e.g. "/usr/local/bin/lyx-svn")
2. replace "bin" with "share"
3. append "/"

Günter


> mac: /Application/LyX20.app
> windows: C:\Program Files\LyX20

> This makes sense to me. Now the two possible alternatives are

> 1/ parse a special ${LyXDir} variable

> 2/ make non absolute path elements relative to this LyXDir by default

> JMarc


Reply via email to