diff options
author | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2021-04-27 01:06:57 +0200 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2021-04-27 01:06:57 +0200 |
commit | 65e9e161f3e232dd684c650de739ba110fd9a6d9 (patch) | |
tree | da47a0598e39eae1837b555ff882fac8558ea617 | |
parent | 7af5ff76edf5ff2070377d2f719261b7a92e2ab1 (diff) |
mac-libs.rb: codesign the app + minor fixes
-rwxr-xr-x | tools/mac-libs.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/mac-libs.rb b/tools/mac-libs.rb index 0c1920f..a66b409 100755 --- a/tools/mac-libs.rb +++ b/tools/mac-libs.rb @@ -18,7 +18,8 @@ def executable end def get_rpaths(lib) - out = `otool -l #{lib}`.split("\n") + out, _ = Open3.capture2("otool", "-l", lib) + out = out.split("\n") rpaths = [] out.each_with_index do |line, i| @@ -31,8 +32,8 @@ def get_rpaths(lib) end def get_load_libs(lib) - `otool -L #{lib}` - .split("\n") + out, _ = Open3.capture2("otool", "-L", lib) + out.split("\n") .drop(1) .map { |it| it.strip.gsub(/ \(.*/, "") } end @@ -93,7 +94,8 @@ def install_name_tool(exec, action, path1, path2 = nil) end def strip(lib) - `strip -SNTx "#{lib}"` + out, _ = Open3.capture2("strip", "-SNTx", lib) + print out end def fixup_libs(prog, orig_path) @@ -218,6 +220,9 @@ Dir.glob("#{frameworks_dir}/**/Headers").each do |dir| FileUtils.rm_rf dir end +out, _ = Open3.capture2("codesign", "-s", "-", "-f", "--deep", $bundle) +print out + if $build_dmg dmg_dir = File.join($build_dir, "dmg") FileUtils.mkdir_p(dmg_dir) |