mac-libs.rb: codesign the app + minor fixes
This commit is contained in:
parent
7af5ff76ed
commit
65e9e161f3
|
@ -18,7 +18,8 @@ def executable
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_rpaths(lib)
|
def get_rpaths(lib)
|
||||||
out = `otool -l #{lib}`.split("\n")
|
out, _ = Open3.capture2("otool", "-l", lib)
|
||||||
|
out = out.split("\n")
|
||||||
rpaths = []
|
rpaths = []
|
||||||
|
|
||||||
out.each_with_index do |line, i|
|
out.each_with_index do |line, i|
|
||||||
|
@ -31,8 +32,8 @@ def get_rpaths(lib)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_load_libs(lib)
|
def get_load_libs(lib)
|
||||||
`otool -L #{lib}`
|
out, _ = Open3.capture2("otool", "-L", lib)
|
||||||
.split("\n")
|
out.split("\n")
|
||||||
.drop(1)
|
.drop(1)
|
||||||
.map { |it| it.strip.gsub(/ \(.*/, "") }
|
.map { |it| it.strip.gsub(/ \(.*/, "") }
|
||||||
end
|
end
|
||||||
|
@ -93,7 +94,8 @@ def install_name_tool(exec, action, path1, path2 = nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
def strip(lib)
|
def strip(lib)
|
||||||
`strip -SNTx "#{lib}"`
|
out, _ = Open3.capture2("strip", "-SNTx", lib)
|
||||||
|
print out
|
||||||
end
|
end
|
||||||
|
|
||||||
def fixup_libs(prog, orig_path)
|
def fixup_libs(prog, orig_path)
|
||||||
|
@ -218,6 +220,9 @@ Dir.glob("#{frameworks_dir}/**/Headers").each do |dir|
|
||||||
FileUtils.rm_rf dir
|
FileUtils.rm_rf dir
|
||||||
end
|
end
|
||||||
|
|
||||||
|
out, _ = Open3.capture2("codesign", "-s", "-", "-f", "--deep", $bundle)
|
||||||
|
print out
|
||||||
|
|
||||||
if $build_dmg
|
if $build_dmg
|
||||||
dmg_dir = File.join($build_dir, "dmg")
|
dmg_dir = File.join($build_dir, "dmg")
|
||||||
FileUtils.mkdir_p(dmg_dir)
|
FileUtils.mkdir_p(dmg_dir)
|
||||||
|
|
Loading…
Reference in New Issue