Page 1 of 1

changes to captchasrv for running in MS Windows

PostPosted: Thu Aug 30, 2007 12:55 pm
by josh
(I'm copying this over from the source forge support area):



Running captchasrv on Windows:

(a) You must have perl installed.
(b) One little modification is required in captchasrv.pl:

On line 312 where the commandstring for executing
convert is builded, change
the ' to " for the command-option arguments:
change ' to " for the argument of the fill option
change ' to " for the argument of the draw option

(Don't forget to escape with backslashes.)

From:

$cmdstr = ConvertExec . " -fill '#" . FillColor . "' " .
" -affine " . MagFactor . "," . InclFactor . "," .
SlantFactor . "," .
MagFactor . ",0,0" .
" -font " . FontFn . " -draw 'text 1,10 $quizword' " .
" -blur " . BlurFactor . " $TmpFn -";

To:

$cmdstr = ConvertExec . " -fill \"#" . FillColor . "\" " .
" -affine " . MagFactor . "," . InclFactor . "," .
SlantFactor . "," .
MagFactor . ",0,0" .
" -font " . FontFn . " -draw \"text 1,10 $quizword\" "
.
" -blur " . BlurFactor . " $TmpFn -";


I don't know if this breaks unix compatibility, maybe
someone can test it.


Greetings
Christoph

PostPosted: Thu Aug 30, 2007 2:44 pm
by SysKoll
Doesn't seem to break Unix compatibility. The quoting is changed from single to double quote, which is OK.