module Easycompile

#

require 'easycompile/base/change_directory.rb'

#
#

require 'easycompile/base/cmake.rb'

#
#

By default we will try to use colours, even if the default value for the toplevel instance variable @can_we_use_colours is set to false - it will typically become true at a later point, in this file.

#

require 'easycompile/base/colours.rb'

#
#

require 'easycompile/base/commandline_arguments.rb'

#
#

require 'easycompile/base/esystem.rb'

#
#

This file will handle the installation of gems, which is the ruby-addon stuff.

#

require 'easycompile/base/gem.rb'

#
#

require 'easycompile/base/help.rb'

#
#

require 'easycompile/base/initialize.rb'

#
#

require 'easycompile/base/menu.rb'

#
#

require 'easycompile/base/meson_and_ninja.rb'

#
#

require 'easycompile/base/opn.rb'

#
#

require 'easycompile/base/process_the_input.rb'

#
#

require 'easycompile/base/remove.rb'

#
#

require 'easycompile/base/run.rb'

#
#

require 'easycompile/constants/array_possible_archives.rb'

#
#

require 'easycompile/constants/misc.rb'

#
#

require 'easycompile/constants/namespace.rb'

#
#

require 'easycompile/constants/programs_directory.rb'

#
#

require 'easycompile/project/project.rb'

#
#

require 'easycompile/toplevel_methods/copy_file.rb'

#
#

Here we collect methods which are directly available on the module level of the project.

#

require 'easycompile/toplevel_methods/misc.rb'

#
#

require 'easycompile/toplevel_methods/rinstall2.rb'

#
#

require 'easycompile/version/version.rb'

#

Constants

LAST_UPDATE
#

LAST_UPDATE

#
PROJECT_BASE_DIR
#

Easycompile::PROJECT_BASE_DIR

This is simply an “alias” to the above constant.

#
PROJECT_BASE_DIRECTORY
#

Easycompile::PROJECT_BASE_DIRECTORY

#
VERSION
#

VERSION

#

Public Class Methods

can_we_use_colours?() click to toggle source
#

Easycompile.can_we_use_colours?

#
# File lib/easycompile/base/colours.rb, line 29
def self.can_we_use_colours?
  @can_we_use_colours
end
compile( i = nil, optional_compile_as_appdir = false ) click to toggle source
#

Easycompile.compile

This method must be able to tap into CompileAsAppdir, as well as invoke Easycompile, so both .rb files are required here.

If no input is given then a random entry will be fetched.

Invocation example:

Easycompile.compile('wv.yml', :appdir)
#
# File lib/easycompile/toplevel_methods/misc.rb, line 33
def self.compile(
    i = nil, optional_compile_as_appdir = false
  )
  if i.nil?
    i = try_to_randomly_fetch_an_archive_from_the_current_directory
  end
  case optional_compile_as_appdir
  when :appdir
    # ===================================================================== #
    # Make it more explicit in this case.
    # ===================================================================== #
    optional_compile_as_appdir = true
  end
  if optional_compile_as_appdir
    ::Easycompile::CompileAsAppdir[i]
  else
    ::Easycompile::Easycompile.new(i)
  end
end
copy_file( from, to = Dir.pwd ) click to toggle source
#

Easycompile.copy_file

The second argument to this method specifies the target-location where the file should be copied onto.

#
# File lib/easycompile/toplevel_methods/copy_file.rb, line 17
def self.copy_file(
    from, to = Dir.pwd
  )
  FileUtils.cp(from, to)
end
is_an_archive?(i) click to toggle source
#

Easycompile.is_an_archive?

#
# File lib/easycompile/constants/array_possible_archives.rb, line 31
def self.is_an_archive?(i)
  extname = File.extname(File.basename(i)).delete('.')
  Constants::ARRAY_POSSIBLE_ARCHIVES.include? extname
end
programs_directory?() click to toggle source
#

Easycompile.programs_directory?

#
# File lib/easycompile/constants/programs_directory.rb, line 42
def self.programs_directory?
  @programs_directory
end
project_base_dir?() click to toggle source
#

Easycompile.project_base_dir?

#
# File lib/easycompile/project/project.rb, line 25
def self.project_base_dir?
  PROJECT_BASE_DIRECTORY
end
rinstall2() click to toggle source
#

Easycompile.rinstall2

How to install ruby-stuff without gems, by using good oldschool setup.rb.

#
# File lib/easycompile/toplevel_methods/rinstall2.rb, line 18
def self.rinstall2
  copy_file ::Easycompile::Constants::LOCATION_OF_SETUP_RB,
            Dir.pwd
  esystem 'ruby setup.rb --quiet config'
  esystem 'ruby setup.rb --quiet setup'
  esystem 'ruby setup.rb --quiet install'
  File.delete('setup.rb')       if File.exist? 'setup.rb'
  File.delete('InstalledFiles') if File.exist? 'InstalledFiles'
  File.delete('.config')        if File.exist? '.config'
end
ruby_src_dir?() click to toggle source
#

Easycompile.ruby_src_dir?

#
# File lib/easycompile/constants/file_and_directory_constants.rb, line 133
def self.ruby_src_dir?
  Constants::RUBY_SRC
end
set_can_we_use_colours(i = true) click to toggle source
#

Easycompile.set_can_we_use_colours

#
# File lib/easycompile/base/colours.rb, line 22
def self.set_can_we_use_colours(i = true)
  @can_we_use_colours = i
end
set_programs_directory(i) click to toggle source
#

Easycompile.set_programs_directory

#
# File lib/easycompile/constants/programs_directory.rb, line 33
def self.set_programs_directory(i)
  i = i.dup if i.frozen?
  i << '/' unless i.end_with? '/'
  @programs_directory = i
end
source_dir?() click to toggle source
#

Easycompile.source_dir?

#
# File lib/easycompile/constants/file_and_directory_constants.rb, line 126
def self.source_dir?
  Constants::SRC_DIR
end
temp_dir?() click to toggle source
#

Easycompile.temp_dir?

#
# File lib/easycompile/constants/file_and_directory_constants.rb, line 119
def self.temp_dir?
  Constants::TEMP_DIR
end
try_to_randomly_fetch_an_archive_from_the_current_directory() click to toggle source
#

Easycompile.try_to_randomly_fetch_an_archive_from_the_current_directory

#
# File lib/easycompile/constants/array_possible_archives.rb, line 39
def self.try_to_randomly_fetch_an_archive_from_the_current_directory
  _ = Dir['*']
  _.select! {|entry| is_archive? entry }
  _
end
version?() click to toggle source
#

version?

#
# File lib/easycompile/version/version.rb, line 22
def self.version?
  Easycompile::VERSION
end