Module: RubyInstaller::Build

Defined in:
lib/ruby_installer/build/colors.rb,
lib/ruby_installer/build.rb,
lib/ruby_installer/build/task.rb,
lib/ruby_installer/build/utils.rb,
lib/ruby_installer/build/release.rb,
lib/ruby_installer/build/singleton.rb,
lib/ruby_installer/build/openstruct.rb,
lib/ruby_installer/build/os_process.rb,
lib/ruby_installer/build/gem_version.rb,
lib/ruby_installer/build/ca_cert_file.rb,
lib/ruby_installer/build/erb_compiler.rb,
lib/ruby_installer/build/dll_directory.rb,
lib/ruby_installer/build/components/base.rb,
lib/ruby_installer/build/msys2_installation.rb,
lib/ruby_installer/build/components/01_msys2.rb,
lib/ruby_installer/build/components_installer.rb,
lib/ruby_installer/build/components/03_dev_tools.rb,
lib/ruby_installer/build/components/02_pacman_update.rb

Overview

Use for: Build, Runtime

Defined Under Namespace

Modules: Colors, Components, Utils Classes: CaCertFile, ComponentsInstaller, DllDirectory, ErbCompiler, Msys2Installation, Openstruct, OsProcess, Release, Task

Constant Summary collapse

BuildOrRuntime =
self
GEM_VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.add_dll_directory(path, &block) ⇒ Object

Add path as a search path for DLLs

This can be used to allow ruby extension files (typically named <extension>.so ) 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 DllDirectory instance, when called without a block. It can be used to remove the directory later.



11
12
13
# File 'lib/ruby_installer/build/singleton.rb', line 11

def add_dll_directory(path, &block)
  DllDirectory.new(path, &block)
end

.disable_msys_apps(**opts) ⇒ Object



40
41
42
# File 'lib/ruby_installer/build/singleton.rb', line 40

def disable_msys_apps(**opts)
  msys2_installation.disable_msys_apps(**opts)
end

.enable_dll_search_pathsObject

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.



22
23
24
25
26
27
28
# 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) ⇒ Object

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.



36
37
38
# File 'lib/ruby_installer/build/singleton.rb', line 36

def enable_msys_apps(**opts)
  msys2_installation.enable_msys_apps(**opts)
end

.msys2_installationObject

:nodoc:



16
17
18
# File 'lib/ruby_installer/build/singleton.rb', line 16

def msys2_installation
  @msys2_installation ||= Msys2Installation.new
end