Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -609,8 +609,8 @@ |
610 | 610 | * Environment check for ImageMagick and GD. |
611 | 611 | */ |
612 | 612 | public function envCheckGraphics() { |
613 | | - $names = array( 'convert', 'convert.exe' ); |
614 | | - $convert = $this->locateExecutableInDefaultPaths( $names ); |
| 613 | + $names = array( wfIsWindows() ? 'convert.exe' : 'convert' ); |
| 614 | + $convert = $this->locateExecutableInDefaultPaths( $names, array( '$1 -version', 'ImageMagick' ) ); |
615 | 615 | |
616 | 616 | if ( $convert ) { |
617 | 617 | $this->setVar( 'wgImageMagickConvertCommand', $convert ); |
— | — | @@ -888,7 +888,7 @@ |
889 | 889 | } |
890 | 890 | |
891 | 891 | foreach ( $names as $name ) { |
892 | | - $command = "$path/$name"; |
| 892 | + $command = $path . DIRECTORY_SEPARATOR . $name; |
893 | 893 | |
894 | 894 | wfSuppressWarnings(); |
895 | 895 | $file_exists = file_exists( $command ); |
— | — | @@ -899,6 +899,9 @@ |
900 | 900 | return $command; |
901 | 901 | } |
902 | 902 | |
| 903 | + if ( wfIsWindows() ) { |
| 904 | + $command = "\"$command\""; |
| 905 | + } |
903 | 906 | $file = str_replace( '$1', $command, $versionInfo[0] ); |
904 | 907 | if ( strstr( wfShellExec( $file ), $versionInfo[1]) !== false ) { |
905 | 908 | return $command; |