app.sim_args

This commit is contained in:
Laurent Sansonetti
2013-05-29 19:21:10 +09:00
committed by Watson
parent ed0b8bbc64
commit f011285dd6
3 changed files with 4 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ module Motion; module Project
end
end
variable :name, :files, :build_dir, :specs_dir, :version, :motiondir, :arguments_passed_on_launch
variable :name, :files, :build_dir, :specs_dir, :version, :motiondir, :sim_args
# Internal only.
attr_accessor :build_mode, :spec_mode, :distribution_mode, :dependencies,
@@ -80,6 +80,7 @@ module Motion; module Project
@specs_dir = File.join(project_dir, 'spec')
@version = '1.0'
@detect_dependencies = true
@sim_args = []
end
OSX_VERSION = `/usr/bin/sw_vers -productVersion`.strip.sub(/\.\d+$/, '').to_f

View File

@@ -88,7 +88,7 @@ task :simulator => ['build:simulator'] do
env << ' SIM_SPEC_MODE=1' if App.config.spec_mode
sim = File.join(App.config.bindir, 'ios/sim')
debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2'))
app_args = App.config.arguments_passed_on_launch || ""
app_args = App.config.sim_args.map { |x| '"' + x + '"' }
App.info 'Simulate', app
at_exit { system("stty echo") } if $stdout.tty? # Just in case the simulator launcher crashes and leaves the terminal without echo.
sh "#{env} #{sim} #{debug} #{family_int} #{target} \"#{xcode}\" \"#{app}\" \"#{app_args}\""

View File

@@ -54,7 +54,7 @@ task :run => 'build:development' do
sim = File.join(App.config.bindir, 'osx/sim')
debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2'))
target = App.config.sdk_version
app_args = App.config.arguments_passed_on_launch || ""
app_args = App.config.sim_args.map { |x| '"' + x + '"' }
App.info 'Run', exec
at_exit { system("stty echo") } if $stdout.tty? # Just in case the process crashes and leaves the terminal without echo.
sh "#{env} #{sim} #{debug} #{target} \"#{exec}\" \"#{app_args}\""