[ANN] Ruby Installer for Windows 1.8.1-13 final

C

Curt Hibbs

Lothar said:
Is it possible to use a schema like python for adding information to
the registry about installed ruby versions. Every tool writer (like
me) needs this to detect the core library etc and also installer
programs for libraries should use it to install there stuff in the
right ruby directory.

Python installs under:

"HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\{major}.{minor}"

at least two things:

"InstallPath", and "Help\Main Python Documentation"

The later one would be the pragmatic programmer *.chm file.
It would be a great help if we could do the same.
What's your oppinion about this ?

This is fine with me. When there are multiple versions installed, there also
needs to be a pointer to the default installation (the one that is on the
path). wxRuby currently uses this to decide where to install itself.

Is there anyone out there (other than wxRuby) that is using the current
registry schema?

How's this look (as an example relative to "HKEY_LOCAL_MACHINE\SOFTWARE"):

Ruby\RubyCore\default = "182-14"
Ruby\RubyCore\182-14\InstallPath = "c:\ruby"
Ruby\RubyCore\182-14\InstallDate = "June 30, 2004"
Ruby\RubyCore\182-14\Version = "1.8.2"
Ruby\RubyCore\182-14\Help\Main Ruby Documentation =
"c:\ruby\ProgrammingRuby.chm"

Curt
 
L

Lothar Scholz

Hello Curt,

CH> This is fine with me. When there are multiple versions installed, there also
CH> needs to be a pointer to the default installation (the one that is on the
CH> path). wxRuby currently uses this to decide where to install itself.

CH> Is there anyone out there (other than wxRuby) that is using the current
CH> registry schema?

CH> How's this look (as an example relative to
CH> "HKEY_LOCAL_MACHINE\SOFTWARE"):

CH> Ruby\RubyCore\default = "182-14"
CH> Ruby\RubyCore\182-14\InstallPath = "c:\ruby"
CH> Ruby\RubyCore\182-14\InstallDate = "June 30, 2004"
CH> Ruby\RubyCore\182-14\Version = "1.8.2"
CH> Ruby\RubyCore\182-14\Help\Main Ruby Documentation =
CH> "c:\ruby\ProgrammingRuby.chm"

I vote against it because it assumes that your installer is the only
one in the windows world. For example in the first month i shipped my
own ruby distribution with my IDE and maybe i will do this later again
when i target people at "download.com" or "winfiles.com" to try
another programming language. While the core should be the same, the
"site-lib" directory tree could be different.

So whats about:

Ruby\RubyCore\default = "1.8.2"
Ruby\RubyCore\1.8.2\default = "1.8.2\14pp"
Ruby\RubyCore\1.8.2\pp14\InstallPath = "c:\ruby"
Ruby\RubyCore\1.8.2\pp14\InstallDate = "June 30, 2004"
Ruby\RubyCore\1.8.2\pp14\Help\Main Ruby Documentation = "c:\ruby\ProgrammingRuby.chm"

"pp14" is a shortcut for "pragmatic programmers" or however you want
call it, maybe only 14 because this is the installer for the masses.

You see the problem in the python world where there is the
www.python.org installer and then there exists also a few
"scientific" pythons and of course the one from ActiveState.

Think that my solution is a little bit more flexible, and its only a
few lines more for persons who use it/write it.
 
C

Curt Hibbs

Lothar said:
Hello Curt,

CH> This is fine with me. When there are multiple versions
installed, there also
CH> needs to be a pointer to the default installation (the one
that is on the
CH> path). wxRuby currently uses this to decide where to install itself.

CH> Is there anyone out there (other than wxRuby) that is using
the current
CH> registry schema?

CH> How's this look (as an example relative to
CH> "HKEY_LOCAL_MACHINE\SOFTWARE"):

CH> Ruby\RubyCore\default = "182-14"
CH> Ruby\RubyCore\182-14\InstallPath = "c:\ruby"
CH> Ruby\RubyCore\182-14\InstallDate = "June 30, 2004"
CH> Ruby\RubyCore\182-14\Version = "1.8.2"
CH> Ruby\RubyCore\182-14\Help\Main Ruby Documentation =
CH> "c:\ruby\ProgrammingRuby.chm"

I vote against it because it assumes that your installer is the only
one in the windows world. For example in the first month i shipped my
own ruby distribution with my IDE and maybe i will do this later again
when i target people at "download.com" or "winfiles.com" to try
another programming language. While the core should be the same, the
"site-lib" directory tree could be different.

So whats about:

Ruby\RubyCore\default = "1.8.2"
Ruby\RubyCore\1.8.2\default = "1.8.2\14pp"
Ruby\RubyCore\1.8.2\pp14\InstallPath = "c:\ruby"
Ruby\RubyCore\1.8.2\pp14\InstallDate = "June 30, 2004"
Ruby\RubyCore\1.8.2\pp14\Help\Main Ruby Documentation =
"c:\ruby\ProgrammingRuby.chm"

"pp14" is a shortcut for "pragmatic programmers" or however you want
call it, maybe only 14 because this is the installer for the masses.

You see the problem in the python world where there is the
www.python.org installer and then there exists also a few
"scientific" pythons and of course the one from ActiveState.

Think that my solution is a little bit more flexible, and its only a
few lines more for persons who use it/write it.

This sounds reasonable to me, and it doesn't look like anyone else (besides
me in wxRuby) is using these registry entries, so I don't have to worry
about breaking things for anyone else.

Curt
 
V

vruz

RC3 adds back the missing support for OpenGL. There were no other changes,
so if you don't need OpenGL, then you don't need to download RC3.

Curt

Hello,

Are you thinking of including wxRuby in the Rubyinstaller as well ?

cheers,
vruz
 
L

Lothar Scholz

Hello vruz,


v> Are you thinking of including wxRuby in the Rubyinstaller as well ?

Yes please - if you think it is stable enough. "0.3" was not stable
even for minor things.

And whats about adding including SQLite library ?
 
C

Curt Hibbs

Lothar said:
Hello vruz,


v> Are you thinking of including wxRuby in the Rubyinstaller as well ?

Yes please - if you think it is stable enough. "0.3" was not stable
even for minor things.

And whats about adding including SQLite library ?

The list of desirable inclusions could easily be endless and very much
subject to individual preferences.

What I want to do is to include a GUI based RubyGems browser that would let
you choose what packages (or named groups of packages) that you would like
to install. This RubyGems browser/installer should also be runnable at any
time after the initial installation to add or remove installed packages.

Two make this a reality, two things need to happen:

1) A GUI-based RubyGems browser needs to be written (I was going to do this,
but due to my time constraints, Lyle Johnson is working on it).

2) More Ruby developers need to create RubyGem packages of their work.

In the meantime, I will probably resist making changes to the list of
pre-installed packages unless there is a compelling reason to do so.

Curt

PS
With the next version of wxRuby I hope to be able to package it up as a
RubyGem
 
L

Lothar Scholz

Hello Curt,

The Ruby Installer still conflicts with because the TCL_LIBRARY is set
to a value that python can't handle (python needs TCL 8.4).

I think this is a show stopper bug.

I really get angry every time i install Ruby and can't access "idle"
(which is Python's standard IDE) anymore.

Can you please patch the main function in rubys "main.c" file
until the tk maintainer fixes this in the right place.

=============================================================================
int
main(argc, argv, envp)
int argc;
char **argv, **envp;
{
#ifdef _WIN32
NtInitialize(&argc, &argv);
#endif
#if defined(__MACOS__) && defined(__MWERKS__)
argc = ccommand(&argv);
#endif
#ifdef _WIN32 /*added by Scriptolutions*/
{char buf[280];
if (GetEnvironmentVariable("RUBY_TCL_LIBRARY",buf,sizeof(buf)-1) < 280) {
SetEnvironmentVariable("TCL_LIBRARY",buf);
}}
#endif
ruby_init();
ruby_options(argc, argv);
ruby_run();
return 0;
}
=============================================================================

And then change the TCL_LIBRARY environment variable name that you set in the installer
against a RUBY_TCL_LIBRARY.

This patch should work and i used it a few month ago when i shipped my own
Ruby Installer together with my IDE.
 
C

Curt Hibbs

Sure, I will apply this patch in the next Release Candidate (this could be a
few days, I'm recovering from a crashed system, plus I hope the 1.8.2 Ruby
release will be out soon).

Thanks,
Curt

Lothar said:
Hello Curt,

The Ruby Installer still conflicts with because the TCL_LIBRARY is set
to a value that python can't handle (python needs TCL 8.4).

I think this is a show stopper bug.

I really get angry every time i install Ruby and can't access "idle"
(which is Python's standard IDE) anymore.

Can you please patch the main function in rubys "main.c" file
until the tk maintainer fixes this in the right place.

==================================================================
===========
int
main(argc, argv, envp)
int argc;
char **argv, **envp;
{
#ifdef _WIN32
NtInitialize(&argc, &argv);
#endif
#if defined(__MACOS__) && defined(__MWERKS__)
argc = ccommand(&argv);
#endif
#ifdef _WIN32 /*added by Scriptolutions*/
{char buf[280];
if
(GetEnvironmentVariable("RUBY_TCL_LIBRARY",buf,sizeof(buf)-1) < 280) {
SetEnvironmentVariable("TCL_LIBRARY",buf);
}}
#endif
ruby_init();
ruby_options(argc, argv);
ruby_run();
return 0;
}
==================================================================
===========

And then change the TCL_LIBRARY environment variable name that
you set in the installer
against a RUBY_TCL_LIBRARY.

This patch should work and i used it a few month ago when i shipped my own
Ruby Installer together with my IDE.


--
Best regards, emailto: scholz at
scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's
 
N

nobu.nokada

Hi,

At Thu, 8 Jul 2004 04:50:28 +0900,
Lothar Scholz wrote in [ruby-talk:105519]:
Can you please patch the main function in rubys "main.c" file
until the tk maintainer fixes this in the right place.

This should not be in main.c. How are the tcl/tk files
and directories in RC2 layouted?
 
H

Hidetoshi NAGAI

Hi,

From: Lothar Scholz <[email protected]>
Subject: Re: [ANN] **RC2** Ruby Installer for Windows 1.8.2-14 Release Candidate
Date: Thu, 8 Jul 2004 04:50:28 +0900
Message-ID: said:
The Ruby Installer still conflicts with because the TCL_LIBRARY is set
to a value that python can't handle (python needs TCL 8.4).

I think this is a show stopper bug.

I really get angry every time i install Ruby and can't access "idle"
(which is Python's standard IDE) anymore.

Can you please patch the main function in rubys "main.c" file
until the tk maintainer fixes this in the right place.

I'll modify Init_tcltklib() of tcltklib.c such like the following.

==================================================================
RCS file: /var/cvs/src/ruby/ext/tcltklib/tcltklib.c,v
retrieving revision 1.49.2.5
diff -u -r1.49.2.5 tcltklib.c
--- tcltklib.c 1 Jul 2004 09:38:38 -0000 1.49.2.5
+++ tcltklib.c 8 Jul 2004 03:06:51 -0000
@@ -5133,6 +5133,11 @@
}
#endif

+
+/* RUBYTK_xxx=v1, xxx=v2 --> xxx=v1, X_RUBYTK_xxx=v2 */
+static char *convertRubyTkEnvVarScript = "ENV.keys.each{|k| if (k=~/^RUBYTK_(.*)/) then kc=$1; kx='X_RUBYTK_'+kc; if ENV.key?(kc)&&!ENV.key?(kx) then ENV[kx]=ENV[kc] end; ENV[kc]=ENV[k]; ENV.delete(k) end}";
+
+
/*---- initialization ----*/
void
Init_tcltklib()
@@ -5145,6 +5150,10 @@
VALUE ev_flag = rb_define_module_under(lib, "EventFlag");
VALUE var_flag = rb_define_module_under(lib, "VarAccessFlag");

+ /* --------------------------------------------------------------- */
+
+ rb_eval_string(convertRubyTkEnvVarScript);
+
/* --------------------------------------------------------------- */

#if defined USE_TCL_STUBS && defined USE_TK_STUBS
==================================================================

As you see in the patch, when require 'tcltklib', environment variables
which starts 'RUBYTK_' replace to the one removed 'RUBYTK_' (e.g.
RUBYTK_TCL_LIBRARY --> TCL_LIBRARY).
If the target enviromnent variable already exists and the backup
variable does not exist (it means that to make backup is only once),
the backup variable are make (e.g. TCL_LIBRARY --> X_RUBYTK_TCL_LIBRARY).

Can it satisfy you? :)
 
L

Lothar Scholz

Hello Hidetoshi,

HN> Hi,

HN> As you see in the patch, when require 'tcltklib', environment variables
HN> which starts 'RUBYTK_' replace to the one removed 'RUBYTK_' (e.g.
HN> RUBYTK_TCL_LIBRARY --> TCL_LIBRARY).
HN> If the target enviromnent variable already exists and the backup
HN> variable does not exist (it means that to make backup is only once),
HN> the backup variable are make (e.g. TCL_LIBRARY --> X_RUBYTK_TCL_LIBRARY).

HN> Can it satisfy you? :)

Yes, thats better.
 
N

nobu.nokada

Hi,

At Thu, 8 Jul 2004 12:23:43 +0900,
Hidetoshi NAGAI wrote in [ruby-talk:105546]:
I'll modify Init_tcltklib() of tcltklib.c such like the following.

No, eban says those environment variables are not need at all.
RubyInstaller should just set PATH, but not TCL_LIBRARY. And
RUBY_{TCL,TK}_DLL are used only if tcltklib is compiled with
--enable-tcltk_stubs, but RubyInstaller doesn't.
 
C

Curt Hibbs

Hi,

At Thu, 8 Jul 2004 12:23:43 +0900,
Hidetoshi NAGAI wrote in [ruby-talk:105546]:
I'll modify Init_tcltklib() of tcltklib.c such like the following.

No, eban says those environment variables are not need at all.
RubyInstaller should just set PATH, but not TCL_LIBRARY. And
RUBY_{TCL,TK}_DLL are used only if tcltklib is compiled with
--enable-tcltk_stubs, but RubyInstaller doesn't.

Good, I like that even better! I will change the installer to not set
TCL_LIBRARY.

Curt
 
H

Hidetoshi NAGAI

From: (e-mail address removed)
Subject: Re: [ANN] **RC2** Ruby Installer for Windows 1.8.2-14 Release Candidate
Date: Thu, 8 Jul 2004 12:49:59 +0900
Message-ID: said:
No, eban says those environment variables are not need at all.
RubyInstaller should just set PATH, but not TCL_LIBRARY. And
RUBY_{TCL,TK}_DLL are used only if tcltklib is compiled with
--enable-tcltk_stubs, but RubyInstaller doesn't.

Hmmm... I see. I don't change tcltklib.c.
 
N

nobu.nokada

Hi,

At Thu, 8 Jul 2004 20:06:36 +0900,
Curt Hibbs wrote in [ruby-talk:105566]:
Good, I like that even better! I will change the installer to not set
TCL_LIBRARY.

Correction: It couldn't find tk.tcl file when it just is not
set. It worked by moving tcl/lib/* to lib.

Another issue, there are identical files under samples/sample
and doc/Tcl/Tk-1.8.1/sample, except for several files only in
the former. Instead, *.{rb,so,lib} underneath lib are
superfluous, since they exist also under lib/ruby/1.8 and never
be used.
 
C

Curt Hibbs

At Thu, 8 Jul 2004 20:06:36 +0900,
Curt Hibbs wrote in [ruby-talk:105566]:
Good, I like that even better! I will change the installer to not set
TCL_LIBRARY.

Correction: It couldn't find tk.tcl file when it just is not
set. It worked by moving tcl/lib/* to lib.

Another issue, there are identical files under samples/sample
and doc/Tcl/Tk-1.8.1/sample, except for several files only in
the former. Instead, *.{rb,so,lib} underneath lib are
superfluous, since they exist also under lib/ruby/1.8 and never
be used.

Ok, thanks! I will do this.

Curt
 
G

gabriele renzi

At Thu, 8 Jul 2004 20:06:36 +0900,
Curt Hibbs wrote in [ruby-talk:105566]:
No, eban says those environment variables are not need at all.
RubyInstaller should just set PATH, but not TCL_LIBRARY. And
RUBY_{TCL,TK}_DLL are used only if tcltklib is compiled with
--enable-tcltk_stubs, but RubyInstaller doesn't.

Good, I like that even better! I will change the installer to not set
TCL_LIBRARY.

Correction: It couldn't find tk.tcl file when it just is not
set. It worked by moving tcl/lib/* to lib.

Another issue, there are identical files under samples/sample
and doc/Tcl/Tk-1.8.1/sample, except for several files only in
the former. Instead, *.{rb,so,lib} underneath lib are
superfluous, since they exist also under lib/ruby/1.8 and never
be used.

Ok, thanks! I will do this.

also: it would be nice if
<rubydir>\doc\Ruby-1.8.2-snapshot\sample

could go in
<rubydir>\samples
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top