]> git.mxchange.org Git - flightgear.git/commitdiff
Updates for v2 code-signing
authorJames Turner <zakalawe@mac.com>
Thu, 12 Feb 2015 11:43:37 +0000 (11:43 +0000)
committerJames Turner <zakalawe@mac.com>
Thu, 12 Feb 2015 11:43:37 +0000 (11:43 +0000)
- 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

package/mac/build-mac-nightly-dmg.rb

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