From: Michael Bruschkewitz Date: 2009-06-04T16:35:13+09:00 Subject: Re: Create an exe with Ruby 1.9.1 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" 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 > .. 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.