add osx repl

This commit is contained in:
Laurent Sansonetti
2013-04-29 21:07:39 +02:00
committed by Watson
parent eb6bdd2caa
commit 721c171090
3 changed files with 11 additions and 10 deletions

View File

@@ -85,7 +85,7 @@ task :simulator => ['build:simulator'] do
xcode = App.config.xcode_dir
env = "DYLD_FRAMEWORK_PATH=\"#{xcode}/../Frameworks\":\"#{xcode}/../OtherFrameworks\""
env << ' SIM_SPEC_MODE=1' if App.config.spec_mode
sim = File.join(App.config.bindir, 'sim')
sim = File.join(App.config.bindir, 'ios/sim')
debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2'))
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.
@@ -133,7 +133,7 @@ task :device => :archive do
App.fail "Device ID `#{device_id}' not provisioned in profile `#{App.config.provisioning_profile}'"
end
env = "XCODE_DIR=\"#{App.config.xcode_dir}\""
deploy = File.join(App.config.bindir, 'deploy')
deploy = File.join(App.config.bindir, 'ios/deploy')
flags = Rake.application.options.trace ? '-d' : ''
sh "#{env} #{deploy} #{flags} \"#{device_id}\" \"#{App.config.archive}\""
end

View File

@@ -133,7 +133,7 @@ module Motion; module Project;
def device_id
@device_id ||= begin
deploy = File.join(App.config.bindir, 'deploy')
deploy = File.join(App.config.bindir, 'ios/deploy')
device_id = `#{deploy} -D`.strip
if device_id.empty?
App.fail "Can't find an iOS device connected on USB"

View File

@@ -40,11 +40,12 @@ end
desc "Run the project"
task :run => 'build' do
exec = App.config.app_bundle_executable('MacOSX')
if ENV['debug']
App.info 'Debug', exec
sh "/usr/bin/gdb --args \"#{exec}\""
else
App.info 'Run', exec
sh "\"#{exec}\""
end
env = ''
env << 'SIM_SPEC_MODE=1' if App.config.spec_mode
sim = File.join(App.config.bindir, 'osx/sim')
debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2'))
target = App.config.sdk_version
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}"
end