Re-reading everybody's answers to my queries over the last couple of weeks,
it appears that a concensus has been reached about where to put
everything:

Andreas Vox wrote:
> As a reminder, the directory structure for MacOS apps is something like:
> 
> <path to app>/
>      LyX.app/
>          Contents/
>              Info.plist
>              MacOS/
>                  lyx
>                  <other executables>
>              Resources
>                  LyX/
>                      chkconfig.ltx
>                      <more data>
>                  locale/
>                  Fonts/
>                  LyX.icns
>                  man/

Jean-Marc Lasgouttes wrote:
> Bennett> Currently LyX 1.4.0 uses /Users/NAME/Library/Preferences/LyX,
> Bennett> but ~/Application Support/LyX is fine, too.
> 
> And it is actually a better choice, since Preferences seems to be only
> for Apple-style prefs.

The above structure translates well to different LyX versions being
installed at the same time since <path to app>/LyX.app and 
~/Application Support/LyX presumably becomes <path to app>/LyX136.app and 
~/Application Support/LyX136. Etc.

Note however, that the above structure implies that the system_lyxdir,
relative to the LyX executable is "../Resources/LyX" rather than
"../Resources". That may be obvious to everyone else, but it wan't to me.

It does seem, however, that everything in "Resources/LyX" could be moved
into "Resources". Any reason why the extra directory is needed? (See the
relative_system_lyxdir() function. Why not do the same as I propose for
Windows?)

Anyway, leaving that to one side, I think that the attached
"package.tar.gz" should find everything if it were placed at 
<path to app>/LyX.app/Contents/MacOS/package. Could I get a MacOS user to
test?

To build, you'll need to something like:
$ tar xvzf package.tar.gz
$ cd package
$ g++ -g -W -Wall -I. -I$HOME/lyx/13x/boost -o package main.C \
  -L$HOME/lyx/13x/build-xforms/boost/libs/regex/src/.libs -lboostregex

Note that the stuff in the get_default_user_lyxdir() function is pure guess
work ;-p

For reference, running on a Linux machine as /home/angus/package/package:
Checking whether LyX is run in place... yes
system_lyxdir /home/angus/lib
build_lyxdir /home/angus/lib/
user_lyxdir /home/angus/.lyx/
localedir
documentdir /home/angus
tmpdir /tmp
homedir /home/angus

and "installed" as /usr/local/bin/package:
Checking whether LyX is run in place... no
system_lyxdir /usr/local/share/lyx
build_lyxdir
user_lyxdir /home/angus/.lyx/
localedir /usr/local/share/locale/
documentdir /home/angus
tmpdir /tmp
homedir /home/angus

Running under Windows as J:\MinSys\home\Angus\package\package.exe:
Checking whether LyX is run in place... yes
system_lyxdir J:/MinSYS/home/Angus/lib
build_lyxdir J:/MinSYS/home/Angus/lib/
user_lyxdir C:/Documents and Settings/Angus/Application Data/lyx/
localedir
documentdir C:/Documents and Settings/Angus/My Documents
tmpdir C:/DOCUME~1/Angus/LOCALS~1/Temp/
homedir C:/Documents and Settings/Angus

and "installed" as J:\Program Files\LyX\bin\package.exe:
Checking whether LyX is run in place... no
system_lyxdir j:/Program Files/LyX/Resources/
build_lyxdir
user_lyxdir C:/Documents and Settings/Angus/Application Data/lyx/
localedir j:/Program Files/LyX/Resources/locale/
documentdir C:/Documents and Settings/Angus/My Documents
tmpdir C:/DOCUME~1/Angus/LOCALS~1/Temp/
homedir C:/Documents and Settings/Angus

-- 
Angus

Attachment: package.tar.gz
Description: GNU Zip compressed data

Reply via email to