Stephen,
Thanks for the suggestions, but I am trying to do this on a Mac, so
the batch file that you suggest won't work for me.
Gerard
On Jul 14, 2006, at 3:24 AM, Steve Harris wrote:
Gerard A. Ateshian wrote:
Hi,
I am trying to run both LyX 1.4.2 (just compiled it) and 1.3.7 on
my Mac (Powerbook G4, OS X 10.4.7). I would like to be able to
start either version by simply clicking on the corresponding icon
on my desktop. However, when I do that, LyX always sets the user
directory to ~/Library/Application Support/LyX, even if my .login
shell has set LYX_USERDIR_13x to something else, like ~/Library/
Application Support/LyX-1.3. The same thing happens with LyX
1.4.2 and LYX_USERDIR_14x.
The only way I can get LyX to start with the desired user
directory is by opening a terminal shell and running LyX as a
shell command (either with -userdir or by defining the
environmental variables). Is there a simple way around this
problem, where I can start either version with its correct user
directory using a single click?
(I have found a workaround using the Automator utility in Mac OS
X, which creates a 'workflow' application that runs a shell
script. The problem is that during the entire time that LyX is
running, there is an annoying 'Workflow Running' message with a
rotating scroll appearing on the menu bar).
Any help would be appreciated.
Gerard Ateshian
I thought about this a little more.
A script can usually be made to terminate or exit,
leaving your LyX running.
I think you mean a script with a menu having two
options (with a default + pause) and you can
select one with a up or down arrow key.
The script/menu 1 choice could call a lyx.bat which has an
:end
after it has started
The script/menu 2 choice could call a lyx.bat in a
different folder and then exit. or :end
C:\lyx\bin>type lyx.bat
@echo off
if "%LANG%"=="" SET LANG=en_EN
if "%~1" == "~1" goto win95
start "LyX" "C:\lyx\bin\lyx.exe" %*
goto end
:win95
start "LyX" "C:\lyx\bin\lyx.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
:end
C:\lyx\bin>type lyx.bat
@echo off
if "%LANG%"=="" SET LANG=en_EN
if "%~1" == "~1" goto win95
start "LyX" "C:\lyx142\bin\lyx.exe" %*
goto end
:win95
start "LyX" "C:\lyx142\bin\lyx.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
:end
You could use your modify your current lyx.bat
and point it to the other path to your lyx executable.
I used C:\lyx\bin\lyx.exe and C:\lyx142\bin\lyx.exe in this example.
So either Automator can be modified to exit or you can write a
shell script and link and icon to it which requires an exit.
I think Macs come with something called "Script Menu" and
Applescript.
This might work with a single click, but not a single keystroke,
as you would need up and down arrow keys, probably. Anyway,
Bennett Helm is the LyX user list Mac expert if you don't
like the idea of having two differently named/pictured icons.
Regards,
Stephen