mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-13 22:45:27 +08:00
fix an error when generate bridgesupport file
Fix the following error: $ rake --trace require 'lib/motion/project' is deprecated, please require 'lib/motion/project/template/ios' instead ** Invoke default (first_time) ** Invoke simulator (first_time) ** Invoke build:simulator (first_time) ** Execute build:simulator RUBYOPT='' /usr/bin/gen_bridge_metadata --format complete --no-64-bit --cflags " -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -miphoneos-version-min=6.1 -D__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__=60100 -I. -I'.'" "TestFlight.h" -o "TestFlight.bridgesupport" -e Received exception: missing argument: -e:
This commit is contained in:
@@ -339,14 +339,14 @@ EOS
|
||||
Motion::PropertyList.to_s(dict)
|
||||
end
|
||||
|
||||
def gen_bridge_metadata(headers, bs_file, c_flags, exceptions)
|
||||
def gen_bridge_metadata(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' : ''
|
||||
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}" unless exceptions.nil?}"
|
||||
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
|
||||
|
||||
def define_global_env_txt
|
||||
|
||||
Reference in New Issue
Block a user