From fbaf7a2c86df9c9b5dc15c439d1b817d960640ce Mon Sep 17 00:00:00 2001 From: tux Date: Wed, 22 Nov 2023 15:28:31 +0100 Subject: [PATCH] drop lilypond pre 2.25.8 compatibility, cause its not working anyway --- all_base_includes.ly | 3 --- book_include.ly | 6 ++--- chord_settings.ly | 12 +++++----- general_include.ly | 1 + legacy-lilypond-compatibility-pre-2.25.ly | 22 ------------------ legacy-lilypond-compatibility.ly | 27 ----------------------- title_with_category_images.ly | 5 +---- 7 files changed, 9 insertions(+), 67 deletions(-) delete mode 100644 legacy-lilypond-compatibility-pre-2.25.ly delete mode 100644 legacy-lilypond-compatibility.ly diff --git a/all_base_includes.ly b/all_base_includes.ly index a31cc28..aa56a48 100644 --- a/all_base_includes.ly +++ b/all_base_includes.ly @@ -1,11 +1,8 @@ -\include #(if (< (list-ref (ly:version) 1) 24) "legacy-lilypond-compatibility.ly" "void.ly") - #(define noStandaloneOutput (if (defined? 'noStandaloneOutput) noStandaloneOutput #f)) #(if (defined? 'LAYOUT) #f (load "json_parser.scm")) #(use-modules (json parser)) \include "basic_format_and_style_settings.ly" -\include #(if (< (list-ref (ly:version) 1) 25) "legacy-lilypond-compatibility-pre-2.25.ly" "void.ly") \include "eps_file_from_song_dir.ly" \include "title_with_category_images.ly" \include "auto_rest_merging.ly" diff --git a/book_include.ly b/book_include.ly index 13c98da..ea87159 100644 --- a/book_include.ly +++ b/book_include.ly @@ -1,5 +1,3 @@ -\version "2.18" - #(define song-list '()) #(define (files-in-directory dirname) @@ -120,7 +118,7 @@ includeSong = #{ \bookOutputName #filename #} - (ly:parser-parse-string (if (< (list-ref (ly:version) 1) 19) (ly:parser-clone parser) (ly:parser-clone)) + (ly:parser-parse-string (ly:parser-clone) (ly:format "\\include \"~a/~a/~a.ly\"" songPath filename filename)) (let ((label (gensym "index"))) (set! additional-page-switch-label-list @@ -155,7 +153,7 @@ imagepage = songs = #(define-void-function (parser location) () (for-each (lambda (songitems) - (ly:book-add-bookpart! (if (< (list-ref (ly:version) 1) 19) (ly:parser-lookup parser '$current-book) (ly:parser-lookup '$current-book)) + (ly:book-add-bookpart! (ly:parser-lookup '$current-book) (let ((filename (car songitems)) (songvars (cdr songitems))) (if (eq? filename 'emptyPage) diff --git a/chord_settings.ly b/chord_settings.ly index e446f1d..9db4688 100644 --- a/chord_settings.ly +++ b/chord_settings.ly @@ -99,13 +99,11 @@ generalLayout = \layout { (interpret-markup layout props #{ \markup { \override #'(baseline-skip . 2) \center-column { - \score { \new ChordNames { #(if (< (list-ref (ly:version) 1) 19) - (ly:parser-include-string parser (string-append "\\chordmode { s4 " chord " }")) - (ly:parser-include-string (string-append "\\chordmode { s4 " chord " }")) - ) } \layout { \generalLayout } } - \override #'(fret-diagram-details . ( - (barre-type . straight))) { - \fret-diagram-terse #fret + \score { \new ChordNames { + #(ly:parser-include-string (string-append "\\chordmode { s4 " chord " }")) + } \layout { \generalLayout } } + \override #'(fret-diagram-details . ((barre-type . straight))) { + \fret-diagram-terse #fret } } } diff --git a/general_include.ly b/general_include.ly index f4f1a95..3d33341 100644 --- a/general_include.ly +++ b/general_include.ly @@ -1,3 +1,4 @@ +\version "2.25.8" #(ly:set-option 'relative-includes #t) #(define noDefaultOutput #t) diff --git a/legacy-lilypond-compatibility-pre-2.25.ly b/legacy-lilypond-compatibility-pre-2.25.ly deleted file mode 100644 index e733572..0000000 --- a/legacy-lilypond-compatibility-pre-2.25.ly +++ /dev/null @@ -1,22 +0,0 @@ -% guile regular expressions aktivieren: -#(use-modules (ice-9 regex)) - -#(define ly:make-regex make-regexp) -#(define ly:regex-exec regexp-exec) -#(define ly:regex-match-substring match:substring) -#(define (ly:regex-replace pattern text . replacements) - (apply regexp-substitute/global #f pattern text 'pre (append replacements (list 'post)))) - - -% old font handling - -#(define (default-pango size) - (make-pango-font-tree - songChordFont - songLyricFont - "Luxi Mono" - (/ size 20))) - -\paper { - #(define fonts (default-pango globalSize)) -} diff --git a/legacy-lilypond-compatibility.ly b/legacy-lilypond-compatibility.ly deleted file mode 100644 index ea6659e..0000000 --- a/legacy-lilypond-compatibility.ly +++ /dev/null @@ -1,27 +0,0 @@ -% this is to be compatible to older lilypond versions -\version "2.18.0" - -#(define (on-first-page layout props) - "Whether the markup is printed on the first page of the book." - (= (chain-assoc-get 'page:page-number props -1) - (book-first-page layout props))) - -#(define-markup-command (if layout props condition? argument) - (procedure? markup?) - #:category conditionals - (if (condition? layout props) - (interpret-markup layout props argument) - empty-stencil)) - -#(define (on-first-page-of-part layout props) - "Whether the markup is printed on the first page of the book part." - (= (chain-assoc-get 'page:page-number props -1) - (ly:output-def-lookup layout 'first-page-number))) - -#(define (should-print-page-number layout props) - "Whether the page number should be printed on this page. This depends -on the settings @code{print-@/page-@/numbers} and -@code{print-@/first-@/page-@/number} of the @code{\\paper} block." - (and (eq? #t (ly:output-def-lookup layout 'print-page-number)) - (or (not (on-first-page layout props)) - (eq? #t (ly:output-def-lookup layout 'print-first-page-number))))) diff --git a/title_with_category_images.ly b/title_with_category_images.ly index 3a04dd1..5f6ab81 100644 --- a/title_with_category_images.ly +++ b/title_with_category_images.ly @@ -35,10 +35,7 @@ (string-tokenize (chain-assoc-get 'header:categories props "")))) (make-null-markup)))) -#(define pdf-encode - (if (< (list-ref (ly:version) 1) 24) - ly:encode-string-for-pdf - (@@ (lily framework-ps) pdf-encode))) +#(define pdf-encode (@@ (lily framework-ps) pdf-encode)) % PDF tags #(define-markup-command (title-to-pdf-toc layout props title) (string?) (ly:make-stencil