From: gc Date: Sat, 1 Apr 2006 15:54:33 +0000 (+0000) Subject: defend against ruby-1.8.4 X-Git-Tag: 0.9.0~254 X-Git-Url: http://git.zarb.org/?p=booh;a=commitdiff_plain;h=68907492b97dd5df0d86901122b295a0e20c0113 defend against ruby-1.8.4 --- diff --git a/bin/booh b/bin/booh index 3aecac7..56f10f3 100755 --- a/bin/booh +++ b/bin/booh @@ -4536,6 +4536,12 @@ def create_main_window $main_window.show_all end +c = ::Config::CONFIG +if c['MAJOR'] == '1' && c['MINOR'] == '8' && c['TEENY'] == '4' + puts _("Ruby 1.8.4 was detected. This version has a severely broken REXML library. Please downgrade or upgrade ruby to a different version.") + exit(1) +end + Thread.abort_on_exception = true handle_options diff --git a/bin/booh-backend b/bin/booh-backend index 161f3d0..30aafa7 100755 --- a/bin/booh-backend +++ b/bin/booh-backend @@ -1048,7 +1048,9 @@ def walk_source_dir if images.size > 0 captions4js = find_captions(xmldir, images).collect { |e| e ? '"' + e.gsub('"', '\"') + '"' : '""' }.join(', ') thumbnailspage4js = image2thumbnailpage4js.collect { |e| "\"#{e}\"" }.join(', ') - + exifs = images.collect { |i| + utf8(`identify -format "%[EXIF:*]" #{fullpath}`.sub(/MakerNote.*\n/, '')), + } for sizeobj in $images_size html = $html_images.collect { |l| l.clone } images4js = fullscreen_images[sizeobj['name']].collect { |e| "\"#{e}\"" }.join(', ') @@ -1250,6 +1252,12 @@ def walk_source_dir msg 3, _(" all done.") end +c = ::Config::CONFIG +if c['MAJOR'] == '1' && c['MINOR'] == '8' && c['TEENY'] == '4' + puts _("Ruby 1.8.4 was detected. This version has a severely broken REXML library. Please downgrade or upgrade ruby to a different version.") + exit(1) +end + handle_options read_config check_installation