Packaging source files on multiple OSs

A

Alpha Blue

Can anyone direct me to an article or site that shows how to package
applications built with Ruby? If I create a GUI application and want to
package it for Mac, Linux, and Windows, I'd like to know what's involved
in the packaging process so that I can ensure I setup my build
environment efficiently.

I also would like to ensure that people can use my applications but at
the same time I would like to protect my code. On windows, normally I
would use an obfuscator, or something similar, to protect my code.

The following applies to this scenario:

Users may or may not have ruby installed on their system

Any suggestions or advice would be greatly appreciated.

My thanks.
 
A

Alpha Blue

Compiling a list of things I found so far:

Ocra (works fine but only packages for windows exe and also has some
issues with xml.load with wx_sugar and xrc source compile (bug reported
tonight)).

Crate (this looks very promising but it doesn't work on Ruby 1.9.
Verified this on isitruby19.com and added my own report there as well.)
According to the docs it appears it will provide packaging for windows,
mac, and linux, which is what I'm after.

Other than these two, I'm not finding much luck.
 
M

Marnen Laibow-Koser

Alpha said:
Compiling a list of things I found so far:

Ocra (works fine but only packages for windows exe and also has some
issues with xml.load with wx_sugar and xrc source compile (bug reported
tonight)).

Crate (this looks very promising but it doesn't work on Ruby 1.9.
Verified this on isitruby19.com and added my own report there as well.)
According to the docs it appears it will provide packaging for windows,
mac, and linux, which is what I'm after.

Other than these two, I'm not finding much luck.

Monkeybars uses Rawr and JRuby to do exactly what you're talking about.

Best,
 
A

Alpha Blue

Marnen said:
Monkeybars uses Rawr and JRuby to do exactly what you're talking about.

Thanks Marnen, I did try out monkeybars but I didn't like the library.
I have become very familiar with WxRuby now and have dug deep into the
API. I'm going to stick with WxRuby and hopefully either crate comes up
to speed, or I'll use ocra for windows packaging (which now works for
me) and come up with alternative packaging for other OS's.

My last issue has to do with lack of obfuscation, which I only want to
apply to my source code and not to the ruby libraries that are packaged
with my code. I may have to create an obfuscator myself, but that's a
long and tedious process.

Thanks again.
 
M

Marnen Laibow-Koser

Alpha said:
Thanks Marnen, I did try out monkeybars but I didn't like the library.

What about Rawr without Monkeybars, then?

(And BTW, let me assure you that Monkeybars is a joy to work with.
Almost as nice as Rails.)
I have become very familiar with WxRuby now and have dug deep into the
API. I'm going to stick with WxRuby and hopefully either crate comes up
to speed, or I'll use ocra for windows packaging (which now works for
me) and come up with alternative packaging for other OS's.

There's really no good way except for JRuby, as far as I can tell.
You're kind of putting effort into a dead end IMHO.
My last issue has to do with lack of obfuscation, which I only want to
apply to my source code and not to the ruby libraries that are packaged
with my code. I may have to create an obfuscator myself, but that's a
long and tedious process.

JRuby can help with this too -- particularly with Rawr, which complies
your Ruby files into Java class files. Otherwise, don't bother.
Obfuscation is risky and almost never worth it.
Thanks again.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
(e-mail address removed)
 
D

David Masover

Marnen said:
Monkeybars uses Rawr and JRuby to do exactly what you're talking about.

Thanks Marnen, I did try out monkeybars but I didn't like the library. [snip]
My last issue has to do with lack of obfuscation, which I only want to
apply to my source code and not to the ruby libraries that are packaged
with my code. I may have to create an obfuscator myself, but that's a
long and tedious process.

First, realize it's not going to work, whatever your rationale is. If you want
to obfuscate it because there's DRM involved, DRM is inherently flawed and
will _never_ succeed. If you want to obfuscate it because you don't want
people "stealing" your code and re-using it for something else, copyright law
is a much better way to deal with that.

But if you're still determined to obfuscate your source, JRuby is likely going
to be the best way to do that, though not yet. There was a recent announcement
that JRuby will gain the ability to dump the bytecode result of any evaluation
-- this means that if your program is well-behaved (properly object-oriented,
for example), it should mostly compile directly to Java bytecode.

Well, sort of. If you're familiar with v8 snapshots (v8 is Google's Javascript
engine), I think it's the same idea.

I don't think that exists _yet_, though I hope Rawr picks it up when it does
-- not because I want obfuscation, but because it would improve startup time
by a lot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top