Open ngolovin opened 8 years ago
Hi, and thanks for submitting this issue. I have some suggestions about better ways to work around this.
If you tell me the output of the command ruby -r ffi -e 'p FFI::Platform::OS'
and the path(s) where libraries are located in Cygwin, I can add support for Cygwin to Nice-FFI. That said, I don't know if there will ever be a new release of Nice-FFI, so maybe that doesn't help you much.
Alternatively, if you are using ruby-sdl-ffi (or rubygame), there are two built-in workarounds to add custom load paths:
1) If you are writing your own app, you can define the SDL_PATHS
constant in your app to be an array of additional paths to search for SDL. You must define the constant before loading ruby-sdl-ffi, like so:
SDL_PATHS = [ "C:\\windows\\system32\\", "C:\\windows\\system\\" ]
require 'ruby-sdl-ffi'
2) If you are running someone else's app, you can set the RUBYSDLFFI_PATH
environment variable (in your shell or system settings) to a path (or semicolon-separated list of paths for Windows, or colon-separated list of paths for Linux/BSD/Mac), like so:
export RUBYSDLFFI_PATH="C:\\windows\\system32\\;C:\\windows\\system\\"
ruby ./some-app.rb
I hope that helps.
Workaround: edit the file https://github.com/jacius/nice-ffi/blob/master/lib/nice-ffi/pathset.rb:456
replace by