Class: OcraTask

Inherits:
CLApp show all
Includes:
FileUtils
Defined in:
lib/rakeutils/ocratask.rb

Overview

Implements programmatic control of the OCRA application.

Constant Summary collapse

APP_PATH =
`which ruby`.chomp

Instance Method Summary collapse

Methods inherited from CLApp

#execute, #normalize_dir_path, #quote_all_values, #quote_value, #rubyize_path, #windowize_path

Constructor Details

#initializeOcraTask

Constructor



31
32
33
# File 'lib/rakeutils/ocratask.rb', line 31

def initialize()
  super( APP_PATH )   # Call parent constructor.
end

Instance Method Details

#compile(script) ⇒ Object

Generate executable application from a ruby script.Compile setup script.

script

Script to be compiled



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/rakeutils/ocratask.rb', line 37

def compile(script)
  puts "Compiling script: #{script}"

  cmdLine = "ocra.rb --windows #{script}"

  begin
    execute( cmdLine, false )
  rescue
    puts "!!! Errors occured during compilation of setup script."
  end
end