Class: U3d::LinuxDependencies

Inherits:
Object
  • Object
show all
Defined in:
lib/u3d/installer.rb

Constant Summary collapse

DEPENDENCIES =
[
  'gconf-service',
  'lib32gcc1',
  'lib32stdc++6',
  'libasound2',
  'libc6',
  'libc6-i386',
  'libcairo2',
  'libcap2',
  'libcups2',
  'libdbus-1-3',
  'libexpat1',
  'libfontconfig1',
  'libfreetype6',
  'libgcc1',
  'libgconf-2-4',
  'libgdk-pixbuf2.0-0',
  'libgl1-mesa-glx',
  'libglib2.0-0',
  'libglu1-mesa',
  'libgtk2.0-0',
  'libnspr4',
  'libnss3',
  'libpango1.0-0',
  'libstdc++6',
  'libx11-6',
  'libxcomposite1',
  'libxcursor1',
  'libxdamage1',
  'libxext6',
  'libxfixes3',
  'libxi6',
  'libxrandr2',
  'libxrender1',
  'libxtst6',
  'zlib1g',
  'debconf',
  'npm',
  'libpq5' # missing from original list
].freeze

Class Method Summary collapse

Class Method Details

.installObject



578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/u3d/installer.rb', line 578

def self.install
  if `which dpkg` != ''
    prefix = 'apt-get -y install'
  elsif `which rpm` != ''
    prefix = 'yum -y install'
  else
    raise 'Cannot install dependencies on your Linux distribution'
  end

  return if UI.interactive? && !(UI.confirm "Install dependencies? (#{DEPENDENCIES.length} dependency(ies) to install)")

  U3dCore::CommandExecutor.execute(command: "#{prefix} #{DEPENDENCIES.join(' ')}", admin: true)
end