diff options
Diffstat (limited to 'win32/resource.rb')
-rw-r--r-- | win32/resource.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/win32/resource.rb b/win32/resource.rb index e8c3ed88c7..cb62fb97c4 100644 --- a/win32/resource.rb +++ b/win32/resource.rb @@ -29,16 +29,14 @@ else end ruby_icon = rubyw_icon = nil -[$ruby_name, 'ruby'].each do |i| +[$ruby_name, 'ruby'].find do |i| if i = icons[i] ruby_icon = "1 ICON DISCARDABLE "+i.dump+"\n" - break end end -[$rubyw_name, 'rubyw'].each do |i| +[$rubyw_name, 'rubyw'].find do |i| if i = icons[i] rubyw_icon = "1 ICON DISCARDABLE "+i.dump+"\n" - break end end dll_icons = [] @@ -49,7 +47,7 @@ end [ # base name extension file type desc, icons [$ruby_name, CONFIG["EXEEXT"], 'VFT_APP', 'CUI', ruby_icon], [$rubyw_name, CONFIG["EXEEXT"], 'VFT_APP', 'GUI', rubyw_icon || ruby_icon], - [$so_name, '.dll', 'VFT_DLL', 'DLL', dll_icons], + [$so_name, '.dll', 'VFT_DLL', 'DLL', dll_icons.join], ].each do |base, ext, type, desc, icons| open(base + '.rc', "w") { |f| f.binmode if /mingw/ =~ RUBY_PLATFORM @@ -60,7 +58,7 @@ end #include <winver.h> #endif -#{icons ? icons.join : ''} +#{icons || ''} VS_VERSION_INFO VERSIONINFO FILEVERSION #{fversion} PRODUCTVERSION #{fversion} |