module Arfor::PlatformInstaller

Constants

BASE_TARGET
BASE_URL
DEFAULT_ARCH
DEFAULT_DIST
DEFAULT_PE_VERSION
DEFAULT_REL
SUFFIX_TARGET

Public Class Methods

download(pe_version, dist, rel, arch) click to toggle source
# File lib/arfor/platform_installer.rb, line 43
def self.download(pe_version, dist, rel, arch)
  licence_check

  pe_version  = pe_version || DEFAULT_PE_VERSION
  dist        = dist || DEFAULT_DIST
  rel         = rel || DEFAULT_REL
  arch        = arch || DEFAULT_ARCH
  url         = "#{BASE_URL}dist=#{dist}&rel=#{rel}&arch=#{arch}&ver=#{pe_version}"

  Arfor::Download::get(url)
end
licence_check() click to toggle source
# File lib/arfor/platform_installer.rb, line 30
def self.licence_check
  licenced = false
  if File.exist?(Arfor::LICENCE_FILE)
    licenced = File.foreach(Arfor::LICENCE_FILE).grep(/thanks for registering/)
  end

  if ! licenced
    abort("Missing or invalid ArFour licence detected - email sales@declarativesystems.com to obtain one")
  end
  licenced
end