[chora] enscript on windows

Valery Derongs valery_derongs at qvc.com
Fri Dec 7 17:41:32 UTC 2007


Hi again,

After enjoying Chora on windows with subversion I am now trying to get syntax
highlighting working.
It seems to work natively with php, but as we work with other formats I realised
it would be more flexible to configure chora for enscript.

I installed enscript from gnuwin32 in my c:\gnuwin32\ folder and it seems to
work fine when i call it fdrom the command line as follows:

C:\gnuwin32\bin\enscript --color --language=html --pretty-print -o -
c:\testClass.java

This returns me a lovely html formatted version code.

Now the problem is that chora does not pick enscript up properly.

I configured by editing mime_drivers.php.

Basically i changed 2 thing:

First, I added 'enscript' as follows:
$mime_drivers_map['horde']['registered'] = array(
    'css', 'enriched', 'html', 'images', 'ooo', 'pdf', 'php', 'plain', 'rar',
    'report', 'rfc822', 'richtext', 'security', 'simple', 'tgz', 'tnef',
    'vcard', 'zip', 
    'enscript', 
);

This part seems to work as the icons in chora are now displayed depending on the
mime/extension type (c, h, java, xml...).

And the problem happens when I have to edit the path to the enscript exec...

I have no idea what format the path should be in (I guess it should use fwd
slashes) and whatever I try doesnt work, although in different ways.

For instance with 
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript'; 

When I try to access the code, I get a line in the browser which says:
The program used to view this data type (C:/gnuwin32/bin/enscript) was not found
on the system.

However when I add the .exe as follows:
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript.exe'; 

Then I get an empty framed numbered line in the browser (with nothing else)

I have not messed with the mime types or anything else yet...I also tried other
syntax highlighters such as webcpp but with no luck either. I would prefer
enscript though as it seems easier to extend for csharp etc.

Could anyone please help me?

Cheers,
Valéry



More information about the chora mailing list