From: Logan Barnett Date: 2009-06-04T04:45:38+09:00 Subject: Re: Create an exe with Ruby 1.9.1 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 .. > - 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