This chapter may be outdated at any time.
This explains how to get RUDL installed on Windows. Developers are advised to create a package with their program, SDL, and RUDL in it so end users won't have to install RUDL separately.
If you want to use another version of Ruby, you'll get trouble using RUDL. This is because the RUDL.so library is statically linked with msvcrt-ruby18.lib (or something of that kind) and that lib changes a lot between Ruby versions. This can be solved by downloading a lib-only RUDL, if it exists for your version. (If it doesn't, it can be created on request) You can put the RUDL.so in the directory where you unpacked the RUDL setup and rerun install-on-windows.
... to do.
Compiling from source could be useful for creating a smaller RUDL library that depends on less libraries.
RUDL is compiled with the Microsoft Visual C++ command line tools. If you don't have Visual Studio, it is possible to compile RUDL with tools that can be downloaded for free from Microsoft.
Set up your compiler with the instructions below, then proceed with the build instructions at the bottom of this page. If you don't want to download the latest SDL libraries, you can use the provided includes and libs, and the DLLs from the RUDL setup archive, and start from "ruby extconf.rb".
If you download the SDL libraries yourself, you should probably copy their binaries and includes into the corresponding RUDL directories.
With Visual Studio, you only need to make sure its bin, include and lib paths are in the environment variables, and add RUDL's include and lib dirs. Example paths:
Those are in addition to what's already in the variables, of course.
In Windows 2000 or XP, you can edit them from Control Panel → System →
Advanced → Environment Variables. You might have to reboot, or at least
restart any command line prompts for the changes to take effect. Check
them with the command echo %PATH%
, etc.
If you don't have Visual Studio, you will probably need all of the following:
You need to make sure that some environment variables are set up correctly. Here's a list of the variables, with default installation paths:
See the Visual Studio section above for tips on setting environment variables.
You'll have to build it from source, as described below.
Note that RUDL doesn't need everything, only the core SDL library.
The libraries must be installed where the compiler can find them. Sometimes the rpm's have created symlinks from e.g. /usr/lib/libSDL.so to a nonexisting version, so you may need to fix them manually.
ruby extconf.rb
in the RUDL root dir will look for the above-mentioned libraries
and create a makefile with the libraries it finds.
If it can't find some library that you have installed, you can try editing extconf.rb
and uncommenting the $DEBUG flag. Make sure that the library binaries and includes are in
the right locations. See also the generated mkmf.log
make
make install
ruby install-on-windows.rb
- it does the same as make install
and then copies the SDL DLLs in place)
That's it. You can now try the samples.