Handle embedded DLLs in JAR/WAR in ffi_lib
------------------------------------------

                 Key: JRUBY-4880
                 URL: http://jira.codehaus.org/browse/JRUBY-4880
             Project: JRuby
          Issue Type: Improvement
    Affects Versions: JRuby 1.5.1
            Reporter: Garrett Conaty
            Assignee: Thomas E Enebo


Attempting to use Nokogiri gem on windows where the gem is bundled in a JAR 
file (and has a lib/ext/libxml.dll).  Nokogiri doesn't know it's in a JAR file 
and hence constructs a string that points inside the JAR:


    if RUBY_PLATFORM =~ /java/ && java.lang.System.getProperty('os.name') =~ 
/windows/i
      raise(RuntimeError, "Nokogiri requires JRuby 1.4.0 or later on Windows") 
if JRUBY_VERSION < "1.4.0"
      dll_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", 
"..", "ext", "nokogiri"))
      libs = ["libxml2.dll", "libxslt.dll", "libexslt.dll"].collect do |lib|
        File.join(dll_dir, lib).tr("/","\\") # see 
http://jira.codehaus.org/browse/JRUBY-2763
      end + ["msvcrt"]
      ffi_lib(*libs)
    else
      ffi_lib 'xml2', 'xslt', 'exslt'
    end


I'm requesting an enhancement to ffi_lib that would detect if the path is 
inside a JAR and if so

1) Extract that file to a tmp dir
2) Pass this new file to JFFI to dlopen.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to