mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-11 11:39:09 +08:00
rake simulator now honors deployment_target option, fixed bug when supporting deployment_target
This commit is contained in:
@@ -61,7 +61,7 @@ end
|
||||
desc "Run the simulator"
|
||||
task :simulator => ['build:simulator'] do
|
||||
app = App.config.app_bundle('iPhoneSimulator')
|
||||
target = App.config.sdk_version
|
||||
target = ENV['deployment_target'] || App.config.deployment_target
|
||||
|
||||
# Cleanup the simulator application sandbox, to avoid having old resource files there.
|
||||
if ENV['clean']
|
||||
|
||||
@@ -164,6 +164,12 @@ EOS
|
||||
end
|
||||
end
|
||||
|
||||
def supported_versions
|
||||
@supported_versions ||= Dir.glob(File.join(motiondir, 'data/*')).select{|path| File.directory?(path)}.map do |path|
|
||||
File.basename path
|
||||
end
|
||||
end
|
||||
|
||||
def build_dir
|
||||
unless File.directory?(@build_dir)
|
||||
tried = false
|
||||
@@ -288,9 +294,12 @@ EOS
|
||||
bs_files = []
|
||||
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
|
||||
supported_versions.each do |ver|
|
||||
next if ver < deployment_target || sdk_version < ver
|
||||
bs_path = File.join(datadir(ver), 'BridgeSupport', framework + '.bridgesupport')
|
||||
if File.exist?(bs_path)
|
||||
bs_files << bs_path
|
||||
end
|
||||
end
|
||||
end
|
||||
bs_files
|
||||
|
||||
Reference in New Issue
Block a user