Re: Steps towards a portable LyX installation on Windows

2008-11-19 Thread Alex
 2. start lyxlauncher.exe
 
 Since there is no tex installed, obviously LyX will not have full
 functionality, but the GUI should work. However, two things give
 errors:
 
 1. configure fails because it cannot find python
 2. LyX fails to convert an EPS to a bitmap, so there is no preview

I am seeing the same python error even with a fresh installation of 1.5.7 in its
original directory... Maybe my paths are screwed up, but I'm not sure how to fix
it, and I wish LyX would do its own configuration checking ahead of time instead
of spitting out errors in the middle of doing something. 
I know this is a work in progress, but it would be more user-friendly if a
dialog or something would pop up prompting the user to help locate python or
whatever missing component LyX needs, and then update the paths accordingly for
the future.

Best wishes,
Alex




Re: Steps towards a portable LyX installation on Windows

2008-11-19 Thread Alex
 2. start lyxlauncher.exe
 
 Since there is no tex installed, obviously LyX will not have full
 functionality, but the GUI should work. However, two things give
 errors:
 
 1. configure fails because it cannot find python
 2. LyX fails to convert an EPS to a bitmap, so there is no preview

I am seeing the same python error even with a fresh installation of 1.5.7 in its
original directory... Maybe my paths are screwed up, but I'm not sure how to fix
it, and I wish LyX would do its own configuration checking ahead of time instead
of spitting out errors in the middle of doing something. 
I know this is a work in progress, but it would be more user-friendly if a
dialog or something would pop up prompting the user to help locate python or
whatever missing component LyX needs, and then update the paths accordingly for
the future.

Best wishes,
Alex




Re: Steps towards a portable LyX installation on Windows

2008-11-19 Thread Alex
> 2. start lyxlauncher.exe
> 
> Since there is no tex installed, obviously LyX will not have full
> functionality, but the GUI should work. However, two things give
> errors:
> 
> 1. configure fails because it cannot find python
> 2. LyX fails to convert an EPS to a bitmap, so there is no preview

I am seeing the same python error even with a fresh installation of 1.5.7 in its
original directory... Maybe my paths are screwed up, but I'm not sure how to fix
it, and I wish LyX would do its own configuration checking ahead of time instead
of spitting out errors in the middle of doing something. 
I know this is a work in progress, but it would be more user-friendly if a
dialog or something would pop up prompting the user to help locate python or
whatever missing component LyX needs, and then update the paths accordingly for
the future.

Best wishes,
Alex




Re: Steps towards a portable LyX installation on Windows

2008-11-18 Thread Thomas Steffen
On Mon, Nov 17, 2008 at 8:19 PM, Joost Verburg
[EMAIL PROTECTED] wrote:
 The build-in ImageMagick does not rely on registry keys but uses the
 environment variables set by LyXLauncher (see the source for details) to get
 the location of the Ghostscript directories. Note that not only @PSdelegate@
 is relevant but also the font directory etc.

Ok, I did some more tests. I was suspecting the TeX Live environment,
but it has no impact. What I did was:

1. copy the directory c:\Program\LyX16 onto the desktop of a PC
without LyX installed
2. start lyxlauncher.exe

Since there is no tex installed, obviously LyX will not have full
functionality, but the GUI should work. However, two things give
errors:

1. configure fails because it cannot find python
2. LyX fails to convert an EPS to a bitmap, so there is no preview

Is there any way to copy the error messages from LyXLauncher? The
python ones are straight forward, but the ghostscript problem looks
rather confusing - with hundreds of lines of not very helpful
messages.

As for the environment, I found an easy way to see what's going on.

1. copy lyxlauncher.exe, console.dll and system.dll to a new folder
2. add cmd.exe (from c:\windows\system32) and rename it to lyx.exe
3. start lyxlauncher -dbg any /c set

This will show the environment that lyx.exe would have.

Adding the python directory to the path before staring lyxlauncher
fixes the first problem, but EPS preview still fails.

Do you have any idea what convert could be missing?

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-18 Thread Joost Verburg

Thomas Steffen wrote:

1. configure fails because it cannot find python
2. LyX fails to convert an EPS to a bitmap, so there is no preview


This is because the directories in Resources\lyxrc.dist are wrong.

Joost



Re: Steps towards a portable LyX installation on Windows

2008-11-18 Thread Thomas Steffen
On Mon, Nov 17, 2008 at 8:19 PM, Joost Verburg
[EMAIL PROTECTED] wrote:
 The build-in ImageMagick does not rely on registry keys but uses the
 environment variables set by LyXLauncher (see the source for details) to get
 the location of the Ghostscript directories. Note that not only @PSdelegate@
 is relevant but also the font directory etc.

Ok, I did some more tests. I was suspecting the TeX Live environment,
but it has no impact. What I did was:

1. copy the directory c:\Program\LyX16 onto the desktop of a PC
without LyX installed
2. start lyxlauncher.exe

Since there is no tex installed, obviously LyX will not have full
functionality, but the GUI should work. However, two things give
errors:

1. configure fails because it cannot find python
2. LyX fails to convert an EPS to a bitmap, so there is no preview

Is there any way to copy the error messages from LyXLauncher? The
python ones are straight forward, but the ghostscript problem looks
rather confusing - with hundreds of lines of not very helpful
messages.

As for the environment, I found an easy way to see what's going on.

1. copy lyxlauncher.exe, console.dll and system.dll to a new folder
2. add cmd.exe (from c:\windows\system32) and rename it to lyx.exe
3. start lyxlauncher -dbg any /c set

This will show the environment that lyx.exe would have.

Adding the python directory to the path before staring lyxlauncher
fixes the first problem, but EPS preview still fails.

Do you have any idea what convert could be missing?

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-18 Thread Joost Verburg

Thomas Steffen wrote:

1. configure fails because it cannot find python
2. LyX fails to convert an EPS to a bitmap, so there is no preview


This is because the directories in Resources\lyxrc.dist are wrong.

Joost



Re: Steps towards a portable LyX installation on Windows

2008-11-18 Thread Thomas Steffen
On Mon, Nov 17, 2008 at 8:19 PM, Joost Verburg
<[EMAIL PROTECTED]> wrote:
> The build-in ImageMagick does not rely on registry keys but uses the
> environment variables set by LyXLauncher (see the source for details) to get
> the location of the Ghostscript directories. Note that not only @PSdelegate@
> is relevant but also the font directory etc.

Ok, I did some more tests. I was suspecting the TeX Live environment,
but it has no impact. What I did was:

1. copy the directory c:\Program\LyX16 onto the desktop of a PC
without LyX installed
2. start lyxlauncher.exe

Since there is no tex installed, obviously LyX will not have full
functionality, but the GUI should work. However, two things give
errors:

1. configure fails because it cannot find python
2. LyX fails to convert an EPS to a bitmap, so there is no preview

Is there any way to copy the error messages from LyXLauncher? The
python ones are straight forward, but the ghostscript problem looks
rather confusing - with hundreds of lines of not very helpful
messages.

As for the environment, I found an easy way to see what's going on.

1. copy lyxlauncher.exe, console.dll and system.dll to a new folder
2. add cmd.exe (from c:\windows\system32) and rename it to lyx.exe
3. start "lyxlauncher -dbg any /c set"

This will show the environment that lyx.exe would have.

Adding the python directory to the path before staring lyxlauncher
fixes the first problem, but EPS preview still fails.

Do you have any idea what convert could be missing?

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-18 Thread Joost Verburg

Thomas Steffen wrote:

1. configure fails because it cannot find python
2. LyX fails to convert an EPS to a bitmap, so there is no preview


This is because the directories in Resources\lyxrc.dist are wrong.

Joost



Steps towards a portable LyX installation on Windows

2008-11-17 Thread Thomas Steffen
Hi All

I made quite good progress producing a portable LyX installation based
on LyX 1.6.0.  What would be the best place to post the instructions?
I think wiki.lyx.org may be suitable, but it looks a bit disorganised
at the moment, and it seems that only developers have access anyway
(?).

I used texlive 2008 as my tex installation, which already provides
some portability. I follow the same basic approach as tl-portable.bat,
but add the necessary environment variables for LyX, convert and
ghostscript. Apart from one problem between the bundled convert and
the bundled ghoscript, this works really well.

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Joost Verburg

Thomas Steffen wrote:

I used texlive 2008 as my tex installation, which already provides
some portability. I follow the same basic approach as tl-portable.bat,
but add the necessary environment variables for LyX, convert and
ghostscript. Apart from one problem between the bundled convert and
the bundled ghoscript, this works really well.


The standard installer already bundles Ghostscript and ImageMagick in a 
portable way (no registry keys need to be modified).


Joost



Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Thomas Steffen
On Mon, Nov 17, 2008 at 4:03 PM, Joost Verburg
[EMAIL PROTECTED] wrote:
 The standard installer already bundles Ghostscript and ImageMagick in a
 portable way (no registry keys need to be modified).

That sounds interesting. I know that LyXLauncher does some magic, but
I was not able to figure out what it was. Is there any way to check
what LyXLauncher does to the environment?

Anyway, I have managed to put my experience down in the Wiki at
http://wiki.lyx.org/Windows/PortableInstallation . It is certainly not
easy or painless, but I think a few small changes could improve the
process significantly. Maybe the issues I had are bugs?

The first problem I had was related to the path. Ghostscript was not
really happy, and for some reason convert would not find ghostscript.
I had to do the following changes to get previews and eps-pdf
conversion working (the first three lines may or may not be necessary,
I did not test them individually):

path %LYX_DIR%python;%path%
path %LYX_DIR%bin;%path%
path %LYX_DIR%imagemagick;%path%

set GS_DIR=%LYX_DIR%ghostscript\
path %GS_DIR%bin;%path%
set GS_LIB=%GS_DIR%lib;%GS_DIR%fonts;%GS_DIR%Resource

The other issue was that convert would not recognise ghostscript. I
read that @PSdelegate@ in delegates.xml relies on registry keys, and
indeed replacing it with gswin32c.exe solved the issue. This was
necessary to get previews working for eps files.

Finally I keep getting an error message from reconfigure about
chklatex.ltx, which caused by the platex check. It seems like the
PLATEX variable is empty, and it calls the argument instead

if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1:

which is not recognised as an executable or an association.

And then there is a problem with TeX Live 2008. The new portable
function tl-portable.bat is very nice, but unfortunately it is so
inflexible that it can only start a console, and not another program.
Changing this may be easy, but it would require some advanced batch
language tricks, which is not my specialty.

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Sophie (itsme213)
Thomas Steffen 
[EMAIL PROTECTED] wrote in 
message

 That sounds interesting. I know that LyXLauncher does some magic, but
 I was not able to figure out what it was. Is there any way to check
 what LyXLauncher does to the environment?

Try Sandboxie http://www.sandboxie.com/

Hth 





Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Joost Verburg

Thomas Steffen wrote:

The other issue was that convert would not recognise ghostscript. I
read that @PSdelegate@ in delegates.xml relies on registry keys, and
indeed replacing it with gswin32c.exe solved the issue. This was
necessary to get previews working for eps files.


The build-in ImageMagick does not rely on registry keys but uses the 
environment variables set by LyXLauncher (see the source for details) to 
get the location of the Ghostscript directories. Note that not only 
@PSdelegate@ is relevant but also the font directory etc.


Joost



Steps towards a portable LyX installation on Windows

2008-11-17 Thread Thomas Steffen
Hi All

I made quite good progress producing a portable LyX installation based
on LyX 1.6.0.  What would be the best place to post the instructions?
I think wiki.lyx.org may be suitable, but it looks a bit disorganised
at the moment, and it seems that only developers have access anyway
(?).

I used texlive 2008 as my tex installation, which already provides
some portability. I follow the same basic approach as tl-portable.bat,
but add the necessary environment variables for LyX, convert and
ghostscript. Apart from one problem between the bundled convert and
the bundled ghoscript, this works really well.

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Joost Verburg

Thomas Steffen wrote:

I used texlive 2008 as my tex installation, which already provides
some portability. I follow the same basic approach as tl-portable.bat,
but add the necessary environment variables for LyX, convert and
ghostscript. Apart from one problem between the bundled convert and
the bundled ghoscript, this works really well.


The standard installer already bundles Ghostscript and ImageMagick in a 
portable way (no registry keys need to be modified).


Joost



Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Thomas Steffen
On Mon, Nov 17, 2008 at 4:03 PM, Joost Verburg
[EMAIL PROTECTED] wrote:
 The standard installer already bundles Ghostscript and ImageMagick in a
 portable way (no registry keys need to be modified).

That sounds interesting. I know that LyXLauncher does some magic, but
I was not able to figure out what it was. Is there any way to check
what LyXLauncher does to the environment?

Anyway, I have managed to put my experience down in the Wiki at
http://wiki.lyx.org/Windows/PortableInstallation . It is certainly not
easy or painless, but I think a few small changes could improve the
process significantly. Maybe the issues I had are bugs?

The first problem I had was related to the path. Ghostscript was not
really happy, and for some reason convert would not find ghostscript.
I had to do the following changes to get previews and eps-pdf
conversion working (the first three lines may or may not be necessary,
I did not test them individually):

path %LYX_DIR%python;%path%
path %LYX_DIR%bin;%path%
path %LYX_DIR%imagemagick;%path%

set GS_DIR=%LYX_DIR%ghostscript\
path %GS_DIR%bin;%path%
set GS_LIB=%GS_DIR%lib;%GS_DIR%fonts;%GS_DIR%Resource

The other issue was that convert would not recognise ghostscript. I
read that @PSdelegate@ in delegates.xml relies on registry keys, and
indeed replacing it with gswin32c.exe solved the issue. This was
necessary to get previews working for eps files.

Finally I keep getting an error message from reconfigure about
chklatex.ltx, which caused by the platex check. It seems like the
PLATEX variable is empty, and it calls the argument instead

if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1:

which is not recognised as an executable or an association.

And then there is a problem with TeX Live 2008. The new portable
function tl-portable.bat is very nice, but unfortunately it is so
inflexible that it can only start a console, and not another program.
Changing this may be easy, but it would require some advanced batch
language tricks, which is not my specialty.

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Sophie (itsme213)
Thomas Steffen 
[EMAIL PROTECTED] wrote in 
message

 That sounds interesting. I know that LyXLauncher does some magic, but
 I was not able to figure out what it was. Is there any way to check
 what LyXLauncher does to the environment?

Try Sandboxie http://www.sandboxie.com/

Hth 





Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Joost Verburg

Thomas Steffen wrote:

The other issue was that convert would not recognise ghostscript. I
read that @PSdelegate@ in delegates.xml relies on registry keys, and
indeed replacing it with gswin32c.exe solved the issue. This was
necessary to get previews working for eps files.


The build-in ImageMagick does not rely on registry keys but uses the 
environment variables set by LyXLauncher (see the source for details) to 
get the location of the Ghostscript directories. Note that not only 
@PSdelegate@ is relevant but also the font directory etc.


Joost



Steps towards a portable LyX installation on Windows

2008-11-17 Thread Thomas Steffen
Hi All

I made quite good progress producing a portable LyX installation based
on LyX 1.6.0.  What would be the best place to post the instructions?
I think wiki.lyx.org may be suitable, but it looks a bit disorganised
at the moment, and it seems that only developers have access anyway
(?).

I used texlive 2008 as my tex installation, which already provides
some portability. I follow the same basic approach as tl-portable.bat,
but add the necessary environment variables for LyX, convert and
ghostscript. Apart from one problem between the bundled convert and
the bundled ghoscript, this works really well.

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Joost Verburg

Thomas Steffen wrote:

I used texlive 2008 as my tex installation, which already provides
some portability. I follow the same basic approach as tl-portable.bat,
but add the necessary environment variables for LyX, convert and
ghostscript. Apart from one problem between the bundled convert and
the bundled ghoscript, this works really well.


The standard installer already bundles Ghostscript and ImageMagick in a 
portable way (no registry keys need to be modified).


Joost



Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Thomas Steffen
On Mon, Nov 17, 2008 at 4:03 PM, Joost Verburg
<[EMAIL PROTECTED]> wrote:
> The standard installer already bundles Ghostscript and ImageMagick in a
> portable way (no registry keys need to be modified).

That sounds interesting. I know that LyXLauncher does some magic, but
I was not able to figure out what it was. Is there any way to check
what LyXLauncher does to the environment?

Anyway, I have managed to put my experience down in the Wiki at
http://wiki.lyx.org/Windows/PortableInstallation . It is certainly not
easy or painless, but I think a few small changes could improve the
process significantly. Maybe the issues I had are bugs?

The first problem I had was related to the path. Ghostscript was not
really happy, and for some reason convert would not find ghostscript.
I had to do the following changes to get previews and eps->pdf
conversion working (the first three lines may or may not be necessary,
I did not test them individually):

path %LYX_DIR%python;%path%
path %LYX_DIR%bin;%path%
path %LYX_DIR%imagemagick;%path%

set GS_DIR=%LYX_DIR%ghostscript\
path %GS_DIR%bin;%path%
set GS_LIB=%GS_DIR%lib;%GS_DIR%fonts;%GS_DIR%Resource

The other issue was that convert would not recognise ghostscript. I
read that @PSdelegate@ in delegates.xml relies on registry keys, and
indeed replacing it with gswin32c.exe solved the issue. This was
necessary to get previews working for eps files.

Finally I keep getting an error message from reconfigure about
"chklatex.ltx", which caused by the platex check. It seems like the
PLATEX variable is empty, and it calls the argument instead

if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1:

which is not recognised as an executable or an association.

And then there is a problem with TeX Live 2008. The new portable
function tl-portable.bat is very nice, but unfortunately it is so
inflexible that it can only start a console, and not another program.
Changing this may be easy, but it would require some advanced "batch
language" tricks, which is not my specialty.

Regards,
Thomas


Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Sophie (itsme213)
"Thomas Steffen" 
<[EMAIL PROTECTED]> wrote in 
message

> That sounds interesting. I know that LyXLauncher does some magic, but
> I was not able to figure out what it was. Is there any way to check
> what LyXLauncher does to the environment?

Try Sandboxie http://www.sandboxie.com/

Hth 





Re: Steps towards a portable LyX installation on Windows

2008-11-17 Thread Joost Verburg

Thomas Steffen wrote:

The other issue was that convert would not recognise ghostscript. I
read that @PSdelegate@ in delegates.xml relies on registry keys, and
indeed replacing it with gswin32c.exe solved the issue. This was
necessary to get previews working for eps files.


The build-in ImageMagick does not rely on registry keys but uses the 
environment variables set by LyXLauncher (see the source for details) to 
get the location of the Ghostscript directories. Note that not only 
@PSdelegate@ is relevant but also the font directory etc.


Joost