Index: trunk/extensions/Score/Score.i18n.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | 'score-noabcinput' => 'ABC source file $1 could not be created.', |
42 | 42 | 'score-nofactory' => 'Failed to create LilyPond factory directory.', |
43 | 43 | 'score-noinput' => 'Failed to create LilyPond input file $1.', |
| 44 | + 'score-nomidi' => 'No MIDI file generated despite being requested. If you are working in raw LilyPond mode, make sure to provide a proper \midi block.', |
44 | 45 | 'score-nooutput' => 'Failed to create LilyPond image directory $1.', |
45 | 46 | 'score-notexecutable' => 'Could not execute LilyPond: $1 is not an executable file. Make sure <code>$wgLilyPond</code> is set correctly.', |
46 | 47 | 'score-page' => 'Page $1', |
— | — | @@ -66,6 +67,7 @@ |
67 | 68 | 'score-noabcinput' => 'Displayed if an ABC source file could not be created for lang="ABC". $1 is the path to the file that could not be created.', |
68 | 69 | 'score-nofactory' => 'Displayed if the LilyPond/ImageMagick working directory cannot be created.', |
69 | 70 | 'score-noinput' => 'Displayed if the LilyPond input file cannot be created. $1 is the path to the input file.', |
| 71 | + 'score-nomidi' => 'Displayed if MIDI file generation was requested but no MIDI file was generated.', |
70 | 72 | 'score-nooutput' => 'Displayed if the LilyPond image/midi dir cannot be created. $1 is the name of the directory.', |
71 | 73 | 'score-notexecutable' => 'Displayed if LilyPond binary cannot be executed. $1 is the path to the LilyPond binary.', |
72 | 74 | 'score-page' => 'The word "Page" as used in pagination. $1 is the page number', |
Index: trunk/extensions/Score/Score.body.php |
— | — | @@ -351,6 +351,9 @@ |
352 | 352 | if ( $rc2 != 0 ) { |
353 | 353 | self::throwCallException( wfMessage( 'score-compilererr' ), $output ); |
354 | 354 | } |
| 355 | + if ( $options['midi'] && !file_exists( $factoryMidi ) ) { |
| 356 | + throw new ScoreException( wfMessage( 'score-nomidi' ) ); |
| 357 | + } |
355 | 358 | |
356 | 359 | /* trim output images if wanted */ |
357 | 360 | if ( $wgScoreTrim ) { |