User Guide

Ruby Component
Ruby DLL
Ruby functionality is provided by an external DLL. This dll is called msvcr90-ruby191.dll. In order to use this with FlowBotics Studio it has to
be compiled using Microsoft Visual Studio 2008.
To comply with the Ruby licence agreement we provide details here of how to build it.
Changes
We have made no changes to the Ruby source that change the way that the Ruby interpreter functions. However, we have added a small
section of code into eval.c that we use to reference one of our own objects.
The code is:
void* g_pInterpreter = 0;
void* ruby_interpreterPtr(void) { return g_pInterpreter; }
void ruby_setInterpreterPtr(void* ptr) { g_pInterpreter = ptr; }
This should be inserted into eval.c just after:
#include "eval_jump.c"
This change does not affect the way Ruby works or add to it in any way. It merely allows us to store an object within the scope of the dll.
Building the DLL
You must have a version of Microsoft Visual Studio 2008 installed before you can proceed.
1. Download the ruby source code from here:
http://mirrors.ibiblio.org/ruby/1.9/ruby-1.9.3-p0.zip
2. Unzip to a folder eg. C:\ruby-src
3. Open the Visual Studio/C++ Command prompt as Administrator
4. Run vcvars32.bat
5. Move into C:\ruby-src\ruby-1.9.3-p0
6. In the command prompt execute the following instructions:
win32\configure.bat
nmake
nmake test
nmake install
The msvcr90-ruby191.dll binary will be located in the C:\ruby-src\ruby-1.9.3-p0 folder.
172 of 212