class OcraTask
Implements programmatic control of the OCRA application.
Public Class Methods
new()
click to toggle source
Constructor
Calls superclass method
CLApp::new
# File lib/rakeutils/ocratask.rb, line 25 def initialize() super( find_app ) end
Public Instance Methods
compile(script)
click to toggle source
Generate executable application from a ruby script.Compile setup script.
- script
-
Script to be compiled
# File lib/rakeutils/ocratask.rb, line 40 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
find_app()
click to toggle source
# File lib/rakeutils/ocratask.rb, line 29 def find_app if Ktutils::OS.windows? # We expect that ruby is on the user's PATH. app_home = "ruby.exe" else raise "cannot use OCRA on linux based systems" end end