Using PHP_OS to detect OS (thanks, Greg Barnett!)

Included three binaries for mimetex ... Linux is tested but I haven't
tested the others yet
This commit is contained in:
moodler 2004-02-14 03:00:56 +00:00
parent 0f6f62cbdb
commit aaad489149
4 changed files with 11 additions and 1 deletions

BIN
filter/tex/mimetex.darwin Executable file

Binary file not shown.

BIN
filter/tex/mimetex.exe Executable file

Binary file not shown.

View file

@ -46,7 +46,17 @@
$texexp = str_replace('>','>',$texexp);
$texexp = preg_replace('!\r\n?!',' ',$texexp);
$texexp = '\Large ' . $texexp;
system("QUERY_STRING=;export QUERY_STRING;$CFG->dirroot/$CFG->texfilterdir/mimetex -d ". escapeshellarg($texexp) . " >$pathname");
switch (PHP_OS) {
case "Linux":
system("QUERY_STRING=;export QUERY_STRING;$CFG->dirroot/$CFG->texfilterdir/mimetex.linux -d ". escapeshellarg($texexp) . " >$pathname");
break;
case "Windows":
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.exe -d ". escapeshellarg($texexp) . " >$pathname");
break;
case "Darwin":
system("QUERY_STRING=;export QUERY_STRING;$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin -d ". escapeshellarg($texexp) . " >$pathname");
break;
}
}
}