-
Notifications
You must be signed in to change notification settings - Fork 251
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
included dll's ? #141
Comments
@MSP-Greg - I am working a challenge to reduce the size of ruby installs. When fat binaries were removed, I moved to a full toolkit install with the necessary gems - but it is huge. I am searching for ways to remove heft. It appears, with your code, I could identify the required DLLS for the gems installed, move them to a specific path-available location, and take all of the weight of the msys system back out of the bundled installer, leaving it to the user to decide if they want to install the tools and packages. If that makes sense, and if it is even close to accurate, I would truly enjoy being able to review your code. Thanks for all you do - Doug |
Not quite sure what you mean by 'ruby installs', but I think you're packaging apps with pre-compiled extension gems and want to include the dll's with the package? The code I referenced above used pacman to get the list of required dll's, so it wouldn't work with gems. The code below is kind of hacky, but it does list all the dll's required by *.so files in the RubyGems folders. You'd need to change the path if you're 'bundling', and filter out dll's included with Ruby, etc... objdump = "C:/msys64/mingw64/bin/objdump.exe"
so_files = []
Gem.path.each { |gp| so_files += Dir["#{gp}/gems/*/lib/**/*.so"] }
dlls = ''.dup
so_files.each do |so|
dlls << `powershell -NoProfile -Command "#{objdump} -p #{so} | Select-String -Pattern 'DLL Name:'"`.gsub(/^[ \t]*DLL Name: /, '')
end
dlls = dlls.strip.split.uniq.sort
puts dlls |
Thanks! I'll let you know how it goes in a couple weeks. |
Lars,
While working with an extension gem that had all of the needed c code included (no external MSYS/MinGW packages needed), I noticed that it was dependent on
libstdc++-6.dll
, which doesn't seem to be included inbin/ruby_builtin_dlls
. Maybe consider adding it?A while ago I wrote code that looked at the gcc-libs, gdbm, libffi, openssl, readline, & zlib packages, and determined all the dll's included in those packages and their dependencies. Below is the list:
As you may recall, I'm not really a c type. If you want the code, let me know.
Hope things are well, Greg
The text was updated successfully, but these errors were encountered: