Make DruTeX work on Windows servers

danegeld - June 4, 2007 - 00:03
Project:DruTeX
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Steven Jones
Status:closed
Description

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

kraps - July 14, 2007 - 17:46

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

Steven Jones - August 28, 2007 - 05:59

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

bdeegee - September 26, 2007 - 15:58

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

#4

Steven Jones - September 26, 2007 - 17:22
Title:DruTeX not portable to Windows» Make DruTeX work on Windows servers
Version:5.x-1.x-dev» HEAD
Category:bug report» feature request

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

#5

cmarticus - October 27, 2007 - 20:38

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

#6

Mgccl - January 12, 2008 - 15:45

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

#7

Steven Jones - January 16, 2008 - 00:30
Assigned to:Anonymous» Steven Jones
Status:active» patch (code 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. :)

#8

Steven Jones - January 16, 2008 - 01:11
Version:HEAD» 5.x-2.x-dev
Status:patch (code 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.

#9

Steven Jones - March 31, 2008 - 07:26
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

#10

Steven Jones - March 31, 2008 - 08:40
Status:active» fixed

Defaults added to 5.x-1.x

#11

Anonymous (not verified) - April 14, 2008 - 08:41
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.