forked from NatLabRockies/OpenStudio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSketchUpInstallName.rb
More file actions
13 lines (11 loc) · 812 Bytes
/
SketchUpInstallName.rb
File metadata and controls
13 lines (11 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
`otool -L #{ARGV[0]}`.split("\n").each do |line|
if lib = /^[\s]*([^\s]*libruby[^\s]+)/.match(line)
`install_name_tool -change #{lib[1]} @rpath/libruby.2.0.0.dylib #{ARGV[0]}`
`install_name_tool -add_rpath @executable_path/../Frameworks/Ruby.framework/Versions/2.0 #{ARGV[0]}` # SketchUp
`install_name_tool -add_rpath @executable_path #{ARGV[0]}` # OpenStudio and PAT
`install_name_tool -add_rpath @executable_path/../lib #{ARGV[0]}` # custom ruby
#`install_name_tool -add_rpath @loader_path #{ARGV[0]}` we do not want ruby bindings to load their own libruby
`install_name_tool -add_rpath /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ #{ARGV[0]}` # fall back to system ruby
`install_name_tool -add_rpath /usr/lib #{ARGV[0]}` # fall back to system ruby
end
end