Class: RubyInstaller::Build::Components::DevTools
- Defined in:
- lib/ruby_installer/build/components/03_dev_tools.rb
Constant Summary collapse
- PACKAGES_COMMON =
%w[ autoconf autogen automake-wrapper diffutils file gawk grep libtool m4 make patch sed texinfo texinfo-tex wget mingw-w64-binutils mingw-w64-crt-git mingw-w64-gcc mingw-w64-gcc-libs mingw-w64-headers-git mingw-w64-libmangle-git mingw-w64-libwinpthread-git mingw-w64-make mingw-w64-tools-git mingw-w64-winpthreads-git ]
- PACKAGES_MINGW32 =
PACKAGES_COMMON + %w[ pkg-config mingw-w64-pkg-config ]
- PACKAGES_MINGW64 =
PACKAGES_COMMON + %w[ pkgconf mingw-w64-pkgconf ]
- PACKAGES =
{ 'mingw32' => PACKAGES_MINGW32, 'mingw64' => PACKAGES_MINGW64, 'ucrt64' => PACKAGES_MINGW64, }
Constants included from RubyInstaller::Build::Colors
RubyInstaller::Build::Colors::ColorMap, RubyInstaller::Build::Colors::ESC, RubyInstaller::Build::Colors::NND
Instance Attribute Summary
Attributes inherited from Base
#builtin_packages_dir, #msys, #pacman_args, #task_index
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#autorebase, #check_hash, #download, #initialize, #kill_all_msys2_processes, #puts, #run_verbose, #shell_escape, #shell_join
Methods included from RubyInstaller::Build::Colors
colored, disable_colors, enable_colors, initialize
Constructor Details
This class inherits a constructor from RubyInstaller::Build::Components::Base
Class Method Details
.depends ⇒ Object
5 6 7 |
# File 'lib/ruby_installer/build/components/03_dev_tools.rb', line 5 def self.depends %w[msys2] end |
Instance Method Details
#description ⇒ Object
9 10 11 |
# File 'lib/ruby_installer/build/components/03_dev_tools.rb', line 9 def description "MSYS2 and MINGW development toolchain" end |
#execute(args) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ruby_installer/build/components/03_dev_tools.rb', line 57 def execute(args) msys.with_msys_apps_enabled do puts "Install #{description} ..." packages = PACKAGES.fetch(msys.mingwarch).map do |package| package.sub(/^mingw-w64/, msys.mingw_package_prefix) end res = run_verbose("pacman", "-S", *pacman_args, *packages) puts "Install #{description} #{res ? green("succeeded") : red("failed")}" raise "pacman failed" unless res puts puts green("You can use 'ridk enable' to activate the MSYS2 tools on the command prompt.") autorebase end end |