1=begin 2 3= How to build ruby using Borland C++ 4 5== Requirement 6 7(1) Borland C++ 5.0 or later. 8 9(2) Please set environment variable (({PATH})) 10 to run required commands properly from the command line. 11 12 Note: building ruby requires following commands. 13 * make 14 * bcc32 15 * tlib 16 * ilink32 17 18(3) If you want to build from CVS source, following commands are required. 19 * bison ((<URL:http://gnuwin32.sourceforge.net/packages/bison.htm>)) 20 * sed ((<URL:http://gnuwin32.sourceforge.net/packages/sed.htm>)) 21 22(4) We strongly recommend to build ruby on C++Builder, to link following files. 23 * usebormm.lib 24 * memmgr.lib 25 26 RTL's internal memory manager cannot handle large memory block properly, 27 so we should use borlndmm.dll instead. 28 10000.times { "" << "." * 529671; GC.start } # crash 29 30== How to compile and install 31 32(1) Execute bcc32\configure.bat on your build directory. 33 ex. c:\src\ruby> bcc32\configure.bat 34 You can specify the target platform as an argument. 35 For example, run `((%configure i686-bccwin32%))' 36 You can also specify the install directory. 37 For example, run `((%configure --prefix=<install_directory>%))' 38 Default of the install directory is /usr . 39 The default ((|<PLATFORM>|)) is `(({i386-bccwin32}))'. 40 41(2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile})) 42 if you want to change the name of the executable files. 43 And add ((|RUBYW_INSTALL_NAME|)) to change the name of the 44 executable without console window if also you want. 45 46(3) Run `((%make%))' 47 48(4) Run `((%make test%))' 49 50(5) Run `((%make install%))' 51 52(6) Requires dynamic RTL (cc3250.dll on C++Builder5) and borlndmm.dll (If built with 53 usebormm.lib) to use installed binary. These files are ordinary in bcc32's bin 54 directory. 55 56== Icons 57 58Any icon files(*.ico) in the build directory, directories specified with 59((|icondirs|)) make variable and (({win32})) directory under the ruby 60source directory will be included in DLL or executable files, according 61to their base names. 62 $(RUBY_INSTALL_NAME).ico or ruby.ico --> $(RUBY_INSTALL_NAME).exe 63 $(RUBYW_INSTALL_NAME).ico or rubyw.ico --> $(RUBYW_INSTALL_NAME).exe 64 the others --> $(RUBY_SO_NAME).dll 65 66Although no icons are distributed with the ruby source or in the official 67site, you can use anything you like. For example, followings are written 68in Japanese, but you can download at least. 69 70* ((<URL:http://member.nifty.ne.jp/ueivu/rubyico.html>)) or 71 ((<zipped icons|URL:http://member.nifty.ne.jp/ueivu/Ruby_ico.zip>)) 72* ((<URL:http://homepage1.nifty.com/a_nakata/ruby/>)) or 73 ((<icon itself|URL:http://homepage1.nifty.com/a_nakata/ruby/RubyIcon.ico>)) 74 75== Build examples 76 77* Build on the ruby source directory. 78 79 ex.) 80 ruby source directory: C:\ruby 81 build directory: C:\ruby 82 install directory: C:\usr\local 83 84 C: 85 cd \ruby 86 bcc32\configure --prefix=/usr/local 87 make 88 make test 89 make install 90 91* Build on the relative directory from the ruby source directory and CPU type 92 i386. 93 94 ex.) 95 ruby source directory: C:\ruby 96 build directory: C:\ruby\bccwin32 97 install directory: C:\usr\local 98 CPU i386 99 100 C: 101 cd \ruby 102 mkdir bccwin32 103 cd bccwin32 104 ..\bcc32\configure --prefix=/usr/local 105 make 106 make test 107 make install 108 109* Build on the different drive. 110 111 ex.) 112 ruby source directory: C:\src\ruby 113 build directory: D:\build\ruby 114 install directory: C:\usr\local 115 116 D: 117 cd D:\build\ruby 118 C:\src\ruby\bcc32\configure --prefix=C:/usr/local 119 make 120 make test 121 make install 122 123== Bugs 124 125You can ((*NOT*)) use a path name contains any white space characters as 126the ruby source directory, this restriction comes from the behavior of 127(({!INCLUDE})) directives of (({MAKE})). 128((- you may call it a bug. -)) 129 130=end 131