OS-X: Adapt package script for @rpath
Since the Mac build sets @rpath correctly now, no longer need to fix install names during package creation.
This commit is contained in:
parent
f390d16625
commit
548de8bd2d
1 changed files with 0 additions and 20 deletions
|
@ -19,23 +19,8 @@ $openThreadsSoVersion=runOsgVersion('openthreads-soversion-number')
|
||||||
|
|
||||||
$codeSignIdentity = ENV['FG_CODESIGN_IDENTITY']
|
$codeSignIdentity = ENV['FG_CODESIGN_IDENTITY']
|
||||||
puts "Code signing identity is #{$codeSignIdentity}"
|
puts "Code signing identity is #{$codeSignIdentity}"
|
||||||
|
|
||||||
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
|
puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}"
|
||||||
|
|
||||||
def fix_install_names(object)
|
|
||||||
#puts "fixing install names for #{object}"
|
|
||||||
|
|
||||||
$osgLibs.each do |l|
|
|
||||||
oldName = "lib#{l}.#{$osgSoVersion}.dylib"
|
|
||||||
newName = "@executable_path/../Frameworks/#{oldName}"
|
|
||||||
`install_name_tool -change #{oldName} #{newName} #{object}`
|
|
||||||
end
|
|
||||||
|
|
||||||
oldName = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
|
|
||||||
newName= "@executable_path/../Frameworks/#{oldName}"
|
|
||||||
`install_name_tool -change #{oldName} #{newName} #{object}`
|
|
||||||
end
|
|
||||||
|
|
||||||
$prefixDir=Dir.pwd + "/dist"
|
$prefixDir=Dir.pwd + "/dist"
|
||||||
dmgDir=Dir.pwd + "/image"
|
dmgDir=Dir.pwd + "/image"
|
||||||
srcDir=Dir.pwd + "/flightgear"
|
srcDir=Dir.pwd + "/flightgear"
|
||||||
|
@ -77,8 +62,6 @@ puts "Creating directory structure"
|
||||||
`mkdir -p #{resourcesDir}`
|
`mkdir -p #{resourcesDir}`
|
||||||
`mkdir -p #{osgPluginsDir}`
|
`mkdir -p #{osgPluginsDir}`
|
||||||
|
|
||||||
# fix install names on the primary executable
|
|
||||||
fix_install_names("#{macosDir}/fgfs")
|
|
||||||
|
|
||||||
puts "Copying auxilliary binaries"
|
puts "Copying auxilliary binaries"
|
||||||
bins = ['fgjs', 'fgcom']
|
bins = ['fgjs', 'fgcom']
|
||||||
|
@ -89,14 +72,12 @@ bins.each do |b|
|
||||||
|
|
||||||
outPath = "#{macosDir}/#{b}"
|
outPath = "#{macosDir}/#{b}"
|
||||||
`cp #{$prefixDir}/bin/#{b} #{outPath}`
|
`cp #{$prefixDir}/bin/#{b} #{outPath}`
|
||||||
fix_install_names(outPath)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "copying libraries"
|
puts "copying libraries"
|
||||||
$osgLibs.each do |l|
|
$osgLibs.each do |l|
|
||||||
libFile = "lib#{l}.#{$osgSoVersion}.dylib"
|
libFile = "lib#{l}.#{$osgSoVersion}.dylib"
|
||||||
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
|
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
|
||||||
fix_install_names("#{$frameworksDir}/#{libFile}")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# and not forgetting OpenThreads
|
# and not forgetting OpenThreads
|
||||||
|
@ -106,7 +87,6 @@ libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
|
||||||
$osgPlugins.each do |p|
|
$osgPlugins.each do |p|
|
||||||
pluginFile = "osgdb_#{p}.dylib"
|
pluginFile = "osgdb_#{p}.dylib"
|
||||||
`cp #{$prefixDir}/lib/osgPlugins/#{pluginFile} #{osgPluginsDir}`
|
`cp #{$prefixDir}/lib/osgPlugins/#{pluginFile} #{osgPluginsDir}`
|
||||||
fix_install_names("#{osgPluginsDir}/#{pluginFile}")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.exist?("#{$prefixDir}/bin/fgcom-data")
|
if File.exist?("#{$prefixDir}/bin/fgcom-data")
|
||||||
|
|
Loading…
Add table
Reference in a new issue