I know there are changes coming up to the gimp API which may break scripts in 2.7+
I'm hoping to modify my 2.6 scripts to work with 2.8, and to help I created a little helper function to check the gimp version so I can then have the code make the appropriate call.
(define (gimp-version-meets? check)
(let ((c (map string->number (strbreakup check ".")))
(v (map string->number (strbreakup (car (gimp-version)) "."))))
(if (> (car v) (car c)) #t (if (< (car v) (car c)) #f (if (> (cadr v) (cadr c)) #t (if (> (cadr v) (cadr c)) #f (if (>= (caddr v) (caddr c)) #t #f)))))))
There might be more elegant solutions then these nested if statements (Saulgoode?) but this seems to work fine.
So in a script you can use (gimp-version-meets? "2.7.1") and it will return #t if your running version of gimp is version 2.7.1 or later, and then have the appropriate calls made.
-Rob A>