mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 17:39:54 +08:00
Merge branch 'master' of github.com:lrz/RubyMotion
This commit is contained in:
11
NEWS
11
NEWS
@@ -11,6 +11,17 @@
|
||||
* Fixed a bug in REPL which often causes an error with "quit" command.
|
||||
* Fixed a bug which AVPlayer#currentTime causes `{?=qiIq}@:' not precompiled'
|
||||
error.
|
||||
* Improved `rake spec' error message to include the details. Thanks to
|
||||
Steven Webb for pull request #68.
|
||||
* Improved `rake spec files=...' to make _spec suffix optional. Thanks to
|
||||
Dave Lee for pull request #71.
|
||||
* Fixed a bug where it caused a crash when use AudioQueueBuffer structure.
|
||||
* Added :force_load option into configuration of `app.vendor_project'. There
|
||||
are 3rd-party library which would trigger "duplicate symbol" error at
|
||||
compile time. It will be useful in such libraries when specify false in
|
||||
:force_load option (by default true).
|
||||
EX) app.vendor_project('path/to/lib', :static, :force_load => false, ...)
|
||||
* Added Dir#to_path method for CRuby compatibility.
|
||||
|
||||
= RubyMotion 1.34 =
|
||||
|
||||
|
||||
@@ -385,7 +385,12 @@ EOS
|
||||
framework_search_paths = config.framework_search_paths.map { |x| "-F#{File.expand_path(x)}" }.join(' ')
|
||||
frameworks = config.frameworks_dependencies.map { |x| "-framework #{x}" }.join(' ')
|
||||
weak_frameworks = config.weak_frameworks.map { |x| "-weak_framework #{x}" }.join(' ')
|
||||
sh "#{cxx} -o \"#{main_exec}\" #{objs_list} #{config.ldflags(platform)} -L#{File.join(datadir, platform)} -lmacruby-static -lobjc -licucore #{framework_search_paths} #{frameworks} #{weak_frameworks} #{config.libs.join(' ')} #{vendor_libs.map { |x| '-force_load "' + x + '"' }.join(' ')}"
|
||||
vendor_libs = config.vendor_projects.inject([]) do |libs, vendor_project|
|
||||
libs << vendor_project.libs.map { |x|
|
||||
(vendor_project.opts[:force_load] ? '-force_load ' : '-ObjC ') + "\"#{x}\""
|
||||
}
|
||||
end.join(' ')
|
||||
sh "#{cxx} -o \"#{main_exec}\" #{objs_list} #{config.ldflags(platform)} -L#{File.join(datadir, platform)} -lmacruby-static -lobjc -licucore #{framework_search_paths} #{frameworks} #{weak_frameworks} #{config.libs.join(' ')} #{vendor_libs}"
|
||||
main_exec_created = true
|
||||
end
|
||||
|
||||
|
||||
@@ -291,6 +291,7 @@ EOS
|
||||
attr_reader :vendor_projects
|
||||
|
||||
def vendor_project(path, type, opts={})
|
||||
opts[:force_load] = true unless opts[:force_load] == false
|
||||
@vendor_projects << Motion::Project::Vendor.new(path, type, self, opts)
|
||||
end
|
||||
|
||||
@@ -379,7 +380,7 @@ EOS
|
||||
# Filter specs we want to run. A filter can be either the basename of a spec file or its path.
|
||||
files_filter = files_filter.split(',')
|
||||
files_filter.map! { |x| File.exist?(x) ? File.expand_path(x) : x }
|
||||
specs.delete_if { |x| !files_filter.include?(File.expand_path(x)) and !files_filter.include?(File.basename(x, '.rb')) }
|
||||
specs.delete_if { |x| [File.expand_path(x), File.basename(x, '.rb'), File.basename(x, '_spec.rb')].none? { |p| files_filter.include?(p) } }
|
||||
end
|
||||
core + helpers + specs
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ module Motion; module Project;
|
||||
@bs_files = []
|
||||
end
|
||||
|
||||
attr_reader :path, :libs, :bs_files
|
||||
attr_reader :path, :libs, :bs_files, :opts
|
||||
|
||||
def build(platform)
|
||||
App.info 'Build', @path
|
||||
|
||||
@@ -413,10 +413,10 @@ module Bacon
|
||||
|
||||
@error = if e.kind_of? Error
|
||||
Counter[e.count_as] += 1
|
||||
e.count_as.to_s.upcase
|
||||
"#{e.count_as.to_s.upcase} - #{e}"
|
||||
else
|
||||
Counter[:errors] += 1
|
||||
"ERROR: #{e.class}"
|
||||
"ERROR: #{e.class} - #{e}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
5
test/test/spec/boxed_spec.rb
Normal file
5
test/test/spec/boxed_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
describe "Boxed" do
|
||||
it ".type should work with structure which has field of structure pointer" do
|
||||
MyStructHasStructPointer.type.should == "{MyStructHasStructPointer=^{MyStruct4C}}"
|
||||
end
|
||||
end
|
||||
4
test/test/vendor/code/code.h
vendored
4
test/test/vendor/code/code.h
vendored
@@ -4,6 +4,10 @@ struct MyStruct4C {
|
||||
char a, b, c, d;
|
||||
};
|
||||
|
||||
struct MyStructHasStructPointer {
|
||||
struct MyStruct4C *field;
|
||||
};
|
||||
|
||||
typedef id (^MyBlock)(void);
|
||||
|
||||
@protocol TestProtocol <NSObject>
|
||||
|
||||
2
vm
2
vm
Submodule vm updated: 650025de0a...ab28b6483e
Reference in New Issue
Block a user