mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-10 22:49:26 +08:00
Merge branch 'XCPretty'
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "vm"]
|
||||
path = vm
|
||||
url = git@github.com:lrz/RubyMotionVM.git
|
||||
[submodule "vendor/XCPretty"]
|
||||
path = vendor/XCPretty
|
||||
url = https://github.com/alloy/XCPretty.git
|
||||
|
||||
4
Rakefile
4
Rakefile
@@ -162,6 +162,10 @@ task :install do
|
||||
end
|
||||
end
|
||||
|
||||
# Include the XCPretty gem.
|
||||
binaries << './vendor/XCPretty/bin/xcpretty'
|
||||
data.concat(FileList["./vendor/XCPretty/{LICENSE.txt,lib/**/*.rb}"])
|
||||
|
||||
# Android support is not ready yet.
|
||||
data.delete_if { |x| x.match(/^.\/lib\/motion\/project\/template\/android/) }
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ module Motion; module Project;
|
||||
attr_reader :path, :libs, :bs_files, :opts
|
||||
|
||||
def build(platform)
|
||||
App.info 'Build', @path
|
||||
send gen_method('build'), platform, @opts.dup
|
||||
if @libs.empty?
|
||||
App.fail "Building vendor project `#{@path}' failed to create at least one `.a' library."
|
||||
@@ -62,6 +61,7 @@ module Motion; module Project;
|
||||
end
|
||||
|
||||
def build_static(platform, opts)
|
||||
App.info 'Build', @path
|
||||
Dir.chdir(@path) do
|
||||
build_dir = "build-#{platform}"
|
||||
|
||||
@@ -146,6 +146,7 @@ EOS
|
||||
end
|
||||
|
||||
def build_xcode(platform, opts)
|
||||
project_dir = File.expand_path(@config.project_dir)
|
||||
Dir.chdir(@path) do
|
||||
build_dir = "build-#{platform}"
|
||||
if !File.exist?(build_dir) or Dir.glob('**/*').any? { |x| File.mtime(x) > File.mtime(build_dir) }
|
||||
@@ -178,7 +179,11 @@ EOS
|
||||
xcopts = ''
|
||||
xcopts << "-target \"#{target}\" " if target
|
||||
xcopts << "-scheme \"#{scheme}\" " if scheme
|
||||
sh "/usr/bin/xcodebuild -project \"#{xcodeproj}\" #{xcopts} -configuration \"#{configuration}\" -sdk #{platform.downcase}#{@config.sdk_version} #{@config.arch_flags(platform)} CONFIGURATION_BUILD_DIR=\"#{xcode_build_dir}\" IPHONEOS_DEPLOYMENT_TARGET=#{@config.deployment_target} build"
|
||||
command = "/usr/bin/xcodebuild -project \"#{xcodeproj}\" #{xcopts} -configuration \"#{configuration}\" -sdk #{platform.downcase}#{@config.sdk_version} #{@config.arch_flags(platform)} CONFIGURATION_BUILD_DIR=\"#{xcode_build_dir}\" IPHONEOS_DEPLOYMENT_TARGET=#{@config.deployment_target} build"
|
||||
unless App::VERBOSE
|
||||
command << " | env RM_XCPRETTY_PRINTER_PROJECT_ROOT='#{project_dir}' '#{File.join(@config.motiondir, 'vendor/XCPretty/bin/xcpretty')}' --printer '#{File.join(@config.motiondir, 'lib/motion/project/vendor/xcpretty_printer.rb')}'"
|
||||
end
|
||||
sh command
|
||||
|
||||
# Copy .a files into the platform build directory.
|
||||
prods = opts.delete(:products)
|
||||
|
||||
1
vendor/XCPretty
vendored
Submodule
1
vendor/XCPretty
vendored
Submodule
Submodule vendor/XCPretty added at a1c8e6a40d
Reference in New Issue
Block a user