module GRCommons::GRLib

This module helps GR, GR and GRM to search the shared library.

The order of priority:

  1. RubyInstaller ( for Windows only )

  2. Environment variable GRDIR

  3. pkg-config : github.com/ruby-gnome/pkg-config

The following packages (should) support pkg-config.

Public Class Methods

get_grdir_from_env(lib_names) click to toggle source

Return the directory path from the GRDIR environment variable.

# File lib/gr_commons/gr_lib.rb, line 32
def get_grdir_from_env(lib_names)
  return nil unless ENV['GRDIR']
  return ENV['GRDIR'] if Dir.exist?(ENV['GRDIR'])

  warn "#{lib_names} : Dir GRDIR=#{ENV['GRDIR']} not found." # return nil
end
ruby_installer?() click to toggle source

Check if using RubyInstaller or not.

# File lib/gr_commons/gr_lib.rb, line 27
def ruby_installer?
  Object.const_defined?(:RubyInstaller)
end