From 27276c35e98de40bced9dfa62cb4d4f7e1f9131d Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 3 Nov 2010 08:32:59 +0000 Subject: [PATCH] Don't hard code OSG version in packaging script --- package/mac/build-mac-nightly-dmg.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package/mac/build-mac-nightly-dmg.rb b/package/mac/build-mac-nightly-dmg.rb index 21290ec03..33198e09b 100755 --- a/package/mac/build-mac-nightly-dmg.rb +++ b/package/mac/build-mac-nightly-dmg.rb @@ -33,12 +33,16 @@ dmgPath = Dir.pwd + "/fg_mac_nightly.dmg" puts "Erasing previous image dir" `rm -rf #{dmgDir}` +osgVersion = `export PKG_CONFIG_PATH=#{prefixDir}/lib/pkgconfig; pkg-config --modversion openscenegraph` +osgVersion = osgVersion.chomp # strip trailing newlines +puts "osgVersion='#{osgVersion}'" + bundle=dmgDir + "/FlightGear.app" contents=bundle + "/Contents" macosDir=contents + "/MacOS" frameworksDir=contents +"/Frameworks" resourcesDir=contents+"/Resources" -osgPluginsDir=contents+"/PlugIns/osgPlugins-2.9.7" +osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}" volName="\"FlightGear Nightly Build\"" puts "Creating directory structure" @@ -67,7 +71,7 @@ libFile = "libOpenThreads.12.dylib" $osgPlugins.each do |p| pluginFile = "osgdb_#{p}.so" - `cp #{prefixDir}/lib/osgPlugins-2.9.7/#{pluginFile} #{osgPluginsDir}` + `cp #{prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile} #{osgPluginsDir}` fix_install_names("#{osgPluginsDir}/#{pluginFile}") end -- 2.39.5