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.

Comments

kraps’s picture

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.

steven jones’s picture

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.

bdeegee’s picture

I have a need for DruTex on a windows server. Thanks!

steven jones’s picture

Title: DruTeX not portable to Windows » Make DruTeX work on Windows servers
Version: 5.x-1.x-dev » master
Category: bug » feature

Okay, when I have time I will look into this. Otherwise, feel free to make a patch :-)

cmarticus’s picture

Anyone came up with a patch or process for getting Drutex to work on windows?

Mgccl’s picture

I really wish I can test out Drutex
sadly, i'm using windows

steven jones’s picture

Assigned: Unassigned » steven jones
Status: Active » Needs work

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].tex
dvipng -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. :)

steven jones’s picture

Version: master » 5.x-2.x-dev
Status: Needs work » Active

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.

steven jones’s picture

Version: 5.x-2.x-dev » 5.x-1.x-dev

I'm going to make a point release soon, so patching against 1.x

steven jones’s picture

Status: Active » Fixed

Defaults added to 5.x-1.x

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.