summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--error.c5
-rw-r--r--version.c12
-rw-r--r--win32/resource.rb9
-rw-r--r--wince/Makefile.sub2
5 files changed, 28 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index ef8cccc..d80d8f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,18 @@
-Fri Apr 23 23:25:22 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Apr 23 23:26:13 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb: $hdrdir should not contain macros for backward
compatibilitiy. [bruby-dev:28]
+ * version.c (ruby_show_copyright): obtain copyright year from
+ RUBY_RELEASE_YEAR.
+
+ * win32/resource.rb: ditto.
+
+ * win32/resource.rb: default rubyw icon to ruby.ico, and let DLL also
+ include them.
+
+ * win32/resource.rb: include winver.h for older WindowsCE.
+
Fri Apr 23 16:38:46 2004 Tanaka Akira <akr@m17n.org>
* lib/pathname.rb: sync taint/freeze flag between
diff --git a/error.c b/error.c
index a6c4952..59ec066 100644
--- a/error.c
+++ b/error.c
@@ -12,7 +12,6 @@
#include "ruby.h"
#include "env.h"
-#include "version.h"
#include "st.h"
#include <stdio.h>
@@ -24,6 +23,8 @@
#define va_init_list(a,b) va_start(a)
#endif
+extern const char ruby_version[], ruby_release_date[], ruby_platform[];
+
int ruby_nerrs;
static int
@@ -202,7 +203,7 @@ rb_bug(fmt, va_alist)
vfprintf(out, fmt, args);
va_end(args);
fprintf(out, "\nruby %s (%s) [%s]\n\n",
- RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
+ ruby_version, ruby_release_date, ruby_platform);
}
abort();
}
diff --git a/version.c b/version.c
index 54051bb..0b80685 100644
--- a/version.c
+++ b/version.c
@@ -14,12 +14,16 @@
#include "version.h"
#include <stdio.h>
+const char ruby_version[] = RUBY_VERSION;
+const char ruby_release_date[] = RUBY_RELEASE_DATE;
+const char ruby_platform[] = RUBY_PLATFORM;
+
void
Init_version()
{
- VALUE v = rb_obj_freeze(rb_str_new2(RUBY_VERSION));
- VALUE d = rb_obj_freeze(rb_str_new2(RUBY_RELEASE_DATE));
- VALUE p = rb_obj_freeze(rb_str_new2(RUBY_PLATFORM));
+ VALUE v = rb_obj_freeze(rb_str_new2(ruby_version));
+ VALUE d = rb_obj_freeze(rb_str_new2(ruby_release_date));
+ VALUE p = rb_obj_freeze(rb_str_new2(ruby_platform));
rb_define_global_const("RUBY_VERSION", v);
rb_define_global_const("RUBY_RELEASE_DATE", d);
@@ -40,6 +44,6 @@ ruby_show_version()
void
ruby_show_copyright()
{
- printf("ruby - Copyright (C) 1993-2003 Yukihiro Matsumoto\n");
+ printf("ruby - Copyright (C) 1993-%d Yukihiro Matsumoto\n", RUBY_RELEASE_YEAR);
exit(0);
}
diff --git a/win32/resource.rb b/win32/resource.rb
index 9ad8772..0bfebf2 100644
--- a/win32/resource.rb
+++ b/win32/resource.rb
@@ -30,13 +30,13 @@ end
ruby_icon = rubyw_icon = nil
[$ruby_name, 'ruby'].each do |i|
- if i = icons.delete(i)
+ if i = icons[i]
ruby_icon = "1 ICON DISCARDABLE "+i.dump+"\n"
break
end
end
[$rubyw_name, 'rubyw'].each do |i|
- if i = icons.delete(i)
+ if i = icons[i]
rubyw_icon = "1 ICON DISCARDABLE "+i.dump+"\n"
break
end
@@ -48,7 +48,7 @@ end
[ # base name extension file type icons
[$ruby_name, CONFIG["EXEEXT"], 'VFT_APP', ruby_icon],
- [$rubyw_name, CONFIG["EXEEXT"], 'VFT_APP', rubyw_icon],
+ [$rubyw_name, CONFIG["EXEEXT"], 'VFT_APP', rubyw_icon || ruby_icon],
[$so_name, '.dll', 'VFT_DLL', dll_icons],
].each do |base, ext, type, icons|
open(base + '.rc', "w") { |f|
@@ -57,6 +57,7 @@ end
f.print <<EOF
#ifndef __BORLANDC__
#include <windows.h>
+#include <winver.h>
#endif
#{icons}
@@ -77,7 +78,7 @@ BEGIN
VALUE "FileVersion", "#{fversion}\\0"
VALUE "Home Page", "http://www.ruby-lang.org/\\0"
VALUE "InternalName", "#{base + ext}\\0"
- VALUE "LegalCopyright", "Copyright (C) 1993-2003 Yukihiro Matsumoto\\0"
+ VALUE "LegalCopyright", "Copyright (C) 1993-#{RUBY_RELEASE_DATE[/\d+/]} Yukihiro Matsumoto\\0"
VALUE "OriginalFilename", "#{base + ext}\\0"
VALUE "Platform", "#{RUBY_PLATFORM}\\0"
VALUE "ProductVersion", "#{fversion}\\0"
diff --git a/wince/Makefile.sub b/wince/Makefile.sub
index b7864d0..fd5aac5 100644
--- a/wince/Makefile.sub
+++ b/wince/Makefile.sub
@@ -527,7 +527,7 @@ rbconfig.rb: miniruby$(EXEEXT) config.status
$(MINIRUBY_WIN) $(srcdir)/wince/mkconfig_wce.rb rbconfig.rb
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
- $(MINIRUBY_WIN) $(srcdir)/wince/resource.rb \
+ $(MINIRUBY_WIN) $(srcdir)/win32/resource.rb \
-ruby_name=$(RUBY_INSTALL_NAME) \
-rubyw_name=$(RUBYW_INSTALL_NAME) \
-so_name=$(RUBY_SO_NAME) \