From: John Gourlay Date: Sat, 5 Mar 2016 03:27:02 +0000 (-0500) Subject: Handle LilyPond version better. X-Git-Tag: release/2.19.44-1~24^2~15 X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=42b6a1852760ac7f46ce894e82a64bbe6c2cff70 Handle LilyPond version better. --- diff --git a/python/musicexp.py b/python/musicexp.py index a0b13efcc6..c2c2b1b60d 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -57,8 +57,8 @@ class Output_printer(object): def set_file (self, file): self._file = file - def dump_version (self): - self.print_verbatim ('\\version "2.19.15"') + def dump_version (self, version): + self.print_verbatim ('\\version "' + version + '"') self.newline () def get_indent (self): diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index fa6e69c0ce..7c5dc69c1a 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -2776,7 +2776,7 @@ If the given filename is -, musicxml2ly reads from the command line. action="help", help=_("show this help and exit")) - p.version = ('''%prog (LilyPond) @TOPLEVEL_VERSION@\n\n''' + p.version = ('%prog (LilyPond) ' + lilypond_version + '\n\n' + _ ("""Copyright (c) 2005--2015 by Han-Wen Nienhuys , @@ -3056,7 +3056,7 @@ def update_layout_information(): # \n\t\t\t\t\\override StringNumber #\'stencil = ##f def print_ly_preamble(printer, filename): - printer.dump_version() + printer.dump_version(lilypond_version) printer.print_verbatim('% automatically converted by philomelos musicxml2ly v0.2.41\n') printer.newline() printer.dump(r'\pointAndClickOff') @@ -3217,6 +3217,8 @@ def get_existing_filename_with_extension(filename, ext): def main(): + global lilypond_version + lilypond_version = "@TOPLEVEL_VERSION@" opt_parser = option_parser() global options