diff --git a/NEWS b/NEWS index 4ff062d4..fe8b614e 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,10 @@ * Added the Pointer#value which is alias of Pointer#[0]. * Fixed a bug where methods that take variable arguments does not call appropriate function if raise an Argument Error exception. + * Fixed a bug which fails looking up method when call super from block in + define_method. + * Added `app.framework_search_paths' to configure your app in Rakefile. + This property is used to search the custom framework paths. = RubyMotion 1.25 = diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index b21a7ee5..8e451ce7 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -370,9 +370,10 @@ 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(init_o, main_o, *config.frameworks_stubs_objects(platform)).map { |x| "\"#{x}\"" }.join(' ') + 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 #{frameworks} #{weak_frameworks} #{config.libs.join(' ')} #{vendor_libs.map { |x| '-force_load "' + 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(' ')}" main_exec_created = true end diff --git a/lib/motion/project/config.rb b/lib/motion/project/config.rb index 105b1c9a..5f5b5cb6 100644 --- a/lib/motion/project/config.rb +++ b/lib/motion/project/config.rb @@ -48,7 +48,7 @@ module Motion; module Project end variable :files, :xcode_dir, :sdk_version, :deployment_target, :frameworks, - :weak_frameworks, :libs, :delegate_class, :name, :build_dir, + :weak_frameworks, :framework_search_paths, :libs, :delegate_class, :name, :build_dir, :resources_dir, :specs_dir, :identifier, :codesign_certificate, :provisioning_profile, :device_family, :interface_orientations, :version, :short_version, :icons, :prerendered_icon, :background_modes, :seed_id, @@ -64,6 +64,7 @@ module Motion; module Project @dependencies = {} @frameworks = ['UIKit', 'Foundation', 'CoreGraphics'] @weak_frameworks = [] + @framework_search_paths = [] @libs = [] @delegate_class = 'AppDelegate' @name = 'Untitled' @@ -319,7 +320,10 @@ EOS end deps << framework end - deps = deps.uniq.select { |dep| File.exist?(File.join(datadir, 'BridgeSupport', dep + '.bridgesupport')) } + deps.uniq! + if @framework_search_paths.empty? + deps.select! { |dep| File.exist?(File.join(datadir, 'BridgeSupport', dep + '.bridgesupport')) } + end deps << 'UIAutomation' if spec_mode deps end @@ -602,7 +606,7 @@ EOS 'UIStatusBarStyle' => status_bar_style_const, 'UIBackgroundModes' => background_modes_consts, 'DTXcode' => begin - vers = xcode_version[0].sub(/\./, '') + vers = xcode_version[0].gsub(/\./, '') if vers.length == 2 '0' + vers + '0' else diff --git a/vm b/vm index 2647ed08..3a695cdb 160000 --- a/vm +++ b/vm @@ -1 +1 @@ -Subproject commit 2647ed08d26e7f207c5a89e01737872c1b5b85b6 +Subproject commit 3a695cdbdffb0d8537ffdc0f56032091633f9cc9