occasionally useful ruby, ubuntu, etc

26Jun/080

Distributing Ruby Apps

So I'm pondering the idea of writing a game...but I want it to be playable on Windows and Linux, and I want it to be available on Linux without much trouble. I've made a couple interesting discoveries, in terms of applications to help me do this.

The first is called RubyScript2Exe. It takes all the files needed by an application and sticks it into a single binary executable, as well as any dependencies. Cool huh? The only problem is the smallest program RubyScript2Exe can generate is 700k. Not so bad, but then I include the Gosu game library I'm using and it comes out to 7.0M. Compressing (7z, tar.gz, zip) doesn't get it past 6.7M. Oh well, after adding all the media and stuff I want I can't imagine it getting past 15M or 20M, which is acceptable when most people have >100 gigs of space. But not everyone has uber broadband...oh well. Anyway, it just seems larger than it needs to be is all.

The other application (by the same guy I think) is Tar2RubyScript. Tar2RubyScript does something similar to RubyScript2Exe, but instead of generating a binary, it generates a Ruby script. That is, it takes your directory tree of files and generates a single equivalent .rb file. Cool huh? It's like JAR files, but with less overhead and without compression.

So, ultimately, Windows will have just the binary and Linux will have a binary (for those without Ruby), the single Ruby script (for people who don't care about the source), and the full directory tree (for the inquisitive and those who can't get the other script to work).

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.