rake-delphi 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
data/lib/rake/delphi/dcc32.rb
CHANGED
@@ -229,6 +229,11 @@ module Rake
|
|
229
229
|
@rc_template_task[:releaseCandidate] = properties[:releaseCandidate]
|
230
230
|
@rc_task.input = src
|
231
231
|
@rc_task.is_rc = properties[:releaseCandidate]
|
232
|
+
mainicon_path = File.expand_path2(Rake.unquotepath(@mainicon))
|
233
|
+
@rc_task.is_main_icon = File.exists?(mainicon_path)
|
234
|
+
unless @rc_task.is_main_icon
|
235
|
+
warn "WARNING! Icon file '#{mainicon_path}' does not exists. Application icon is disabled."
|
236
|
+
end
|
232
237
|
return unless properties[:resources_additional]
|
233
238
|
res_add = properties[:resources_additional]
|
234
239
|
if res_add.kind_of?(String)
|
@@ -95,10 +95,12 @@ module Rake
|
|
95
95
|
|
96
96
|
class RCTask < Rake::Task
|
97
97
|
attr_accessor :output, :input
|
98
|
+
attr_reader :is_main_icon
|
98
99
|
def initialize(name, app)
|
99
100
|
super
|
100
101
|
@output = nil
|
101
102
|
@is_rc = false
|
103
|
+
@is_main_icon = false
|
102
104
|
end
|
103
105
|
|
104
106
|
def input=(value)
|
@@ -110,10 +112,15 @@ module Rake
|
|
110
112
|
@is_rc = ! value.to_s.empty?
|
111
113
|
end
|
112
114
|
|
115
|
+
def is_main_icon=(value)
|
116
|
+
@is_main_icon = value
|
117
|
+
end
|
118
|
+
|
113
119
|
def execute(args=nil)
|
114
120
|
v, path, tool = RCResourceCompiler.find(true)
|
115
121
|
a = []
|
116
122
|
a << '/dRC' if @is_rc
|
123
|
+
a << '/dMAIN_ICON' if @is_main_icon
|
117
124
|
a |= ['/fo', Rake.quotepath('', output), '/r', Rake.quotepath('', input) ]
|
118
125
|
opts = { :args => a }
|
119
126
|
opts.merge!(args)
|
data/lib/rake/delphi/version.rb
CHANGED
data/lib/rake/helpers/rake.rb
CHANGED