Make DruTeX work on Windows servers
| Project: | DruTeX |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Steven Jones |
| Status: | closed |
Jump to:
Hello
I was looking at DruTeX on windows, I think there a couple of portability issues,
I think the paths are hard coded as `/' rather than `\' ,
also on windows the latex.exe executable will not die automatically if there is no standard input.
eg latex_tools.inc line 91 has
exec('latex',$latex_output,$latex_result)
though on windows this blocks as latex waits for input. as a result the configure tab can never be opened.
This is the apache log:
[Mon Jun 04 00:11:48 2007] [error] [client 127.0.0.1] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Group\Apache2
If I change the command to
exec('latex nonexistant.tex -interaction=batchmode',....)
then the configure page becomes available, but still no output, rather "red TeX embedding failed"
probably a problem with the paths.
Please be in contact if there are people interested in getting this working.

#1
I found one solution.
In addition to your corrections,
if you installed Cygwin in your windows, e.g. "c:/cygwin/bin" is the directory
for executable files, you can change "drutex_render.inc" as follows:
Comment out line 242 : $cmd=trim($cmd)
Add the following:
if ($cmd) {
$cmd1="c:/cygwin/bin/bash -c '$cmd '";
exec($cmd1, $cmd_output, $cmd_retval);
It works fine in my website.
#2
I've never had a need to use DruTeX on a windows webserver, but if there is a demand for this then perhaps we can all do some bug testing and development toward it.
#3
I have a need for DruTex on a windows server. Thanks!
#4
Okay, when I have time I will look into this. Otherwise, feel free to make a patch :-)
#5
Anyone came up with a patch or process for getting Drutex to work on windows?
#6
I really wish I can test out Drutex
sadly, i'm using windows
#7
Okay, I did a bit of work on this. The configure page should work on all platforms, in HEAD, have a look at the dev snapshot.
The issue now is that Linux uses: ':' to separate commands on the same command line. But windows uses '&'.
Set the conversion format to 'custom' on the input format page and enter:
cd [TMP_DIR] & latex -interaction=batchmode [HASH].texdvipng -o [IMG_FILE] -D [DPI] -T tight [TMP_DIR]/[HASH].dvi
for dvipng.
This works on my machine. Please test if you have an interest. Let's get rid of bugs and get a point release out. :)
#8
Please wait for the dev snapshot of the DRUPAL-5--2 branch to show up, or test from CVS. But then if you're interested in this please test.
I'd like to add default conversion formats for windows before releasing.
#9
I'm going to make a point release soon, so patching against 1.x
#10
Defaults added to 5.x-1.x
#11
Automatically closed -- issue fixed for two weeks with no activity.