I want to eliminate the installer for LyX/Mac. To this end, I have created a shell script that will:

1. Test if the user's directory exists, and if not then: create a new user's directory, copy files from the old one (if it exists), and clean up the preferences file, mostly to point to the new user's directory.

2. Remove some obsolete files (from ancient LyX/Mac versions).

3. Test if templates, examples, and tex directories in LyX.app are newer than those in the user's directory/texmf directory; if so, copy the newer files into the right locations:

  * ~/Library/Application Support/LyX-1.5/examples/default
  * ~/Library/Application Support/LyX-1.5/templates/default
  * ~/Library/texmf/tex/latex/lyx

I think the attached script does the trick. It goes into .../LyX.app/ Contents/MacOS/ and should be named "lyx". For it to work, the lyx executable must be renamed "lyx-app", and LyX.app/Contents/Info.plist needs to have the CFBundleExecutable changed from "lyx" to "lyx-app".

Assuming this works, I'd need some help integrating it into the build system, since it assumes the LyX executable is named "lyx-app", which currently is not true and ignores program-prefix/suffix settings.

Any comments on this?

Bennett


Attachment: lyx
Description: Binary data

Reply via email to