diff --git a/NEWS b/NEWS index cc8124ee..d7282702 100644 --- a/NEWS +++ b/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. diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index e049fc22..0ccebdcd --- a/build.sh +++ b/build.sh @@ -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 diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index c6949f5e..46a67c74 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -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 diff --git a/lib/motion/project/vendor.rb b/lib/motion/project/vendor.rb index 8547b15e..166e5873 100644 --- a/lib/motion/project/vendor.rb +++ b/lib/motion/project/vendor.rb @@ -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 diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index 9d5a8f5d..a009f077 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -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