Project

General

Profile

Actions

Backport #3912

closed

Wrong version numer in windows installer file.

Added by wingfire (Christof Spies) over 13 years ago. Updated almost 13 years ago.

Status:
Closed

Description

=begin
Ruby install file is not containing a propper version number.
http://secunia.com/community/forum/thread/show/5797
http://github.com/oneclick/rubyinstaller/issues/issue/37
=end

Actions #1

Updated by luislavena (Luis Lavena) over 13 years ago

=begin
Just to clarify.

is not Ruby install (the installers) that lack the patchlevel version you're asking but instead the executable and DLLs itself are lacking it.

E.g:

installers:
rubyinstaller-1.9.2-p0 contains as version information 1.9.2.0
rubyinstaller-1.8.7-p302 contains as version information 1.8.7.302

The problem is that ruby.exe, msvcrt-ruby1x.dll and rubyw.exe only contains 1.8.7.0, not exposing the patchlevel.

Also, is a good practice to introduce the problem here and introduce references to other links, that ways make the ticket one-pass read instead of back and forth between links.

--
Luis Lavena

=end

Actions #2

Updated by naruse (Yui NARUSE) over 13 years ago

  • ruby -v set to all

=begin
It has the patchlevel information to provide the Ruby level constant: RUBY_PATCHLEVEL, doesn't it?
=end

Actions #3

Updated by luislavena (Luis Lavena) over 13 years ago

=begin
Hello Yui,

I believe the OP refers to the resource file (.rc) that is attached to the DLL and executables. These lack the patchlevel information and it reports 1.8.7.0 for every single patchlevel released of 1.8.7

The same applies to 1.9.2

RubyInstaller decided to put in the resource information MAJOR.MINOR.BUILD.PATCHLEVEL as expected by these tools, but we didn't alter Ruby own resource file (.rc)

This only affects Windows executables and dlls. External tools cannot invoke "ruby -v" because these could not be the right ones, so the resource information is used to compare the authenticity of the executable

=end

Actions #4

Updated by naruse (Yui NARUSE) over 13 years ago

  • Category set to build
  • Status changed from Open to Assigned
  • Assignee set to shyouhei (Shyouhei Urabe)

=begin
The resource file you said is ruby.rc, I think.
And ruby.rc is generated by win32/resource.rb.

1.9.2's win32/resource.rb writes its PATCHLEVEL.
So 1.9.2 is fixed this bug.
Please try with ruby_1_9_2 branch's head.

1.8.7's situation seems a but.
r26172 but it didn't merge at least r22932.
So this ticket move to Backport187.
=end

Actions #5

Updated by shyouhei (Shyouhei Urabe) over 13 years ago

=begin
Hi Yui, I happen to realize this issue being assigned to me (sorry being lazy).
Which revision should I backport? I suspect r29421 has something to do with it.
=end

Actions #6

Updated by shyouhei (Shyouhei Urabe) over 13 years ago

  • Status changed from Assigned to Feedback

=begin
I think I've backported what's necessary, but I don't have an environment to check it. Can someone confirm?
=end

Actions #7

Updated by luislavena (Luis Lavena) over 13 years ago

=begin
Hello Shyouhei,

The following is a patch that corrects a small typo introduced in r29421, revision.h do not exist on 1.8.7 but instead is called version.h

This patch corrects the issue

diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index fb322c4..734d870 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -38,7 +38,7 @@ $(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
%.res.@OBJEXT@: %.rc
@WINDRES@ --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@

-$(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
+$(RCFILES): $(RBCONFIG) $(srcdir)/version.h $(srcdir)/win32/resource.rb
@$(MINIRUBY) $(srcdir)/win32/resource.rb
-ruby_name=$(RUBY_INSTALL_NAME) -rubyw_name=$(RUBYW_INSTALL_NAME)
-so_name=$(DLL_BASE_NAME)
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index cfbecc9..792481a 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -615,7 +615,7 @@ distclean-local::
@$(RM) ext\config.cache $(RBCONFIG:/=) $(CONFIG_H:/=)
@$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc

-$(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
+$(RCFILES): $(RBCONFIG) $(srcdir)/version.h $(srcdir)/win32/resource.rb
@$(MINIRUBY) $(srcdir)/win32/resource.rb
-ruby_name=$(RUBY_INSTALL_NAME)
-rubyw_name=$(RUBYW_INSTALL_NAME) \

However, PATCHLEVEL is still missing because config.status is not adding it to rbconfig.rb

=end

Actions #8

Updated by shyouhei (Shyouhei Urabe) over 13 years ago

=begin
Thank you.

However, PATCHLEVEL is still missing because config.status is not adding it to rbconfig.rb

Hmm, so this original issue (#3912) isn't fixed yet, is it? I'll manage to work around.
=end

Actions #9

Updated by luislavena (Luis Lavena) over 13 years ago

=begin
Hello Urabe,

With the backport of r22932 (commit at r29908) this issue is solved:

Partial contents of msvcrt-ruby18.rc:

BEGIN
VALUE "FileDescription", "Ruby interpreter (DLL) 1.8.7.326 [i386-mingw32]\0"
VALUE "FileVersion", "1,8,7,326\0"
...
VALUE "ProductVersion", "1,8,7,326\0"

Thank you.
=end

Actions #10

Updated by shyouhei (Shyouhei Urabe) over 13 years ago

  • Status changed from Feedback to Closed

=begin
OK, closed. Thanks for confirmation.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0