Luke Stutters wrote:

The ImageMagick image conversion did not work properly at first because there is another 'convert.exe' in the PATH by default. In order to get round this, I renamed the ImageMagick file to 'convert2.exe' and changed lyx\share\lyx\scripts\convertDefault.sh to run 'convert2' instead. This fixed the image conversion which makes inserting images a lot more convenient than before. Is there a better way to fix this?

Most people just move the ImageMagick bin directory ahead of the Windows system directories on the command path. (For Win 2K/XP, right click on "My Computer", select Properties, Advanced tab, Environment Variables button, highlight Path in the lower window, click edit <pause for breath> and manually edit the path. I'm still waiting for someone to report what happens when a program tries to run the Windows convert.exe and bumps into the ImageMagick version instead. (Hopefully programs that need Windows's convert look directly in the system directory for it. Or else have a sense of humor.)


In any case, it didn't work out of the box and I think most people would just give up on it. Surely a script could do this for the user automatically?

Tricky business. Scripts run in command windows, in which they're given a copy of the environment variables (including the path). Modifying the path in a script modifies the local copy, not the master path. I'm pretty sure (but not positive) it can be done by modifying the registry, assuming that your antivirus software doesn't block that as bad behavior. To be sure you had the right directory (not everyone installs to the default choice), you'd have to grab the IM directory from a registry key.


Scripting your approach (renaming the .exe file) would be easier, but still not fool-proof. Again, it's possible that an AV program might block that sort of behavior. Moreover, while I'm not positive about this, I think that if an .exe file is in use (or maybe even was recently used), the OS may block you from renaming the executable. You could still try, and spit out a message to the user if you failed.

For now, I'd vote for instructions posted on the Wiki.

-- Paul

******************************************************************************************
Paul A. Rubin Phone: (517) 432-3509
Department of Management Fax: (517) 432-1111
The Eli Broad Graduate School of Management E-mail: [EMAIL PROTECTED]
Michigan State University http://www.msu.edu/~rubin/
East Lansing, MI 48824-1122 (USA)
******************************************************************************************
Mathematicians are like Frenchmen: whenever you say something to them,
they translate it into their own language, and at once it is something
entirely different. J. W. v. GOETHE




Reply via email to