~ubuntu-branches/ubuntu/utopic/sikuli/utopic

« back to all changes in this revision

Viewing changes to sikuli-script/src/main/java/org/sikuli/script/App.java

  • Committer: Bazaar Package Importer
  • Author(s): Gilles Filippini
  • Date: 2011-10-04 23:32:13 UTC
  • mfrom: (4.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20111004233213-36fm78hx0z53tkuw
Tags: 1.0~x~rc3-dfsg1-2
* New patch fix-cmake-sikuli-ide.patch:
  + Fix random FTBFS due to missing inter target dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2010-2011, Sikuli.org
 
3
 * Released under the MIT License.
 
4
 *
 
5
 */
1
6
package org.sikuli.script;
2
7
 
3
8
public class App {
64
69
   }
65
70
 
66
71
   public App open() {
67
 
      if(Env.isWindows()){
 
72
      if(Env.isWindows() || Env.isLinux()){
68
73
         int pid = _osUtil.openApp(_appName);
69
74
         _pid = pid;
70
75
         Debug.history("App.open " + this.toString());
85
90
 
86
91
   public int close(){
87
92
      Debug.history("App.close " + this.toString());
88
 
      if(_pid != 0)
89
 
         return _osUtil.closeApp(_pid);
 
93
      if(_pid != 0){
 
94
         int ret = _osUtil.closeApp(_pid);
 
95
         if(ret>=0) return ret;
 
96
      }
90
97
      return close(_appName);
91
98
   }
92
99