3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/gr_commons/search_shared_library.rb', line 3
def search_shared_library(gr_lib_name)
if Object.const_defined?(:RubyInstaller)
ENV['GRDIR'] ||= [
RubyInstaller::Runtime.msys2_installation.msys_path,
RubyInstaller::Runtime.msys2_installation.mingwarch
].join(File::ALT_SEPARATOR)
recursive_search(gr_lib_name, ENV['GRDIR']).tap do |path|
RubyInstaller::Runtime.add_dll_directory(File.dirname(path))
end
else
unless ENV['GRDIR']
warn 'Please set environment variable GRDIR'
exit 1
end
recursive_search(gr_lib_name, ENV['GRDIR'])
end
end
|