Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic DLL support for Windows Ruby Installer #241

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

johnnyshields
Copy link

@johnnyshields johnnyshields commented Feb 25, 2025

This PR uses the Gemspec msys2_mingw_dependencies metadata to automatically install the appropriate Mingw package. You can see the same thing is used for the Psych gem here.

This saves Windows users the trouble of downloading/renaming the DLL file.

You can see here the file is located at /ucrt64/bin/libsodium-26.dll on the Mingw package, hence we need to add a new possible package name to the ffi_lib call.

@@ -5,7 +5,7 @@ module RbNaCl
# Defines the libsodium init function
module Init
extend FFI::Library
ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23", "libsodium.so.26"]
ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23", "libsodium.so.26", "libsodium-26"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to reduce this duplication with RbNacl::Sodium class. Any suggestion on how to do it--define a shared constant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant