It has been a while. Recently I have been busy with other stuff besides the usual, but a friend of mine suggested (and I completely agree) to be a good utilitarian and post something that will bring the greatest happiness for the greatest number of users :)
Which is this:
but on Windows...
My impression after solving this puzzle is that a number of folks have been getting stuck on implementing Fudgie's glTail (a real-time log file visualization tool) to work on Windows with Chipmunk (a 2D physics game engine).
Here is my take on what I did to get it working (after lots of trials and errors). Before you start doing anything, read this post completely to make sure you won't miss some crucial detail beforehand. Basically it came to the following 13 steps:
- Download the build of glTail at the download site:
(my version was 0.1.7 - retrieved June 13/09, see History.txt)
- Install the One-Click Installer at RubyForge:
(doesn't matter what version.. I hope)
Now you need the following two packages:
- ruby-opengl 0.40.1
- net-ssh 1.1.4
Make sure that you download and install the correct version.
Right, so lets see how to put these two packages into Ruby commands:
- Fire up the package manager of Ruby
(Start Menu > Ruby > RubyGems > RubyGems Package Manager)
NOTE: Packages might take some time to download/install.
- Type: gem install ruby-opengl --version 0.40.1 [ENTER]
- Type: 2 [ENTER] for option #2 - ruby-opengl 0.40.1 (i386-mswin32)
- Type: gem install -y net-ssh -v 1.1.4
So far, so good. Now for the crucial part:
- Download the chipmunk.so file from the following url
- Paste the .so file in the following directory:
Almost done, chipmunk.so (which is like a .DLL file) is set.
Now when you configure your .yaml file, as was mentioned in the documentation at http://github.com/Fudge/gltail/tree/, you may need to do the following:
- In the config file you may use IP-Addresses instead of host names. That worked for me somehow when I was trying to connect to my remote host.
- Check in the bin directory of glTail if the gl_tail file has an extension, if not put .rb as an extension.
Ok, so now its time to run the script. CD in MS-DOS to the root of your glTail directory and type the following:
If you see any problems, you may need to do some code editing in the Ruby Files. Do not be troubled, after all this time, this will just take a few more minutes. The error I got and, which solution is given below is a TYPE_ERROR where a function is called and expects one parameter to be an INTEGER but this parameter is NIL during run-time and Ruby does not find that very 24K gold standard, so:
- Fire up your favorite good ol' code editor and open the file element.rb in the lib\gl_tail\ directory, go to line 276. If I'm not mistaken you should see something like glDeleteLists(@text_list,1).
- @text_list is NIL for some unknown reason, so we need to wrap an IF statement around it, like this:
if @text_list != nil
- Now, Ruby will notice another NIL issue, but this time on line 255. Do the same as the previous one, and wrap the @text_list with the above IF-statement.
If all comes to pass, you now are the proud user of a Chipmunk Newton-based awesome log file visualizer... ON WINDOWS MAN!