1
0
Fork 0

Updates for v2 code-signing

- Assume modified OSG plugin naming scheme, requires patched OSG 
from our Git, with .dylib suffix and no version number in the dir
name.

- deeply sign the entire bundle, once it’s complete
This commit is contained in:
James Turner 2015-02-12 11:43:37 +00:00
parent 1cffd2b8c0
commit b485fa8a0d

View file

@ -57,13 +57,10 @@ contents=bundle + "/Contents"
macosDir=contents + "/MacOS" macosDir=contents + "/MacOS"
$frameworksDir=contents +"/Frameworks" $frameworksDir=contents +"/Frameworks"
resourcesDir=contents+"/Resources" resourcesDir=contents+"/Resources"
osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}"
volName="\"FlightGear Nightly Build\""
def code_sign(path) # changed this for customised OSG
puts "Signing #{path}" osgPluginsDir=contents+"/PlugIns/osgPlugins"
`codesign -s "#{$codeSignIdentity}" #{path}` volName="\"FlightGear Nightly Build\""
end
fgVersion = File.read("#{srcDir}/version").strip fgVersion = File.read("#{srcDir}/version").strip
@ -101,8 +98,8 @@ libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib"
`cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}` `cp #{$prefixDir}/lib/#{libFile} #{$frameworksDir}`
$osgPlugins.each do |p| $osgPlugins.each do |p|
pluginFile = "osgdb_#{p}.so" pluginFile = "osgdb_#{p}.dylib"
`cp #{$prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile} #{osgPluginsDir}` `cp #{$prefixDir}/lib/osgPlugins/#{pluginFile} #{osgPluginsDir}`
fix_install_names("#{osgPluginsDir}/#{pluginFile}") fix_install_names("#{osgPluginsDir}/#{pluginFile}")
end end
@ -115,14 +112,9 @@ if File.exist?("#{$prefixDir}/share/flightgear")
`ditto #{$prefixDir}/share/flightgear #{resourcesDir}` `ditto #{$prefixDir}/share/flightgear #{resourcesDir}`
end end
# code sign all executables in MacOS dir. Do this last since resource # code sign the entire bundle once complete - v2 code-signing
# changes will invalidate the signature! puts "Signing #{bundle}"
Dir.foreach(macosDir) do |b| `codesign --deep -s "#{$codeSignIdentity}" #{bundle}`
if b == '.' or b == '..' then
next
end
code_sign("#{macosDir}/#{b}")
end
puts "Creating DMG" puts "Creating DMG"