[Rubygems-developers] Binaries dependencies (shared_libraries) for Windows.
luislavena at gmail.com
Tue Nov 18 15:52:31 EST 2008
On Sun, Nov 16, 2008 at 7:19 PM, Charlie Savage <cfis at savagexi.com> wrote:
>> I've explored the different alternatives under several environments
>> and the following are my findings:
>> 1) Alteration of PATH to prepend the DLL location.
>> 2) Usage of SetDllDirectory
>> 3) LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
> Maybe we do something simple and say that all shared dependencies get put
> into ruby/lib on windows (or create a new directory, ruby/shared or
> something). Or we could just do what happens now, put everything in bin.
> But I think its probably be better to separate them out.
We will still face the override of the libraries by old/new versions
that came from different gems.
> One potential drawback with this solution is if 2 gems use the same shared
> library, but install different versions (although maybe the files would have
> different names).
Highly unlikely the dll has different version, like ones found on
*nix, they always stick to the same name.
I'm looking right now how option 3 will affect when allocating two
handles and adding the proper hooks to cleanup those at_exit.
Eric: with option 3 we open handles at the OS level. do you think we
can hook a at_exit function to perform the cleanup (close) of these
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
More information about the Rubygems-developers