From cb1819693da339668ae6ecf4a8e523ee9ce359fd Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 24 Feb 2015 11:43:51 +0000 Subject: [PATCH] Code-signing v2 --- hudson_mac_package_release.rb | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/hudson_mac_package_release.rb b/hudson_mac_package_release.rb index 71da5fe..6f3efad 100755 --- a/hudson_mac_package_release.rb +++ b/hudson_mac_package_release.rb @@ -40,12 +40,6 @@ $prefixDir=Dir.pwd + "/dist" dmgDir=Dir.pwd + "/image" srcDir=Dir.pwd + "/flightgear" -def code_sign(path) - puts "Signing #{path}" - `codesign -s "#{$codeSignIdentity}" #{path}` -end - - puts "Erasing previous image dir" `rm -rf #{dmgDir}` @@ -65,7 +59,7 @@ contents=bundle + "/Contents" macosDir=contents + "/MacOS" $frameworksDir=contents +"/Frameworks" resourcesDir=contents+"/Resources" -osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}" +osgPluginsDir=contents+"/PlugIns/osgPlugins" # for writing copyright year to Info.plist t = Time.new @@ -109,8 +103,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 @@ -137,14 +131,9 @@ File.open("#{contents}/Info.plist", 'w') { |f| puts "Copying base package files into the image" `rsync -a fgdata/ #{resourcesDir}/data` -# 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 +# code sign the entire bundle once complete - v2 code-signing +puts "Signing #{bundle}" +`codesign --deep -s "#{$codeSignIdentity}" #{bundle}` puts "Creating DMG"