Different approach to running osgversion during Mac packaging.
This commit is contained in:
parent
2c721a2db7
commit
9cd3adb3a5
2 changed files with 13 additions and 10 deletions
|
@ -5,10 +5,17 @@ require 'ERB'
|
||||||
$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
|
$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
|
||||||
$osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf']
|
$osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf']
|
||||||
|
|
||||||
osgVersion = `./run-osgversion --version-number`
|
def runOsgVersion(option)
|
||||||
puts "osgVersion='#{osgVersion}'"
|
env = "export DYLD_LIBRARY_PATH=#{Dir.pwd}/dist/lib"
|
||||||
$osgSoVersion=`./run-osgversion --so-number`
|
bin = Dir.pwd + "/dist/bin/osgversion"
|
||||||
$openThreadsSoVersion=`./run-osgversion --openthreads-soversion-number`
|
return `#{env}; #{bin} --#{option}`.chomp
|
||||||
|
end
|
||||||
|
|
||||||
|
osgVersion = runOsgVersion('version-number')
|
||||||
|
$osgSoVersion=runOsgVersion('so-number')
|
||||||
|
$openThreadsSoVersion=runOsgVersion('openthreads-soversion-number')
|
||||||
|
|
||||||
|
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
|
||||||
|
|
||||||
$alutSourcePath='/Library/Frameworks/ALUT.framework'
|
$alutSourcePath='/Library/Frameworks/ALUT.framework'
|
||||||
|
|
||||||
|
@ -21,7 +28,7 @@ def fix_install_names(object)
|
||||||
`install_name_tool -change #{oldName} #{newName} #{object}`
|
`install_name_tool -change #{oldName} #{newName} #{object}`
|
||||||
end
|
end
|
||||||
|
|
||||||
oldName = "libOpenThreads.#{openThreadsSoVersion}.dylib"
|
oldName = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
|
||||||
newName= "@executable_path/../Frameworks/#{oldName}"
|
newName= "@executable_path/../Frameworks/#{oldName}"
|
||||||
`install_name_tool -change #{oldName} #{newName} #{object}`
|
`install_name_tool -change #{oldName} #{newName} #{object}`
|
||||||
|
|
||||||
|
@ -67,7 +74,7 @@ $osgLibs.each do |l|
|
||||||
end
|
end
|
||||||
|
|
||||||
# and not forgetting OpenThreads
|
# and not forgetting OpenThreads
|
||||||
libFile = "libOpenThreads.#{openThreadsSoVersion}.dylib"
|
libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
|
||||||
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
|
`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
|
||||||
|
|
||||||
$osgPlugins.each do |p|
|
$osgPlugins.each do |p|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#/bin/bash
|
|
||||||
DYLD_LIBRARY_PATH=$PWD/dist/lib
|
|
||||||
./dist/bin/osgversion $1
|
|
||||||
|
|
Loading…
Reference in a new issue