Hi!
And here's the fun part: :-)
p-69-188:~/LYX/lyx-devel vox$ src/lyx -dbg init Checking whether LyX is run in place... yes <package> binary_dir /Users/vox/LYX/lyx-devel/src/ system_support /Users/vox/LYX/lyx-devel/lib/ build_support /Users/vox/LYX/lyx-devel/lib/ user_support /Users/vox/Library/Application Support/lyx/ locale_dir /Applications/LyX.app/Contents/Resources/locale document_dir /Users/vox temp_dir /tmp home_dir /Users/vox <\package>
So system==build which probably is ok but locale points to previously installed app!
OTOH your example points to /usr/local/ ...
That's good. What is happening is that the code is compiled with a hard-coded fallback locations for some directories. Have a look at the difference between package.C.in and package.C which is generated at configure time:
$ diff -u src/support/package.C.in src/support/package.C
The difference between yours and mine is that the hard-coding is different for the configure options "--packaging=posix" and "--packaging=macosx".
p-69-188:~/LYX/lyx-devel vox$ symlink3lyx -dbg initsnip details
Same again
Excellent.
p-69-188:~/LYX/lyx-devel vox$ /Applications/LyX.app/Contents/MacOS/lyx -dbg init
/Applications/LyX.app/Contents/MacOS/lyx
Setting debug level to init
Debugging `init' (Program initialisation)
Checking whether LyX is run in place... no
<package>
binary_dir /Applications/LyX.app/Contents/MacOS/
system_support /Applications/LyX.app/Contents/Resources/lyx/
build_support
user_support /Users/vox/Library/Application Support/lyx/
locale_dir /Applications/LyX.app/Contents/Resources/locale/
document_dir /Users/vox
temp_dir /tmp
home_dir /Users/vox
<\package>
Looks ok
Indeed.
p-69-188:~/LYX/lyx-devel vox$ symlink2installedlyx -dbg init symlink2installedlyx Setting debug level to init Debugging `init' (Program initialisation) Checking whether LyX is run in place... no <package> binary_dir /Users/vox/bin/ system_support /Applications/LyX.app/Contents/Resources/lyx/ build_support user_support /Users/vox/Library/Application Support/lyx/ locale_dir /Applications/LyX.app/Contents/Resources/locale/ document_dir /Users/vox temp_dir /tmp home_dir /Users/vox <\package> Also looks ok.
So, I think that we can conclude that this package stuff hasn't broken anything other than Kayvan's reported problem when the executable is found using the PATH environment variable and the element used is relative. At least, that's what I think he's reporting ;-)
Many, many thanks for doing this Andreas. Angus