From 4c54c5feb6927ca280d64b7b721a9d47b523ae13 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 26 Jun 2012 09:17:42 +0100 Subject: [PATCH] Skip missing OSG plugins silently in Mac packaging --- hudson_mac_package_release.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hudson_mac_package_release.rb b/hudson_mac_package_release.rb index d1cfb24..b572327 100755 --- a/hudson_mac_package_release.rb +++ b/hudson_mac_package_release.rb @@ -1,6 +1,8 @@ #!/usr/bin/ruby require 'ERB' +require 'fileutils' #I know, no underscore is not ruby-like +include FileUtils $osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB'] $osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf', 'mdl', '3ds'] @@ -84,8 +86,11 @@ libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib" $osgPlugins.each do |p| pluginFile = "osgdb_#{p}.so" - `cp #{prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile} #{osgPluginsDir}` - fix_install_names("#{osgPluginsDir}/#{pluginFile}") + sourcePath = "#{prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile}" + if File.exists?(sourcePath) + `cp #{sourcePath} #{osgPluginsDir}` + fix_install_names("#{osgPluginsDir}/#{pluginFile}") + end end # custom ALUT