mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-14 12:13:04 +08:00
use dependencies chain to link with stubs and frameworks
This commit is contained in:
@@ -259,9 +259,9 @@ EOS
|
||||
or File.mtime(File.join(datadir, platform, 'libmacruby-static.a')) > File.mtime(main_exec)
|
||||
App.info 'Link', main_exec
|
||||
objs_list = objs.map { |path, _| path }.unshift(main_o).map { |x| "\"#{x}\"" }.join(' ')
|
||||
frameworks = config.frameworks.map { |x| "-framework #{x}" }.join(' ')
|
||||
frameworks = config.frameworks_dependencies.map { |x| "-framework #{x}" }.join(' ')
|
||||
framework_stubs_objs = []
|
||||
config.frameworks.each do |framework|
|
||||
config.frameworks_dependencies.each do |framework|
|
||||
stubs_obj = File.join(datadir, platform, "#{framework}_stubs.o")
|
||||
framework_stubs_objs << "\"#{stubs_obj}\"" if File.exist?(stubs_obj)
|
||||
end
|
||||
|
||||
@@ -235,10 +235,10 @@ EOS
|
||||
end
|
||||
end
|
||||
|
||||
def bridgesupport_files
|
||||
@bridgesupport_files ||= begin
|
||||
def frameworks_dependencies
|
||||
@frameworks_dependencies ||= begin
|
||||
# Compute the list of frameworks, including dependencies, that the project uses.
|
||||
deps = ['RubyMotion']
|
||||
deps = []
|
||||
slf = File.join(sdk('iPhoneSimulator'), 'System', 'Library', 'Frameworks')
|
||||
frameworks.each do |framework|
|
||||
framework_path = File.join(slf, framework + '.framework', framework)
|
||||
@@ -252,9 +252,15 @@ EOS
|
||||
end
|
||||
deps << framework
|
||||
end
|
||||
deps.uniq
|
||||
end
|
||||
end
|
||||
|
||||
def bridgesupport_files
|
||||
@bridgesupport_files ||= begin
|
||||
bs_files = []
|
||||
deps.uniq.each do |framework|
|
||||
deps = ['RubyMotion'] + frameworks_dependencies
|
||||
deps.each do |framework|
|
||||
bs_path = File.join(datadir, 'BridgeSupport', framework + '.bridgesupport')
|
||||
if File.exist?(bs_path)
|
||||
bs_files << bs_path
|
||||
|
||||
Reference in New Issue
Block a user