mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-21 10:54:35 +08:00
don't open the sim in foreground when running in spec mode
This commit is contained in:
@@ -955,7 +955,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
// Open simulator to the foreground.
|
||||
system("/usr/bin/open -a \"iPhone Simulator\"");
|
||||
if (getenv("NO_FOREGROUND_SIM") == NULL) {
|
||||
system("/usr/bin/open -a \"iPhone Simulator\"");
|
||||
}
|
||||
|
||||
[[NSRunLoop mainRunLoop] run];
|
||||
return 0;
|
||||
|
||||
@@ -71,6 +71,7 @@ task :simulator => ['build:simulator'] do
|
||||
# Launch the simulator.
|
||||
xcode = App.config.xcode_dir
|
||||
env = xcode.match(/^\/Applications/) ? "DYLD_FRAMEWORK_PATH=\"#{xcode}/../Frameworks\":\"#{xcode}/../OtherFrameworks\"" : ''
|
||||
env << ' NO_FOREGROUND_SIM=1' if App.config.spec_mode
|
||||
sim = File.join(App.config.bindir, 'sim')
|
||||
debug = (ENV['debug'] || (App.config.spec_mode ? '0' : '2')).to_i
|
||||
debug = 2 if debug < 0 or debug > 2
|
||||
|
||||
Reference in New Issue
Block a user