]> git.mxchange.org Git - flightgear.git/commitdiff
Delay code-signing until the bundle is fully assembled.
authorJames Turner <zakalawe@mac.com>
Tue, 14 Aug 2012 09:01:09 +0000 (10:01 +0100)
committerJames Turner <zakalawe@mac.com>
Tue, 14 Aug 2012 09:01:09 +0000 (10:01 +0100)
Apparently code-signing is quite clever, and bundle resources changes invalidate the signature.

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

index b26fbbb29fc4d50d6d252f64f2fa3dc85bdced50..43675a56d69a9d652aa84f5e145b2d35ab2d16f9 100755 (executable)
@@ -105,7 +105,6 @@ bins.each do |b|
   `cp #{$prefixDir}/bin/#{b} #{outPath}`
   fix_install_names(outPath)
   fix_svn_install_names(outPath)
-  code_sign(outPath)
 end
 
 puts "copying libraries"
@@ -149,7 +148,6 @@ if File.exist?("FlightGearOSX")
   Dir.chdir "FlightGearOSX" do
     `cp FlightGear #{macosDir}`
     `rsync -a *.rb *.lproj *.sh *.tiff #{resourcesDir}`
-    code_sign("#{macosDir}/FlightGear")
   end
 end
 
@@ -158,6 +156,15 @@ if File.exist?("#{$prefixDir}/bin/fgcom-data")
   `ditto #{$prefixDir}/bin/fgcom-data #{resourcesDir}/fgcom-data`
 end
 
+# code sign all executables in MacOS dir. Do this last since reource
+# changes will invalidate the signature!
+Dir.foreach(macosDir) do |b|
+    if b == '.' or b == '..' then
+        next
+    end
+  code_sign("#{macosDir}/#{b}")
+end
+
 puts "Creating DMG"
 
 createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"