Class: Rake::Delphi::RCTask
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
-
#is_main_icon ⇒ Object
Returns the value of attribute is_main_icon.
-
#output ⇒ Object
Returns the value of attribute output.
Attributes inherited from Task
Instance Method Summary collapse
- #execute(args = nil) ⇒ Object
-
#initialize(name, app) ⇒ RCTask
constructor
A new instance of RCTask.
- #is_rc=(value) ⇒ Object
Methods inherited from Task
#execute_base, #initialize_base, #out, #shortname, #trace?
Constructor Details
#initialize(name, app) ⇒ RCTask
99 100 101 102 103 104 |
# File 'lib/rake/delphi/resources.rb', line 99 def initialize(name, app) super @output = nil @is_rc = false @is_main_icon = false end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
97 98 99 |
# File 'lib/rake/delphi/resources.rb', line 97 def input @input end |
#is_main_icon ⇒ Object
Returns the value of attribute is_main_icon.
98 99 100 |
# File 'lib/rake/delphi/resources.rb', line 98 def is_main_icon @is_main_icon end |
#output ⇒ Object
Returns the value of attribute output.
97 98 99 |
# File 'lib/rake/delphi/resources.rb', line 97 def output @output end |
Instance Method Details
#execute(args = nil) ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/rake/delphi/resources.rb', line 119 def execute(args=nil) v, path, tool = RCResourceCompiler.find(true) a = [] a << '/dRC' if @is_rc a << '/dMAIN_ICON' if @is_main_icon a |= ['/fo', Rake.quotepath('', output), '/r', Rake.quotepath('', input) ] opts = { :args => a } opts.merge!(args) cmd = ([Rake.quotepath('', tool)] | opts[:args]).join(' ') RakeFileUtils.verbose(Logger.debug?) do sh cmd end end |
#is_rc=(value) ⇒ Object
111 112 113 |
# File 'lib/rake/delphi/resources.rb', line 111 def is_rc=(value) @is_rc = ! value.to_s.empty? end |