From c864b396c65d5ddf36b639e4bfd6f1794ea0b9b9 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 14 Aug 2012 10:01:09 +0100 Subject: [PATCH] Delay code-signing until the bundle is fully assembled. Apparently code-signing is quite clever, and bundle resources changes invalidate the signature. --- package/mac/build-mac-nightly-dmg.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/package/mac/build-mac-nightly-dmg.rb b/package/mac/build-mac-nightly-dmg.rb index b26fbbb29..43675a56d 100755 --- a/package/mac/build-mac-nightly-dmg.rb +++ b/package/mac/build-mac-nightly-dmg.rb @@ -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}"