Re: Start LyX 1.3.7 and 1.4.2 with custom user directory using single click on a Mac?

2006-07-14 Thread Gerard A. Ateshian

Bennett,

Great, thanks for the tip.   I'll try recompiling, and if it doesn't  
work for some reason, I'll wait for your installer!


Gerard

On Jul 14, 2006, at 8:29 AM, <[EMAIL PROTECTED]> wrote:


On Fri, 14 Jul 2006 00:55:28 -0400
 "Gerard A. Ateshian" <[EMAIL PROTECTED]> 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.


The problem is that you did not set --with-version-suffix=-1.4 when  
you compiled LyX; this will produce a user dir of LyX-1.4,  
appropriately located in your ~/Library/Application Support/ folder  
(on Mac). You can either reconfigure and recompile LyX (which  
wouldn't take long) or you can wait for my LyX/Mac installer, which  
(hopefully!) will be out today. [I've been away and came back to a  
crashed hard drive, so it's taking me a while before I can even  
start producing it.]


Bennett




Re: Start LyX 1.3.7 and 1.4.2 with custom user directory using single click on a Mac?

2006-07-14 Thread Gerard A. Ateshian

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




Re: Start LyX 1.3.7 and 1.4.2 with custom user directory using single click on a Mac?

2006-07-14 Thread bhelm

On Fri, 14 Jul 2006 00:55:28 -0400
 "Gerard A. Ateshian" <[EMAIL PROTECTED]> 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.


The problem is that you did not set 
--with-version-suffix=-1.4 when you compiled LyX; this 
will produce a user dir of LyX-1.4, appropriately located 
in your ~/Library/Application Support/ folder (on Mac). 
You can either reconfigure and recompile LyX (which 
wouldn't take long) or you can wait for my LyX/Mac 
installer, which (hopefully!) will be out today. [I've 
been away and came back to a crashed hard drive, so it's 
taking me a while before I can even start producing it.]


Bennett


Re: Start LyX 1.3.7 and 1.4.2 with custom user directory using single click on a Mac?

2006-07-13 Thread Steve Harris

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 use Windows with 4 versions of LyX installed, and used
a different icon for each version, appropriately renamed.
Each one is linked to its own lyx.exe and preferences folder.
I would be very surprised if there is another way to do it.

Regards,
Stephen


Start LyX 1.3.7 and 1.4.2 with custom user directory using single click on a Mac?

2006-07-13 Thread Gerard A. Ateshian

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