Module: RubyInstaller::Build
Overview
Use for: Build
, Runtime
Constant Summary
-
BuildOrRuntime =
# File 'lib/ruby_installer/build.rb', line 21self
-
GEM_VERSION =
# File 'lib/ruby_installer/build/gem_version.rb', line 3"0.1.0"
Class Method Summary
-
.add_dll_directory(path, &block)
Add
path
as a search path for DLLs. - .disable_msys_apps(**opts)
-
.enable_dll_search_paths
Switch to explicit DLL search paths added by add_dll_directory().
-
.enable_msys_apps(**opts)
Add MSYS2 to the PATH and set other environment variables required to run MSYS2.
- .msys2_installation Internal use only
Class Method Details
.add_dll_directory(path, &block)
Add path
as a search path for DLLs
This can be used to allow ruby extension files (typically named
) to import dependent DLLs from another directory.
If this method is called with a block, the path is temporary added until the block is finished. The method returns a Build::DllDirectory
instance, when called without a block. It can be used to remove the directory later.
# File 'lib/ruby_installer/build/singleton.rb', line 11
def add_dll_directory(path, &block) DllDirectory.new(path, &block) end
.disable_msys_apps(**opts)
[ GitHub ]# File 'lib/ruby_installer/build/singleton.rb', line 40
def disable_msys_apps(**opts) msys2_installation.disable_msys_apps(**opts) end
.enable_dll_search_paths
Switch to explicit DLL search paths added by add_dll_directory(). Then enable paths set by RUBY_DLL_PATH environment variable and the MSYS2-MINGW directory, if available.
# File 'lib/ruby_installer/build/singleton.rb', line 22
def enable_dll_search_paths ENV['RUBY_DLL_PATH'].to_s.split(File::PATH_SEPARATOR).each do |path| DllDirectory.new(path) rescue DllDirectory::Error end msys2_installation.enable_dll_search_paths end
.enable_msys_apps(**opts)
Add MSYS2 to the PATH and set other environment variables required to run MSYS2.
This method tries to find a MSYS2 installation or exits with a description how to install MSYS2.
mingwarch
should be either ‘mingw32’, ‘mingw64’ or nil. In the latter case the mingw architecture is used based on the architecture of the running Ruby process.
# File 'lib/ruby_installer/build/singleton.rb', line 36
def enable_msys_apps(**opts) msys2_installation.enable_msys_apps(**opts) end
.msys2_installation
# File 'lib/ruby_installer/build/singleton.rb', line 16
def msys2_installation @msys2_installation ||= Msys2Installation.new end