~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to win32/resource.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-05-21 14:00:19 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070521140019-ui4zd0v80duktssk
Tags: 1.9.0+20070521-1
new upstream snapshot. (2006-07-21)  (Closes: #414856, #388344)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
end
30
30
 
31
31
ruby_icon = rubyw_icon = nil
32
 
[$ruby_name, 'ruby'].each do |i|
 
32
[$ruby_name, 'ruby'].find do |i|
33
33
  if i = icons[i]
34
34
    ruby_icon = "1 ICON DISCARDABLE "+i.dump+"\n"
35
 
    break
36
35
  end
37
36
end
38
 
[$rubyw_name, 'rubyw'].each do |i|
 
37
[$rubyw_name, 'rubyw'].find do |i|
39
38
  if i = icons[i]
40
39
    rubyw_icon = "1 ICON DISCARDABLE "+i.dump+"\n"
41
 
    break
42
40
  end
43
41
end
44
42
dll_icons = []
49
47
[ # base name    extension         file type  desc, icons
50
48
  [$ruby_name,   CONFIG["EXEEXT"], 'VFT_APP', 'CUI', ruby_icon],
51
49
  [$rubyw_name,  CONFIG["EXEEXT"], 'VFT_APP', 'GUI', rubyw_icon || ruby_icon],
52
 
  [$so_name,     '.dll',           'VFT_DLL', 'DLL', dll_icons],
53
 
].each do |base, ext, type, desc, icons|
 
50
  [$so_name,     '.dll',           'VFT_DLL', 'DLL', dll_icons.join],
 
51
].each do |base, ext, type, desc, icon|
54
52
  open(base + '.rc', "w") { |f|
55
53
    f.binmode if /mingw/ =~ RUBY_PLATFORM
56
54
 
60
58
#include <winver.h>
61
59
#endif
62
60
 
63
 
#{icons}
 
61
#{icon || ''}
64
62
VS_VERSION_INFO VERSIONINFO
65
63
 FILEVERSION    #{fversion}
66
64
 PRODUCTVERSION #{fversion}