#
#  CampKari.rb
#  Kari
#
#  Created by Eloy Duran on 7/2/07.
#  Copyright (c) 2007 __MyCompanyName__. All rights reserved.
#

require 'osx/cocoa'

class CampKari
  def initialize
    puts 'init camp kari'
    @camp_kari = OSX::NSTask.alloc.init
    @camp_kari.launchPath = '/opt/local/bin/camping'
    @camp_kari.currentDirectoryPath = '/Users/eloy/code/KLANTEN/Fingertips/Kari/design/proof_of_concept/'
    @camp_kari.arguments = ['kari.rb']
    @camp_kari.environment = { 'PATH' => '/opt/local/bin', 'HOME' => '/Users/eloy' }
  end
  
  def launch
    @camp_kari.launch
  end
  
  def running?
    @camp_kari.isRunning
  end
  
  def terminate
    @camp_kari.terminate
  end
end

#
#  CampKari.rb
#  Kari
#
#  Created by Eloy Duran on 7/2/07.
#  Copyright (c) 2007 __MyCompanyName__. All rights reserved.
#

require 'osx/cocoa'

class CampKari
  def initialize
    puts 'init camp kari'
    @camp_kari = OSX::NSTask.alloc.init
    @camp_kari.launchPath = '/opt/local/bin/camping'
    @camp_kari.currentDirectoryPath = File.expand_path('../../../../../../../design/proof_of_concept', File.dirname(__FILE__))
    @camp_kari.arguments = ['kari.rb']
    @camp_kari.environment = { 'PATH' => ENV['PATH'], 'HOME' => ENV['HOME'] }
  end
  
  def launch
    @camp_kari.launch
  end
  
  def running?
    @camp_kari.isRunning
  end
  
  def terminate
    @camp_kari.terminate
  end
end

Make the path to the kari camping proof of concept relative to the build. Use the environment instead of specifying the username and the path.
Make the path to the kari camping proof of concept relative to the build. Use the environment instead of specifying the username and the path.


git-svn-id: f20da03e3c54bdd0425edde46a83a0733af7cd3b@11 7a99d2f0-d533-0410-96fe-f25cb2755c1e
