Bennett Helm wrote:
I want to eliminate the installer for LyX/Mac. To this end, I have
created a shell script that will:
Is the idea that this shell script runs instead of the LyX executable?
I.e., that this will run every time someone wants to run LyX? If so,
that seems like a lot to do each and every such time. Not that it will
take forever, but just that it seems like a bit of a waste. Isn't there
some way to have this done, say, by configure? And what if someone
wanted to delete the examples?
One other small thing. Instead of the repeated directory creation stuff,
what about something like this:
function mkpath {
base=shift;
for dir in $*; do
base="$base/$dir";
if test -d $base; then continue; fi
mkdir $base;
done
}
to be called as:
mkpath ${HOME}/Library texmf tex latex lyx;
Not tested, though.
rh
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