Forums FXRuby

 
Myicon_small Stephen Smith 2 posts

Hi Lyle, I’m considering purchasing the book but I’m wondering how an FxRuby app is distributed to end users? I don’t see anything in the Table of Contents that describes how one would distribute his/her FxRuby application. Is this covered in the book?

Incidentally, I also looked on fxruby.org for an answer to this question and I did not find anything.

I have no experience with distributing ruby apps but I have seen that a ruby2exe progam is available (I do have experience with py2exe). Would that be a recommended way to distribute an FxRuby app?

Thanks for any info,
Stephen.

 
Lovablelyle_small Lyle Johnson 21 posts

An excellent question, Stephen, and it’s really just a specific instance of the more general question of how to distribute any Ruby application. There are basically two different scenarios I’m familiar with.

If you’re distributing the application to people who you already expect to have a working Ruby installation, the easiest path might be to package your application as a Ruby Gem that in turn depends on the FXRuby gem. Folks are most familiar with the use of RubyGems to package libraries (such as FXRuby itself), but it can also be used to package applications (such as Rake). Consult the RubyGems documentation for tips on how to write your Gem specification for such packages.

If you’re looking for a more all-inclusive solution that doesn’t depend on an existing Ruby installation, then yes, a tool like RubyScript2exe (http://www.erikveen.dds.nl/rubyscript2exe/) or Exerb (http://exerb.sourceforge.jp/index.en.html) is probably the best choice. I and others have used exerb with FXRuby applications in the past, and it works like a charm. I haven’t tried it lately, but I would expect that it still works fine.

 
Lovablelyle_small Lyle Johnson 21 posts

I forgot to add: If you try one or both of these approaches and run into any snags, please post here or (even better) to the FXRuby users’ mailing list. For that matter, if you try it and it works fine, we’d like to know that too. ;)

 
Generic-user-small Joe Van Dyk 2 posts

Lyle, does exerb also package up the fox toolkit library?

 
Lovablelyle_small Lyle Johnson 21 posts

The FXRuby binaries that I distribute for Windows statically link in the FOX library, so yes, building a Windows executable with exerb pulls in the FXRuby library, which in turn includes FOX. As I noted earlier, this used to work like a charm with exerb and as far as I know it still does.

On other platforms you would need to make sure that FOX (and other dependencies) are statically linked into FXRuby, or otherwise make sure that they get included in the bundle.

 
Myicon_small Stephen Smith 2 posts

Thanks for the quick response Lyle. I will check out the two solutions you have detailed and report back here (as well as the FXRuby users’ mailing list).

6 posts, 3 voices