Jean-Marc Lasgouttes wrote: >>> What would be wrong with setting the execute bit properly? We do >>> that for lyx2lyx, don't we? > > Angus> Nothing is wrong with doing that. If we set the executable > bit, Angus> then the code in LyX itself requires a trivial change: > > This looks good. > > Remember that you should set the executable bit before adding the > file to cvs. Or we should make sure that the executable bit is set > at install time. Does automake do that for us?
lyxpreview2bitmap.sh is already in cvs. I think that Lars has to set the executable bit for us directly. I can, of course, set the executable bit of lyxpreview2ppm.py before I commit that. > Angus> So the question now becomes, should we use just one script > Angus> (lyxpreview2ppm.py) for all users or should we continue to > use Angus> the proven lyxpreview2bitmap.sh for non-Windows users? > > How confident are you that it works? Are there differences in what > they do, or are they equivalent? They're equivalent. At least that was the aim. Both use latex, dvips, gs and, optionally, pnmcrop. The shell script uses a bunch of unix utilites. I *think* that the complete list is: basename, bc, cd, dirname, grep, ls, mv, rm, sed but I may have missed one or two. Paul Rubin found that the sed commands could cause some sed implementations to fall over. We tried to get things working on Paul's box but eventually decided that the pain was too great. The python script does all the manipulation using pure python code, so it should "just work" if you have python installed. In addition, it tries to use the Win32 API to run the external programs if the appropriate python modules are available. This will prevent the gs window from flashing up briefly when gs is used to convert the postscript file to a pile of ppm files. Am I confident it works? Well it works for me on a unix box and it works for Paul on a Win32 machine. I can't be any more or less confident than that. If you want to try it out yourself, that'd be great. The two scripts can be grabbed from http://wiki.lyx.org/pmwiki.php/LyX/InstantPreview -- Angus
