3 = How to build ruby using Visual C++
7 (1) Visual C++ 5.0 or later.
9 Note: if you want to build x64 or ia64 version, use native compiler for
12 (2) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH}))
13 to run required commands properly from the command line.
15 Note: building ruby requires following commands.
21 (3) If you want to build from SVN source, following commands are required.
26 == How to compile and install
28 (1) Execute win32\configure.bat on your build directory.
29 You can specify the target platform as an argument.
30 For example, run `((%configure --target=i686-mswin32%))'
31 You can also specify the install directory.
32 For example, run `((%configure --prefix=<install_directory>%))'
33 Default of the install directory is /usr .
35 (2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile}))
36 if you want to change the name of the executable files.
37 And add ((|RUBYW_INSTALL_NAME|)) to change the name of the
38 executable without console window if also you want.
42 (4) Run `((%nmake test%))'
44 (5) Run `((%nmake install%))'
46 This command will create following directories and install files onto them.
47 * <install_directory>\bin
48 * <install_directory>\lib
49 * <install_directory>\lib\ruby
50 * <install_directory>\lib\ruby\<MAJOR>.<MINOR>
51 * <install_directory>\lib\ruby\<MAJOR>.<MINOR>\<PLATFORM>
52 * <install_directory>\lib\ruby\site_ruby
53 * <install_directory>\lib\ruby\site_ruby\<MAJOR>.<MINOR>
54 * <install_directory>\lib\ruby\site_ruby\<MAJOR>.<MINOR>\<PLATFORM>
55 * <install_directory>\man\man1
56 If Ruby's version is `x.y.z', the ((|<MAJOR>|)) is `x' and the ((|<MINOR>|)) is `y'.
57 The default ((|<PLATFORM>|)) is `(({i386-mswin32}))'.
61 Any icon files(*.ico) in the build directory, directories specified with
62 ((|icondirs|)) make variable and (({win32})) directory under the ruby
63 source directory will be included in DLL or executable files, according
65 $(RUBY_INSTALL_NAME).ico or ruby.ico --> $(RUBY_INSTALL_NAME).exe
66 $(RUBYW_INSTALL_NAME).ico or rubyw.ico --> $(RUBYW_INSTALL_NAME).exe
67 the others --> $(RUBY_SO_NAME).dll
69 Although no icons are distributed with the ruby source or in the official
70 site, you can use anything you like. For example, followings are written
71 in Japanese, but you can download at least.
73 * ((<URL:http://homepage1.nifty.com/a_nakata/ruby/>)) or
74 ((<icon itself|URL:http://homepage1.nifty.com/a_nakata/ruby/RubyIcon.ico>))
78 * Build on the ruby source directory.
81 ruby source directory: C:\ruby
82 build directory: C:\ruby
83 install directory: C:\usr\local
87 win32\configure --prefix=/usr/local
92 * Build on the relative directory from the ruby source directory.
95 ruby source directory: C:\ruby
96 build directory: C:\ruby\mswin32
97 install directory: C:\usr\local
103 ..\win32\configure --prefix=/usr/local
108 * Build on the different drive.
111 ruby source directory: C:\src\ruby
112 build directory: D:\build\ruby
113 install directory: C:\usr\local
117 C:\src\ruby\win32\configure --prefix=C:/usr/local
122 * Build x64 version (requires native x64 VC++ compiler)
125 ruby source directory: C:\ruby
126 build directory: C:\ruby
127 install directory: C:\usr\local
131 win32\configure --prefix=/usr/local --target=x64-mswin64
138 You can ((*NOT*)) use a path name contains any white space characters as
139 the ruby source directory, this restriction comes from the behavior of
140 (({!INCLUDE})) directives of (({NMAKE})).
141 ((- you may call it a bug. -))