Re: [Ikvm-developers] Adding many resources with ikvmc
Brought to you by:
jfrijters
|
From: aslak h. <asl...@gm...> - 2009-04-29 09:27:40
|
> Hi there, > > After seeing Jeroen's excellent presentation on IKVM at the Roots > conference in Bergen yesterday I decided to package JRuby for IKVM. In order > to reduce JRubys' startup time I need to ikvmc jruby-complete.jar. That > actually reduced startup time from 30 secs to about 2. Good! > > However, If I try to run ruby code that tries to load some of the Ruby > standard library files I run into problems. > > jruby-complete.jar bundles the Ruby standard libraries as a lot of .rb > files located under /META-INF/jruby.home and it seems that these files are > not automatically included in the generated jruby-complete.exe. JRuby loads > these with plain old getClass().getResource(). > > I know there is a -resource flag I can pass to ikvmc, but it doesn't seem > to work with directories. It's unpractical to enumerate all the files to > include - there are hundreds of them. > > Any advice on how to package up all the .rb resources inside the exe? Is > there a switch I don't know about or would this require a change to ikvmc? > If a change is needed, do you have any pointers on where I can start > looking? > I dug around and think I found a way. I could modify the logic for -resource (in ikvmc/Compiler.cs) so that if it's a directory, it will recurse down it and add all files in there. Does that make sense? Would you accept a patch for that? Cheers, Aslak > > Thanks a lot for a fantastic product! > > Cheers, > Aslak > > |