Class: OcraTask
- Includes:
- FileUtils
- Defined in:
- lib/rakeutils/ocratask.rb
Overview
Implements programmatic control of the OCRA application.
Instance Method Summary collapse
-
#compile(script) ⇒ Object
Generate executable application from a ruby script.Compile setup script.
-
#find_app ⇒ Object
initialize.
-
#initialize ⇒ OcraTask
constructor
Constructor.
Methods inherited from CLApp
#execute, #normalize_dir_path, #quote_all_values, #quote_value, #rubyize_path, #windowize_path
Constructor Details
#initialize ⇒ OcraTask
Constructor
25 26 27 |
# File 'lib/rakeutils/ocratask.rb', line 25 def initialize() super( find_app ) end |
Instance Method Details
#compile(script) ⇒ Object
Generate executable application from a ruby script.Compile setup script.
- script
-
Script to be compiled
40 41 42 43 44 45 46 47 48 49 50 |
# 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 ⇒ Object
initialize
29 30 31 32 33 34 35 36 |
# 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 |