mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-14 12:13:04 +08:00
Merge branch 'master' of github.com:lrz/RubyMotion
This commit is contained in:
2
NEWS
2
NEWS
@@ -16,6 +16,8 @@
|
||||
* [iOS] Fixed where `rake retina=3.5' does not work with Xcode 5 DP-2.
|
||||
* [iOS] Fixed a bug where `rake' command would re-launch an iOS 7 simulator
|
||||
with Xcode 5 DP-2 every time.
|
||||
* [OSX] Fixed where it does not generate 64bit type into brigesupport in
|
||||
3rd-party library on MacOSX platform.
|
||||
* Fixed a bug where it would cause `not precompiled' error when it call the
|
||||
method which has the BOOL type argument.
|
||||
* Added the block to setup controller in spec.
|
||||
|
||||
2
build.sh
Normal file → Executable file
2
build.sh
Normal file → Executable file
@@ -1,2 +1,2 @@
|
||||
rake
|
||||
SDK_BETA=1 PLATFORMS_DIR=/Applications/Xcode5-DP2.app/Contents/Developer/Platforms rake
|
||||
SDK_BETA=1 PLATFORMS_DIR=/Applications/Xcode5-DP3.app/Contents/Developer/Platforms rake
|
||||
|
||||
@@ -75,7 +75,7 @@ module Motion; module Project;
|
||||
bs_file = File.join(Builder.common_build_dir, File.expand_path(path) + '.bridgesupport')
|
||||
if !File.exist?(bs_file) or File.mtime(path) > File.mtime(bs_file)
|
||||
FileUtils.mkdir_p(File.dirname(bs_file))
|
||||
config.gen_bridge_metadata(headers, bs_file, '', [])
|
||||
config.gen_bridge_metadata(platform, headers, bs_file, '', [])
|
||||
end
|
||||
bs_files << bs_file
|
||||
end
|
||||
|
||||
@@ -121,7 +121,7 @@ EOS
|
||||
if !File.exist?(bs_file) or headers.any? { |h| File.mtime(h) > File.mtime(bs_file) }
|
||||
bs_cflags = (opts.delete(:bridgesupport_cflags) or '')
|
||||
bs_exceptions = (opts.delete(:bridgesupport_exceptions) or [])
|
||||
@config.gen_bridge_metadata(headers, bs_file, bs_cflags, bs_exceptions)
|
||||
@config.gen_bridge_metadata(platform, headers, bs_file, bs_cflags, bs_exceptions)
|
||||
end
|
||||
bs_files << bs_file
|
||||
end
|
||||
@@ -197,7 +197,7 @@ EOS
|
||||
if !File.exist?(bs_file) or headers.any? { |x| File.mtime(x) > File.mtime(bs_file) }
|
||||
bs_cflags = (opts.delete(:bridgesupport_cflags) or '')
|
||||
bs_exceptions = (opts.delete(:bridgesupport_exceptions) or [])
|
||||
@config.gen_bridge_metadata(headers, bs_file, bs_cflags, bs_exceptions)
|
||||
@config.gen_bridge_metadata(platform, headers, bs_file, bs_cflags, bs_exceptions)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -292,13 +292,20 @@ EOS
|
||||
end
|
||||
end
|
||||
|
||||
def gen_bridge_metadata(headers, bs_file, c_flags, exceptions=[])
|
||||
def gen_bridge_metadata(platform, headers, bs_file, c_flags, exceptions=[])
|
||||
sdk_path = self.sdk(local_platform)
|
||||
includes = headers.map { |header| "-I'#{File.dirname(header)}'" }.uniq
|
||||
exceptions = exceptions.map { |x| "\"#{x}\"" }.join(' ')
|
||||
a = sdk_version.scan(/(\d+)\.(\d+)/)[0]
|
||||
sdk_version_headers = ((a[0].to_i * 10000) + (a[1].to_i * 100)).to_s
|
||||
extra_flags = OSX_VERSION >= 10.7 ? '--no-64-bit' : ''
|
||||
extra_flags = begin
|
||||
case platform
|
||||
when "MacOSX"
|
||||
'--64-bit'
|
||||
else
|
||||
OSX_VERSION >= 10.7 ? '--no-64-bit' : ''
|
||||
end
|
||||
end
|
||||
sh "RUBYOPT='' /usr/bin/gen_bridge_metadata --format complete #{extra_flags} --cflags \" #{c_flags} -isysroot #{sdk_path} -miphoneos-version-min=#{sdk_version} -D__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__=#{sdk_version_headers} -I. #{includes.join(' ')}\" #{headers.map { |x| "\"#{x}\"" }.join(' ')} -o \"#{bs_file}\" #{ "-e #{exceptions}" if exceptions.length != 0}"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user