lib/rake/delphi/resources.rb in rake-delphi-0.0.5 vs lib/rake/delphi/resources.rb in rake-delphi-0.0.6
- old
+ new
@@ -93,14 +93,16 @@
end
end
class RCTask < Rake::Task
attr_accessor :output, :input
+ attr_reader :is_main_icon
def initialize(name, app)
super
@output = nil
@is_rc = false
+ @is_main_icon = false
end
def input=(value)
@input = value.pathmap('%X.rc')
@output = @input.pathmap('%X.res')
@@ -108,13 +110,18 @@
def is_rc=(value)
@is_rc = ! value.to_s.empty?
end
+ def is_main_icon=(value)
+ @is_main_icon = value
+ end
+
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