Building One-Click Installer with latest snapshot source

J

J. D.

Hi,

Has anyone tried building the Ruby One-Click Installer using a
downloaded Ruby stable snapshot?

Can it be done with Visual C++ 6.0? Or the free Visual C++ Toolkit 2003
1.01?
 
C

Curt Hibbs

J. D. said:
Hi,

Has anyone tried building the Ruby One-Click Installer using a
downloaded Ruby stable snapshot?

Can it be done with Visual C++ 6.0? Or the free Visual C++ Toolkit 2003
1.01?

You can use vc++ 6.0 and the results appear to be good, but the FreeRIDE
debugger will not work. I've never been able to figure out why, but the
problem disappears when you build ruby with vc++ 7.1. There is some subtle
difference that makes me wonder what else might not work with a vc++ 6
build. Anyway, for this reason I no longer use vc++ 6 with the cone-click
installer.

I've been meaning to try the free vc++ 7 compiler but I haven't yet had
time.

If you try to build the one-click installer, it has two build targets
"stable" and "dev". The dev target is meant for building from any version of
ruby source you already have on your machine. However, I haven't touched the
dev target in a while and I'm willing to bet its broken. So, I would suggest
using the stable target and modifying the Package.new statement on line 119
of builder.rb to specify the version of ruby that you want built.

Joao Pedrosa posted instructions on RubyGarden for setting up the free vc++
7 compiler. You can find them here:

http://www.rubygarden.org/ruby?WindowsCompiler

Good luck!

Curt
 
J

J. D.

Curt said:
If you try to build the one-click installer, it has two build targets
"stable" and "dev". The dev target is meant for building from any version of
ruby source you already have on your machine. However, I haven't touched the
dev target in a while and I'm willing to bet its broken. So, I would suggest
using the stable target and modifying the Package.new statement on line 119
of builder.rb to specify the version of ruby that you want built.

Curt,

Thanks for the info!

I tried building the one-click installer using the latest stable
snapshot. The only change I made was replacing line 119 in builder.rb to:

"ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz",

My current install of ruby is in d:\apps\ruby. And I'm trying to build
from t:\rubyinstaller. Not sure if the different drive letters is what
is causing the problem but here's what I get using VC Toolkit 2003 1.01:


***********************************************************

Building Version 182-14

***********************************************************
--------
Ruby
--------

Downloading stable-snapshot.tar.gz from ftp.ruby-lang.org
Checking 'ruby-1.8.2'
copy stable-snapshot.tar.gz temp.tgz
1 file(s) copied.
gzip -d stable-snapshot.tar.gz
rename temp.tgz stable-snapshot.tar.gz
tar -xf stable-snapshot.tar
cd ruby-1.8.2
d:/apps/ruby/lib/ruby/1.8/fileutils.rb:98:in `chdir': No such file or
directory
- ruby-1.8.2 (Errno::ENOENT)
from d:/apps/ruby/lib/ruby/1.8/fileutils.rb:98:in `cd'
from ./commands.rb:184:in `run'
from ./commands.rb:167:in `each'
from ./commands.rb:167:in `run'
from ./package.rb:114:in `initialize'
from builder.rb:119:in `new'
from builder.rb:119
NMAKE : fatal error U1077: 'ruby.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077:
'D:\apps\Microsoft_VCToolkit2003\bin\nmake.exe' : ret
urn code '0x2'
Stop.
 
J

J. D.

I changed another line and created the directory to fix the problem.

Long story short, line 123 fo builder.rb was changed to:

T:/rubyinstaller/rubyinstaller/installer-win/stable/download/ruby

And it seems to work now. The clue was the attempt to 'cd win32' and
run 'configure.bat'.
 
C

Curt Hibbs

J. D. said:
Curt,

Thanks for the info!

I tried building the one-click installer using the latest stable
snapshot. The only change I made was replacing line 119 in builder.rb to:

"ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz",

My current install of ruby is in d:\apps\ruby. And I'm trying to build
from t:\rubyinstaller. Not sure if the different drive letters is what
is causing the problem but here's what I get using VC Toolkit 2003 1.01:

The problem is the preview release tarball unpacks into a directory named
"ruby-1.8.2" while the stable snapshot tarball unpacks into a directory
named "ruby". So in addition to changing the URL parameter of where to get
Ruby, you also need to change the following parameter that specifies the
unpack directory.

Curt
 
J

J. D.

I got past the FXRuby and Expat installation screens. The build
continued until the following error. I'll put together notes from this
exercise and post it in a useful format once I get this to build
successfully.

Thanks for helping.

----

T:\rubyinstaller\rubyinstaller\installer-win\stable\download\xmlparser>nmake
/NO
LOGO
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-IT:/rubyinstaller/rubyinstaller/ins
taller-win/stable/lib/ruby/1.8/i386-mswin32
-IT:/rubyinstaller/rubyinstaller/ins
taller-win/stable/lib/ruby/1.8/i386-mswin32 -I. -DHAVE_EXPAT_H
-DHAVE_XML_SETNOT
STANDALONEHANDLER -DHAVE_XML_SETPARAMENTITYPARSING
-DHAVE_XML_SETDOCTYPEDECLHAND
LER -DHAVE_XML_PARSERRESET -DHAVE_XML_SETSKIPPEDENTITYHANDLER
-DHAVE_XML_GETFEAT
URELIST -DHAVE_XML_USEFOREIGNDTD -DHAVE_XML_GETIDATTRIBUTEINDEX
-IT:/rubyinstall
er/rubyinstaller/installer-win/stable/download/Expat-1.95.7/Source/lib
-I. -I./.
.. -I./../missing -DNEW_EXPAT -DXML_DTD -c -Tcxmlparser.c
xmlparser.c
xmlparser.c(530) : error C2143: syntax error : missing ';' before 'type'
xmlparser.c(533) : error C2065: 'content' : undeclared identifier
xmlparser.c(933) : error C2143: syntax error : missing ';' before 'type'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

T:\rubyinstaller\rubyinstaller\installer-win\stable\download\xmlparser>nmake
ins
tall /NOLOGO
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-IT:/rubyinstaller/rubyinstaller/ins
taller-win/stable/lib/ruby/1.8/i386-mswin32
-IT:/rubyinstaller/rubyinstaller/ins
taller-win/stable/lib/ruby/1.8/i386-mswin32 -I. -DHAVE_EXPAT_H
-DHAVE_XML_SETNOT
STANDALONEHANDLER -DHAVE_XML_SETPARAMENTITYPARSING
-DHAVE_XML_SETDOCTYPEDECLHAND
LER -DHAVE_XML_PARSERRESET -DHAVE_XML_SETSKIPPEDENTITYHANDLER
-DHAVE_XML_GETFEAT
URELIST -DHAVE_XML_USEFOREIGNDTD -DHAVE_XML_GETIDATTRIBUTEINDEX
-IT:/rubyinstall
er/rubyinstaller/installer-win/stable/download/Expat-1.95.7/Source/lib
-I. -I./.
.. -I./../missing -DNEW_EXPAT -DXML_DTD -c -Tcxmlparser.c
xmlparser.c
xmlparser.c(530) : error C2143: syntax error : missing ';' before 'type'
xmlparser.c(533) : error C2065: 'content' : undeclared identifier
xmlparser.c(933) : error C2143: syntax error : missing ';' before 'type'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
../commands.rb:199:in `run': Command failed: (RuntimeError)
from ./commands.rb:167:in `each'
from ./commands.rb:167:in `run'
from ./commands.rb:117:in `extconf'
from builder.rb:247
from builder.rb:225:in `instance_eval'
from ./package.rb:131:in `instance_eval'
from ./package.rb:131:in `initialize'
from builder.rb:225:in `new'
from builder.rb:225
NMAKE : fatal error U1077: 'ruby.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077:
'D:\apps\Microsoft_VCToolkit2003\bin\nmake.exe' : ret
urn code '0x2'
Stop.
 
C

Curt Hibbs

J. D. said:
I got past the FXRuby and Expat installation screens. The build
continued until the following error. I'll put together notes from this
exercise and post it in a useful format once I get this to build
successfully.

How about updating the readme and sending it to me. I can then check that in
to cvs.

I have a patch for the compile error you are getting. In the directory:

...\installer-win\local\Patch-182

you'll find a patched version of "xmlparser.c". Use this to replace the one
that came with xmlparser in:

...\installer-win\stable\download\xmlparser

and you should get past this error.

Feel free to email me directly (curt at hibbs dot com), and we can help keep
the noise level down on ruby-talk.

Curt
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top