[Wikitex-l] wikitex and windows
Peter Danenberg
pcd at wikitex.org
Thu Feb 9 19:21:26 CST 2006
> Is there any windows specific hack I need to to do?
I'm going to attach a message, Dr. Rajaraman, from Sal-
vatore Ingala, who actually got WikiTeX working on Windows;
would you mind confirming whether his directions work for
you?
See attached.
Best, Peter
-------------- next part --------------
> Thanks for the message, Salvatore; someone else was
> asking about Windows as well, and it appears as though
> everything which WikiTeX needs is available on Windows:
>
> dvipng http://sourceforge.net/projects/dvipng/
> LaTeX http://www.miktex.org/
> ImageMagick http://www.imagemagick.org/
> bash http://www.cygwin.com/
Well, I was missing bash :)
But this wasn't the only problem...
> It's simply a matter of someone putting everything together.
Yeah, et the very end I succeeded in making it work, but I had to modify
several things:
- In several places, I had to change the '/' used in the paths with '\\'
- In wikitex.php, I changed
$strBash = "$strRendPath/wikitex.sh %s %s %s"; // usage: wikitex FILE MODULE
OUTPATH
to
$strBash = "bash $strRendPath\\wikitex.sh %s %s %s"; // usage: wikitex FILE
MODULE OUTPATH
because in windows .sh files are not executable. Also, the row
if (!is_executable(substr($strBash, 0, strpos($strBash, ' ')))) {
was generating a parse error because it seems it's not supported under
Windows until PHP 5.0, and I've an early version.
- wikitex.sh had a problem on the row:
cd "$(dirname ${0})/tmp"
I think it failed because ${0} doesn't contain what exspected. I temporarily
resolved writing the full path, but this should of course be fixed in some
better way.
Also, this row was crashing, don't know why:
find . -name "${HASH}*" ! -name "${HASH}" ! -name "${HASH}*${EXT}" ! -name
"${HASH}${MID}" ! -name "${HASH}${MAP}" ! -name "${HASH}${CHE}" -exec rm {}
\;
so I removed it (and this is bad...)
Also, the rows using "echo" failed, I think because "echo" is a binary and
is not included with cygwin. I "solved" by deleting
echo "${STR}" > "${HASH}${CHE}"
(and this is VERY bad :-)) and changing
echo "${STR}"
to
printf "${STR}"
Now it works... but all the bad things I made to your program have to be
fixed :)
If you can suggest me alternative solutions to the rows I removed so to
delete intermediate files and reenable caching, it would be great :) (I'm
not experienced in bash scripting nor in php programming).
Now it is almost working, I must say wikitex is very fine, and if I'll make
the website I'm planning, I will use it for math and graph rendering :). As
far as you know, is there any security problem with this packages?
Regards, Spider
PS: Sorry for my bad English, but it's not my mother language :-)
More information about the Wikitex-l
mailing list