From 05b6582e9f3bb5e8dc1e5a5bd013d19ebaeb691b Mon Sep 17 00:00:00 2001 From: Watson Date: Fri, 5 Oct 2012 15:10:59 +0900 Subject: [PATCH 1/4] add line for latest commit --- NEWS | 2 ++ vm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 95ad0810..c9e01555 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ * 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. = RubyMotion 1.25 = diff --git a/vm b/vm index 2647ed08..985723a6 160000 --- a/vm +++ b/vm @@ -1 +1 @@ -Subproject commit 2647ed08d26e7f207c5a89e01737872c1b5b85b6 +Subproject commit 985723a6120b46ebe90ad4a10bbf39cbb5a7c1b1 From ee172b48dc50c78dc5e15048302b466391a643d9 Mon Sep 17 00:00:00 2001 From: Watson Date: Fri, 5 Oct 2012 15:14:39 +0900 Subject: [PATCH 2/4] sync --- vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm b/vm index 985723a6..3a695cdb 160000 --- a/vm +++ b/vm @@ -1 +1 @@ -Subproject commit 985723a6120b46ebe90ad4a10bbf39cbb5a7c1b1 +Subproject commit 3a695cdbdffb0d8537ffdc0f56032091633f9cc9 From 6c43a2807ca024659cfaf21efe78b24cb26b5c66 Mon Sep 17 00:00:00 2001 From: Watson Date: Thu, 4 Oct 2012 11:35:24 +0900 Subject: [PATCH 3/4] add framework_search_paths property --- NEWS | 2 ++ lib/motion/project/builder.rb | 3 ++- lib/motion/project/config.rb | 8 ++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index c9e01555..287539f8 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ 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 e697257f..edc77d36 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..f4bc0461 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 From fb398bcd3684df39aaab9cd8263b70596e647307 Mon Sep 17 00:00:00 2001 From: Watson Date: Sat, 6 Oct 2012 21:20:22 +0900 Subject: [PATCH 4/4] remove all dots from DTXcode value --- lib/motion/project/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/motion/project/config.rb b/lib/motion/project/config.rb index f4bc0461..5f5b5cb6 100644 --- a/lib/motion/project/config.rb +++ b/lib/motion/project/config.rb @@ -606,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