From: Glenn Smith Date: 2006-03-16T04:16:51+09:00 Subject: Re: How to compile Ruby on Windows ------=_Part_8817_19935214.1142450193830 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Blimey! And on Linux? ./configure; make; sudo make install :o) I accept that you know what you are talking about Wilson, but surely there is a much easier way? And bear in mind that what we are wanting to achieve here is a compile-on-windows FAQ that is standard so that all of the variou= s ruby libraries will also work. Is there no single-downloadable compiler that will compile, link and instal= l (ie. provider compiler, linker and make tool) that will provide good executables with reasonable performance and minimal hassle? Glenn On 15/03/06, Wilson Bilkovich wrote: > > On 3/15/06, Daniel V=F6lkerts wrote: > > Glenn Smith schrieb: > > > > > A proper, official, supported "how-to" with the correct > build-environment > > > configs, versions of tools (MAKE, LIB etc.) and so on would be > great. That > > > way we could at least all be "singing from the same sheet". > > > > +1 But I suggest a ruby-dev list in english, as my japanese is very poo= r > > ;) The summaries are fine but they don't provide any further help. If I > > had an english discussion list, I properbly able to collect the > > information I need. So the chance that someone writes a tutorial or > > HOWTO will increase. > > > > Download and install the following: > 1. Visual C++ Toolkit 2003 (free) > http://msdn.microsoft.com/visualc/vctoolkit2003/ > > 2. MS Platform SDK 2003 (free. Uncheck everything but the "Core" > entry. You want everything under Core, even if you don't have a 64bit > machine. Some of the important tools are only part of the 64bit > section.) > > http://www.microsoft.com/downloads/details.aspx?FamilyId=3DA55B6B43-E24F-= 4EA3-A93E-40C0EC4F68E5&displaylang=3Den > > 3. MS .NET Framework 1.1 (a prerequisite for #4) > > http://www.microsoft.com/downloads/details.aspx?familyid=3D262d25e3-f589-= 4842-8157-034d1e7cf3a3&displaylang=3Den > > 4. MS .NET SDK 1.1 (not 2.0.) > > http://www.microsoft.com/downloads/details.aspx?familyid=3D9b3a2ca6-3647-= 4070-9f41-a333c6b9181d&displaylang=3Den > > Once you've downloaded and installed these, you'll need to configure > your environment variables. Here's what my vcvars32.bat file looks > like: (Sorry about the line breaks. You'll need to remove those.) > > @echo off > Set PATH=3DC:\Program Files\Microsoft Visual C++ Toolkit > 2003\bin;C:\Program Files\Microsoft Platform SDK\Bin;C:\Program > Files\Microsoft Platform SDK\Bin\win64\x86\AMD64;%PATH% > Set INCLUDE=3DC:\Program Files\Microsoft Visual C++ Toolkit > 2003\include;C:\Program Files\Microsoft Platform > SDK\Include;C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\include;%INCLUDE% > Set LIB=3DC:\Program Files\Microsoft Visual C++ Toolkit > 2003\lib;C:\Program Files\Microsoft Platform SDK\Lib;C:\Program > Files\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB% > > Those should be the default installation folders for the Microsoft > tools, but if you put them elsewhere, simply modify the batch file to > suit. Note that you need the AMD64 tools in your path even if you > have a 32bit machine. For some crazy reason, that's where Microsoft > put some of the important tools. > > Download the latest Ruby release from: > http://www.ruby-lang.org/en/20020102.html > You can either get the 1.8.4 release, or the 'stable snapshot', which > includes fixes since the last release. The first time you try to get > this working, I recommend the regular release. > > Uncompress the download into a folder that doesn't have any spaces in the > name. > For the purposes of this howto, let's say that's c:\ruby-src\ > If I explained myself clearly, you will now have a folder called > c:\ruby-src\ruby-1.8.4\, with various things under it, including > c:\ruby-src\ruby-1.8.4\win32\ > If you download a different release than 1.8.4, that folder name might > be different. > > To avoid cluttering up this directory with temporary files, we'll do > the actual build elsewhere. > Make a folder called c:\ruby-src\build\ > > Open a command prompt by clicking a shortcut, or typing "cmd" into the > Start -> Run prompt. > Run the "vcvars32.bat" file you made earlier, which will add the > Microsoft tools to your environment. This means, by the way, that it > should be somewhere in your default PATH. > > =3D=3D=3D=3D SCARY HACK SECTION =3D=3D=3D=3D > The Microsoft tools previously included a pair of utilities, "lib" and > "dumpbin", which acted as front-ends for the "link.exe" command. > Luckily, the 64bit directory in the Platform SDK includes "lib.exe", > but we still need to deal with dumpbin.exe. Sadly, none of the free > downloads seem to include it. > Ruby 1.9/2.0 shouldn't have this problem, and you can skip this step > if you have the full Visual Studio 2003. > > Go to c:\ruby-src\ruby-1.8.4\win32\, and edit the following file: > mkexports.rb > On line 6, change the command inside the double-quotes of IO.foreach. > change: "|dumpbin -symbols " > to: "|link /dump /symbols " > Don't forget the space at the end. > =3D=3D=3D=3D END SCARY HACK =3D=3D=3D=3D > > Change your current directory to c:\ruby-src\build\ > Run the following commands, in order: > c:\ruby-src\ruby-1.8.4\win32\configure.bat (yes, you need to refer to > it by its full path.) > nmake > nmake test > nmake DESTDIR=3Dc:/ruby install > The final command allows you to specify where you actually want Ruby > to be installed. > Note the forward slash instead of backslash. > There are more examples in the README.win32 file, found in the > c:\ruby-src\ruby-1.8.4\win32\ folder. > > So simple, even a child could operate it! > > -- All the best Glenn Aylesbury, UK ------=_Part_8817_19935214.1142450193830--