Forum: Ruby Create an exe with Ruby 1.9.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eaf2890855aa289fc41a72d1ad0e330e?d=identicon&s=25 Marc-antoine Kruzik (kingkadelfek)
on 2009-05-19 21:36
Hello !
I'm working on Windows and I'm creating softwares.

I would create an exe file for a program written in Ruby 1.9.1.
But Rubyscript2exe and Exerb are using Ruby 1.8.7 (or 1.8.6).

How can I create an exe file working on Windows for anybody ?
Why are they so few informations and librairies to create exe files ?

90% of computers in the world are Windows.
Making cool softwares in Ruby will be useless if they can't work on 90%
of computers...
08995c0e987a0b6d452a791369f96370?d=identicon&s=25 Alex (Guest)
on 2009-05-19 21:43
(Received via mailing list)
As far as I know, there's currently no way to generate an exe out of a
ruby
1.9 script, short of packing the ruby script into the exe and calling
the
external ruby interpreter. Since the ruby interpreter runs on windows
just
fine though, why are you in need of an exe?
In the future it may be possible to compile the ruby bytecode into an
exe
and bundle an interpreter with it, but I'm pretty sure nothing like that
exists yet.


Alex

On Tue, May 19, 2009 at 3:36 PM, Marc-antoine Kruzik
3afd3e5e05dc9310c89aa5762cc8dd1d?d=identicon&s=25 Tim Hunter (Guest)
on 2009-05-19 23:40
(Received via mailing list)
Marc-antoine Kruzik wrote:
> Making cool softwares in Ruby will be useless if they can't work on 90%
> of computers...

You assume that the only way to run a Ruby program on Windows is to
bundle it up with a 1.9.1 interpreter into an executable. Clearly that's
not true. You can bundle a Ruby program with a 1.8.6/1.8.7 interpreter,
or you can just install Ruby 1.9.1 and run all the Ruby programs you can
lay your hands on. You also assume that cool software only runs on
Windows. I can assure you that's not true.

I'd like to point out that Rubyscript2exe and Exerb are the work of
volunteers. It may be true that 90% of the computers in the world are
Windows, but if so, why aren't 90% of the volunteers contributing to
Ruby from the Windows world? As near as I can tell there's just a
handful - less than a hundred? less than 20? - of people with experience
in Windows who are actively contributing to Ruby.
Eaf2890855aa289fc41a72d1ad0e330e?d=identicon&s=25 Marc-antoine Kruzik (kingkadelfek)
on 2009-05-20 14:20
Tim Hunter wrote:
> Marc-antoine Kruzik wrote:
>> Making cool softwares in Ruby will be useless if they can't work on 90%
>> of computers...
>
> You assume that the only way to run a Ruby program on Windows is to
> bundle it up with a 1.9.1 interpreter into an executable. Clearly that's
> not true. You can bundle a Ruby program with a 1.8.6/1.8.7 interpreter

Yes, I still have released programs written for Ruby 1.8.6.
But can I really run a program made with Ruby 1.9.1 ?


> You also assume that cool software only runs on
> Windows. I can assure you that's not true.

I didn't say that. I'm saying that cool softwares made with Ruby will
have some difficulties to be released on all the platforms (I mean,
Windows / Linux / Mac).
I have been working for years with Ruby. Now I'm creating softwares, but
I'm stuck with Ruby 1.8.6.

If I use one method which only exists with Ruby 1.9.1 (ascii_only? by
example), my exe program will not work (because Exerb and Rubyscript2exe
are using 1.8.6).

And it's very sad, because 1.9.1 is faster than 1.8.6, and because the
slowness of Ruby is one of its biggest problem (but I love Ruby !).


> I'd like to point out that Rubyscript2exe and Exerb are the work of
> volunteers. [...] less than a hundred? less than 20? -
> of people with experience
> in Windows who are actively contributing to Ruby.

Yes, I knew it. But I didn't know there were so few people with
experience in Windows contributing to Ruby.
And I think it's bad, because Ruby really deserves to be working on all
platforms.
Eaf2890855aa289fc41a72d1ad0e330e?d=identicon&s=25 Marc-antoine Kruzik (kingkadelfek)
on 2009-05-20 14:35
(I forgot a CTRL+V)

Alex wrote:
> fine though, why are you in need of an exe?

Because I gave my softwares to people who doesn't have Ruby. And they
are using Windows.
So, the exe is the fastest way to release my softwares.

My main project is a software which can extract dialogs from a RPG Maker
game, and put these dialogs in a txt file.
It's used by 20 to 50 game projects in at least 5 languages.

But I really need to use Ruby 1.9.1, because of the new String features.
I have had a lot of problems with UTF-8 and Ascii ("é" which could be
written with 1 or 2 bits).
In order to make my software compatible with other languages (such as
Japanese), I really need these features.

And fastest execution. Because it takes 20 minutes to extract dialogs
for a big project.
Ca515d239bf09ffe970af1da4174eb03?d=identicon&s=25 Lars Christensen (Guest)
on 2009-05-20 14:39
(Received via mailing list)
On Tue, May 19, 2009 at 9:36 PM, Marc-antoine Kruzik
<kadelfek@kadelfek.com> wrote:
> I would create an exe file for a program written in Ruby 1.9.1.
> But Rubyscript2exe and Exerb are using Ruby 1.8.7 (or 1.8.6).

OCRA works with Ruby 1.9. http://ocra.rubyforge.org/
Eaf2890855aa289fc41a72d1ad0e330e?d=identicon&s=25 Marc-antoine Kruzik (kingkadelfek)
on 2009-05-20 17:13
Lars Christensen wrote:
> On Tue, May 19, 2009 at 9:36 PM, Marc-antoine Kruzik
> <kadelfek@kadelfek.com> wrote:
>> I would create an exe file for a program written in Ruby 1.9.1.
>> But Rubyscript2exe and Exerb are using Ruby 1.8.7 (or 1.8.6).
>
> OCRA works with Ruby 1.9. http://ocra.rubyforge.org/

Do you know where I can have more informations about Ocra ?
I downloaded ocrasa, I put it in c:/ruby/bin (a 1.9.0 version) and I
tried to compile a script containing this line :

puts "Hello World"

The compilation seems to be ok (I just modified the path of my ruby dir
in rbconfig.rb "C:\LAN\..." => "C:\ruby").
During compilation, I have had a warning because enumerable.so was not
found.

When I launch the exe file, I have an error message :
"failed to create directory"

I run on Vista, so I tried to launch the exe on XP (because the failed
creation maybe occurs because of Vista). But I have the same problem.


I looked at the code in ocrasa.rb, and I saw that the scrip use
ENV["TEMP"] without any problem.
So, why the exe have a problem when it tries to create a folder ?

Because I suppose this bug occurs when ocra tries to extract the
contents of the exe into a temporary directory.
B2b20140efe14944692ab82a08f9b1c7?d=identicon&s=25 Charles Calvert (Guest)
on 2009-05-22 06:49
(Received via mailing list)
On Tue, 19 May 2009 14:43:10 -0500, Alex <imphasing@gmail.com> wrote
in <40a4cac50905191242h13c10f7as48c07db0e6609605@mail.gmail.com>:

>As far as I know, there's currently no way to generate an exe out of a ruby
>1.9 script, short of packing the ruby script into the exe and calling the
>external ruby interpreter. Since the ruby interpreter runs on windows just
>fine though, why are you in need of an exe?

In the Windows world, it is not normal to expect end users to install
an interpreter in order to run software.  Because Windows software is
almost exclusively distributed in executable binary form, that's what
users expect.

Depending on one's target market for an application, asking them to
alter this expectation may well result in people refusing to use the
software.  Between a general lack of computer literacy and the fear of
malware, it's a hard barrier to break.

>In the future it may be possible to compile the ruby bytecode into an exe
>and bundle an interpreter with it, but I'm pretty sure nothing like that
>exists yet.

An alternative might be IronRuby, if the OP is willing to live with
the dependency on .NET.
E7cff3cfd41c495e1012227d7dc24202?d=identicon&s=25 Luis Lavena (luislavena)
on 2009-05-22 06:51
(Received via mailing list)
On May 20, 12:13 pm, Marc-antoine Kruzik <kadel...@kadelfek.com>
wrote:
> tried to compile a script containing this line :
>
> I run on Vista, so I tried to launch the exe on XP (because the failed
> creation maybe occurs because of Vista). But I have the same problem.
>
> I looked at the code in ocrasa.rb, and I saw that the scrip use
> ENV["TEMP"] without any problem.
> So, why the exe have a problem when it tries to create a folder ?
>
> Because I suppose this bug occurs when ocra tries to extract the
> contents of the exe into a temporary directory.

I've used both 1.8 and 1.9 with ocra gem without any kind of issue.

Also, running as normal user.

Maybe you're trying to create a folder form your script?

Please try the gem version instead of the standalone one.
Ff9e18f0699bf079f1fc91c8d4506438?d=identicon&s=25 James Britt (Guest)
on 2009-05-22 08:46
(Received via mailing list)
Charles Calvert wrote:
> almost exclusively distributed in executable binary form, that's what
> users expect.
>

Except with Java.  If the use does not have the proper version of the
JVM, they will get prompted (or can be, I don't know how automatic this
is) to download a newer version.

I've no surveys on this, only my own experience, but I don't think
Windows users are too spooked about having to get a more current JVM.


> Depending on one's target market for an application, asking them to
> alter this expectation may well result in people refusing to use the
> software.  Between a general lack of computer literacy and the fear of
> malware, it's a hard barrier to break.
>
>> In the future it may be possible to compile the ruby bytecode into an exe
>> and bundle an interpreter with it, but I'm pretty sure nothing like that
>> exists yet.
>

JotBot, my cross-platform desktop app for time tracking, is written in
JRuby, and expects Java  1.6, and a user will get prompted to download
that if it is not available when installing JotBot.

I've not gotten any complaints, though that's not to say some just gave
up and never bothered to tell me.


This may be all academic to the OP as JRuby does not fully implement
Ruby 1.9 yet.

But distributing JRuby apps as Windows exe files is certainly doable.

--
James Britt

www.jamesbritt.com           - Playing with Better Toys
www.ruby-doc.org             - Ruby Help & Documentation
www.rubystuff.com            - The Ruby Store for Ruby Stuff
www.neurogami.com            - Smart application development
Eaf2890855aa289fc41a72d1ad0e330e?d=identicon&s=25 Marc-antoine Kruzik (kingkadelfek)
on 2009-05-22 11:58
Luis Lavena wrote:
>
> I've used both 1.8 and 1.9 with ocra gem without any kind of issue.
>
> Also, running as normal user.
>
> Maybe you're trying to create a folder form your script?
>
> Please try the gem version instead of the standalone one.

I can't install ocra gem with Ruby 1.9.
I have this problem :
http://i291.photobucket.com/albums/ll318/KingKadel...

But I cheated a lot (I copied ocra gem from my Ruby 1.8.6 folder into my
Ruby 1.9.0 folder), so it works.

Now, my "puts 'Hello World !'" is working, so I will try to compile my
software.

--

I installed "ruby-1.9.0-0-i386-mswin32", but a lot of files were missing
:
- readlines.dll
- zlib.dll
- libeay32.dll
- ssleay32.dll

So I took these files from my Ruby 1.8.6 folder.

Is it okay ?
Eaf2890855aa289fc41a72d1ad0e330e?d=identicon&s=25 Marc-antoine Kruzik (kingkadelfek)
on 2009-05-22 11:59
(sorry, I forgot again one CTRL-V)

Charles Calvert wrote:
> On Tue, 19 May 2009 14:43:10 -0500, Alex <imphasing@gmail.com> wrote
> in <40a4cac50905191242h13c10f7as48c07db0e6609605@mail.gmail.com>:
>
>>As far as I know, there's currently no way to generate an exe out of a ruby
>>1.9 script, short of packing the ruby script into the exe and calling the
>>external ruby interpreter. Since the ruby interpreter runs on windows just
>>fine though, why are you in need of an exe?
>
> In the Windows world, it is not normal to expect end users to install
> an interpreter in order to run software.  Because Windows software is
> almost exclusively distributed in executable binary form, that's what
> users expect.
>
> Depending on one's target market for an application, asking them to
> alter this expectation may well result in people refusing to use the
> software.  Between a general lack of computer literacy and the fear of
> malware, it's a hard barrier to break.

I will never have been able to say such a thing into english, thank you
very much.
And Ruby 1.9, it's several thousands of files, it takes a long time to
install it... just for one program.
85991f138ede6236f35eb98da22b7b01?d=identicon&s=25 Marvin Gülker (quintus)
on 2009-05-22 12:41
Marc-antoine Kruzik wrote:
>I can't install ocra gem with Ruby 1.9.
>I have this problem :
>http://i291.photobucket.com/albums/ll318/KingKadel...


Do a
  gem update --system
and then try again.

>I installed "ruby-1.9.0-0-i386-mswin32", but a lot of files were missing
>:
>- readlines.dll
>- zlib.dll
>- libeay32.dll
>- ssleay32.dll
>
>So I took these files from my Ruby 1.8.6 folder.
>
>Is it okay ?
There's a list of links at
http://www.garbagecollect.jp/ruby/mswin32/en/docum...
where to get your dlls, but I think you can copy the files from your
Ruby 1.8.

Btw, ocra works even with the mingw version of Ruby 1.9.1(-p0 and
-p129). Since the Ruby main stream is moving to mingw, you should think
about moving, too.
1c1e3bdfe006a22214102fcd6434a012?d=identicon&s=25 Daniel Sheppard (Guest)
on 2009-05-25 09:31
(Received via mailing list)
> I would create an exe file for a program written in Ruby 1.9.1.
> But Rubyscript2exe and Exerb are using Ruby 1.8.7 (or 1.8.6).

Depending on what libraries you're using, you could run jruby in 1.9
mode and bundle that up using the existing methods for exe-ifying a java
program (I use jarjar and launch4j, but there are other alternatives).

Dan.
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-03 10:00
(Received via mailing list)
"James Britt" <james.britt@gmail.com> schrieb im Newsbeitrag
news:4A164A19.3010707@gmail.com...
> This may be all academic to the OP as JRuby does not fully implement
> Ruby 1.9 yet.
>
> But distributing JRuby apps as Windows exe files is certainly doable.

Maybe it's doable, however, currently I tried this using different
jar2exe-converters without success.

It worked fine for other Scripting languages, but JRuby somehow did not
manage to access internal resources. I found some hint to this problem
on
the net, but had no time digging deeper.
I didn't find a HowTo for JRuby-Exe integration, so I finally gave up on
this issue, delivering jars now.

Delivering Jars instead of Ruby-Sources would only solve part of OP's
problem.


In current environments, where bandwith- and file-space-limits are
practically non-existing, an one-file delivery should be possible for
every
project.

IMHO, it will be a must-have in near future.

Michael B.
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-03 10:06
(Received via mailing list)
"Daniel Sheppard" <daniels@pronto.com.au> schrieb im Newsbeitrag
news:B04198C509E7ED47A0E3191B132CC48A01DA3136@melbmail.pronto.com.au...
>Depending on what libraries you're using, you could run jruby in 1.9
>mode and bundle that up using the existing methods for exe-ifying a java
>program (I use jarjar and launch4j, but there are other alternatives).

Hello Dan!
Is there a HowTo on the net describing how to integrate JRuby into
Windows-Exe to create a one-file delivery?
I do not want / am not able to force all users to install JRuby files on
their machines.



Michael B.
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-06-03 10:23
(Received via mailing list)
Michael Bruschkewitz wrote:
> I do not want / am not able to force all users to install JRuby files on
> their machines.

Look into a tool called "rawr", which can package up JRuby + .exe into a
single distributable unit. It's pretty nice.

- Charlie
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-03 11:55
(Received via mailing list)
"Charles Oliver Nutter" <charles.nutter@sun.com> schrieb im Newsbeitrag
news:4A2632F5.9050105@sun.com...

> Look into a tool called "rawr", which can package up JRuby + .exe into a
> single distributable unit. It's pretty nice.

Hello Charles,
maybe it's nice, but I dont know if it will fit my needs.

I have a main Netbeans-Java project which uses JRuby only as Scripting
extension for small pieces of configuration files or while creating
customized exports files.

It seems rawr needs Rake-files for input.
I don't think Netbeans uses Rake-files, I don't want to switch away from
Netbeans.

Cite from rawr-page: "It explains itself! No documentation necessary
here."
Given this, I think I will not waste my time by trying rawr-configs for
hours.

Thank you, anyway.
E7cff3cfd41c495e1012227d7dc24202?d=identicon&s=25 Luis Lavena (luislavena)
on 2009-06-03 15:23
(Received via mailing list)
On Jun 3, 6:54 am, "Michael Bruschkewitz"
<brusch4_removeunderlinesandtextbetwe...@gmx.net> wrote:
> customized exports files.
>
> It seems rawr needs Rake-files for input.
> I don't think Netbeans uses Rake-files, I don't want to switch away from
> Netbeans.
>
> Cite from rawr-page: "It explains itself! No documentation necessary here."
> Given this, I think I will not waste my time by trying rawr-configs for
> hours.

http://rawr.rubyforge.org/

Below that paragraph there is the explanation of one of the
configuration Files.

NetBeans can find and call Rakefiles, so if your JRuby application is
all in place, having those Rakefiles with rawr configuration is not
going to be "hours" of waste.

Just my thoughts,
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-03 17:21
(Received via mailing list)
"Luis Lavena" <luislavena@gmail.com> schrieb im Newsbeitrag
news:cc2d6fa9-36fa-4836-a389-adb9cafbec79@o18g2000yqi.googlegroups.com...
On Jun 3, 6:54 am, "Michael Bruschkewitz"
<brusch4_removeunderlinesandtextbetwe...@gmx.net> wrote:
>> Cite from rawr-page: "It explains itself! No documentation necessary
>> here."
>> Given this, I think I will not waste my time by trying rawr-configs for
>> hours.
>
>http://rawr.rubyforge.org/
>
>Below that paragraph there is the explanation of one of the
>configuration Files.

Don't you think I read this page, too?

It does not explain (for example):
 - if all required jars are included in resulting exe, possibly
automatically
 - if all required ruby-libs are included in resulting exe
 - how to define additional ruby-libs to be included
 - if it's possible to create GUI applications
 - if it's possible to set an icon for the resulting exe
 - how to access resources from java
 - how to access location of exe-file from java
 - if it's possible to create 64-bit applications
 - how to define main class of Java project
 - if path names are relative to current dir or root-java dir
 - if it's necessary to compile java classes through this tool.

Even, if some of var- or symbol-names seem to have some useful meaning,
they
could also make deamons flying out of my nose.
Example: c.files_to_copy = []  # From where? To where?

>NetBeans can find and call Rakefiles, so if your JRuby application is
>all in place, having those Rakefiles with rawr configuration is not
>going to be "hours" of waste.

As I mentioned, there is no JRuby application, it's a Java application
which
uses JRuby-lib for interpretation of some configuration files.
Therefore, currently there is no rakefile. I would not try to change the
Netbeans-configuration. It is not necessary / should not be necessary to
integrate the jar2exe-process into the Netbeans-build. Instead, a script
should be used to convert jar-delivery to one single exe.
Ea3084bf9444c7d0cd0c640ca0ac93b3?d=identicon&s=25 Logan Barnett (Guest)
on 2009-06-03 21:46
(Received via mailing list)
Michael,
I maintain Rawr and Monkeybars. Hopefully I can help here.
Our documentation and project organization is pretty behind, but they
have been getting a lot of love lately. Expect to see more docs very
soon (:

> It does not explain (for example):
> - if all required jars are included in resulting exe, possibly
> automatically

Rawr does this.

> - if all required ruby-libs are included in resulting exe

Rawr does this, although gems need a little work. There is
documentation on this in the Monkeybars wiki.

> - how to define additional ruby-libs to be included

Same as above.

> - if it's possible to create GUI applications

Monkeybars, a GUI framework for JRuby has numerous applications that
are packaged through Rawr. Our tutorials always use Rawr.
http://monkeybars.rubyforge.org/
http://kenai.com/projects/monkeybars

> - if it's possible to set an icon for the resulting exe

Yep

> - how to access resources from java

Maybe I don't understand this, but this isn't Rawr's responsibility.
JRuby handles this pretty well. Any jars you include will
automatically be loaded on the classpath.

> - how to access location of exe-file from java

Do you mean where this lands? If so, it will land in package/windows
in your project.

> - if it's possible to create 64-bit applications

This largely depends on Launch4J, a Java library that Rawr depends on
for creating exes. However, it is not directly supported by Rawr at
the moment. Is this something you need?

> - how to define main class of Java project

c.main_java_file = 'org.rubyforge.rawr.Main'
This line comes built into Rawr's default generated configuration. You
can set it to any class you want, however. The notation is
<package>.<class>.

> - if path names are relative to current dir or root-java dir

This will be executed from the directory where the main jar/exe exists.

> - if it's necessary to compile java classes through this tool.

Yes! Anything inside the  c.source_dirs array will be compiled JRuby
or Java.

>
> Even, if some of var- or symbol-names seem to have some useful
> meaning, they could also make deamons flying out of my nose.
> Example: c.files_to_copy = []  # From where? To where?

During the next iteration for Rawr I will be documenting all of the
config items. Until then I'm more than happy to field questions on our
mailing list:
http://kenai.com/projects/rawr/lists

>
>> NetBeans can find and call Rakefiles, so if your JRuby application is
>> all in place, having those Rakefiles with rawr configuration is not
>> going to be "hours" of waste.
>
> As I mentioned, there is no JRuby application, it's a Java
> application which uses JRuby-lib for interpretation of some
> configuration files.

The recommended approach for doing Monkeybars development is to make a
Java project. Typically we just run the rake tasks from the console.
If you want to use Netbeans to do this with a java project, you'd
probably need to have ant tasks that call out to rake tasks. We
haven't had any demand for this, but it's certainly open for discussion.

> Therefore, currently there is no rakefile. I would not try to change
> the Netbeans-configuration. It is not necessary / should not be
> necessary to integrate the jar2exe-process into the Netbeans-build.
> Instead, a script should be used to convert jar-delivery to one
> single exe.

Adding a rake file doesn't change the Netbeans config. Rawr will make
a Rakefile for you when you do `rawr install` inside your project
directory.
I am not aware of any Java-2-exe support for Netbeans.

Just to reiterate: Rawr is getting a face-lift on the documentation. I
expect to have the docs complete in about a month for now. Until then,
please hit us up on the mailing list. Rawr sounds like a great fit for
what you're doing right now, but it can also do more (OSX .app files,
for example). More features are coming around like applet/webstart
support, Duby support, a pure Ruby main file via ruby2java, automatic
gem jarring, etc.

Logan Barnett
logustus@gmail.com
http://www.logustus.com
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-04 09:35
(Received via mailing list)
Hello Logan!
(btw. do you know they named a car like you? It's very cheap, but it's a
car, anyway... :)
Thanks to your fast response I will definitely give "rawr" a try and
provide
you with feedback.
So, even if it turns out that "rawr" would not fit my needs for some
reason,
my time will not be wasted.
It will need some time until I find some spare time, but I will
definitely
do.
(For the beginning, you could use my stupid questions for some FAQ -
Fools
Annoying Questions)

Integrating Ruby into Java and possibility to build one-file deliveries
are
both very useful "features" which will help to spread the Ruby-virus
further.

"Logan Barnett" <logustus@gmail.com> schrieb im Newsbeitrag
news:C934D3AB-C1B5-4987-B21B-A9CF980A0292@gmail.com...
> Michael,
> I maintain Rawr and Monkeybars. Hopefully I can help here.
> Our documentation and project organization is pretty behind, but they
> have been getting a lot of love lately. Expect to see more docs very
> soon (:

At first I would insert some lines of feature-description at top of
"rawr"-page.
A very good example may be found at "jar2exe"-page. Google this and
you'll
find description of features even on the Google-page! Try also "convert
jar
to exe".
(Google "convert ruby to exe" doesn't show "rawr" at first 3 pages...)
"rawr" should fit both, if it works as you described it.

...

>> - if all required ruby-libs are included in resulting exe
> Rawr does this, although gems need a little work. There is
> documentation on this in the Monkeybars wiki.

Gems are not on my main issue list.

>> - if it's possible to create GUI applications
> Monkeybars, a GUI framework for JRuby has numerous applications that
> are packaged through Rawr. Our tutorials always use Rawr.
> http://monkeybars.rubyforge.org/
> http://kenai.com/projects/monkeybars

I also don't see any problem here, however, it was explicitely mentioned
as
feature at the other apps website. My app is a Swing-app.

>> - how to access resources from java
> Maybe I don't understand this, but this isn't Rawr's responsibility.
> JRuby handles this pretty well. Any jars you include will
> automatically be loaded on the classpath.

I had problems packing JRuby into exe. JRuby itself had problems then
internally.
I couldn't track this down to the end, but it seemed somewhere they
tried to
access files directly instead of resources. I gave up because of lack of
time.

>> - how to access location of exe-file from java
> Do you mean where this lands? If so, it will land in package/windows
> in your project.

I meant get full exe path of app from inside Java app. Look for "The
Full
Path of The Generated Exe" on support page of other app.

>> - if it's possible to create 64-bit applications
> This largely depends on Launch4J, a Java library that Rawr depends on
> for creating exes. However, it is not directly supported by Rawr at
> the moment. Is this something you need?

No, I currently do not need it, but mayby it will be necessary in
future.


>> - how to define main class of Java project
> c.main_java_file = 'org.rubyforge.rawr.Main'
> This line comes built into Rawr's default generated configuration. You
> can set it to any class you want, however. The notation is
> <package>.<class>.

So it would be possible to set this to any Java-class which contains a
main
function?
Would it be possible to use "rawr" even if no Ruby files are used?


>> - if path names are relative to current dir or root-java dir
> This will be executed from the directory where the main jar/exe exists.

I meant path-names in config-values.


>> - if it's necessary to compile java classes through this tool.
> Yes! Anything inside the  c.source_dirs array will be compiled JRuby
> or Java.

Is it really mandatory to compile java classes or is it possible to use
only
jars?


> During the next iteration for Rawr I will be documenting all of the
> config items. Until then I'm more than happy to field questions on our
> mailing list:
> http://kenai.com/projects/rawr/lists

I added this to my favorites.


> The recommended approach for doing Monkeybars development is to make a
> Java project. Typically we just run the rake tasks from the console.
> If you want to use Netbeans to do this with a java project, you'd
> probably need to have ant tasks that call out to rake tasks. We
> haven't had any demand for this, but it's certainly open for discussion.

I would not like to bring more dependencies into the projects.
Therefore I would like to call some script ore use some tool after
Netbeans
or some other IDE or Ant or something else had build the jars.
Because I tests are done based on the jars, I would not like the need
for
compiling the Java-sources again.


> I am not aware of any Java-2-exe support for Netbeans.

I only tried to emphasize that currently there is no Rakefile.
I currently tried out "the other tool" which is GUI-only and it would
have
fit my needs perfectly if I only could get JRuby to run inside the exe.
Given a proper delivery process, it is not necessary to create the Exe
in
every turnaround, only just before releases, this could easily be done
manually.

However, because this is a feature which is often requested, I would
expect
such an add-on to be available (soon?) in Netbeans, Eclipse and other
IDE's.

Maybe moderately paid. It would be useful for many people.


Hopefully, you'll hear a success-story soon!

Michael B.
Ea3084bf9444c7d0cd0c640ca0ac93b3?d=identicon&s=25 Logan Barnett (Guest)
on 2009-06-04 17:11
(Received via mailing list)
On Jun 4, 2009, at 12:35 AM, Michael Bruschkewitz wrote:

> Hello Logan!
> (btw. do you know they named a car like you? It's very cheap, but
> it's a car, anyway... :)

There's lots of things named Logan (a town, a mountain, etc), but this
is the first I've heard of a car (:

> deliveries are both very useful "features" which will help to spread
> At first I would insert some lines of feature-description at top of
> "rawr"-page.
> A very good example may be found at "jar2exe"-page. Google this and
> you'll find description of features even on the Google-page! Try
> also "convert jar to exe".
> (Google "convert ruby to exe" doesn't show "rawr" at first 3 pages...)
> "rawr" should fit both, if it works as you described it.

I'll definitely give these a shot.

>>> - how to define main class of Java project
>> c.main_java_file = 'org.rubyforge.rawr.Main'
>> This line comes built into Rawr's default generated configuration.
>> You
>> can set it to any class you want, however. The notation is
>> <package>.<class>.
>
> So it would be possible to set this to any Java-class which contains
> a main function?
> Would it be possible to use "rawr" even if no Ruby files are used?

Yep! There might be better tools if you're using a pure Java
environment. I'm not to sure about your options there.

>>> - if it's necessary to compile java classes through this tool.
>> Yes! Anything inside the  c.source_dirs array will be compiled JRuby
>> or Java.
>
> Is it really mandatory to compile java classes or is it possible to
> use only jars?

Java files in your project will need to be compiled to be used, but
you can go with any combination of jars and project-specific Java files.

> However, because this is a feature which is often requested, I would
> expect such an add-on to be available (soon?) in Netbeans, Eclipse
> and other IDE's.

The Netbeans team has Rawr on their radar and we've offered to help
them in any way they need it to make Rawr work with Netbeans.

>
> Maybe moderately paid. It would be useful for many people.
>
>
> Hopefully, you'll hear a success-story soon!
>

Thanks!
This topic is locked and can not be replied to.