This repository has been archived on 2021-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
22 lines
560 B
Ruby
22 lines
560 B
Ruby
require 'glib2'
|
|||
|
|||
base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
|
|||
vendor_dir = base_dir + "vendor" + "local"
|
|||
vendor_bin_dir = vendor_dir + "bin"
|
|||
GLib.prepend_dll_path(vendor_bin_dir)
|
|||
begin
|
|||
major, minor, _ = RUBY_VERSION.split(/\./)
|
|||
require "#{major}.#{minor}/atk.so"
|
|||
rescue LoadError
|
|||
require 'atk.so'
|
|||
end
|
|||
|
|||
if vendor_dir.exist?
|
|||
begin
|
|||
require "gobject-introspection"
|
|||
vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
|
|||
GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
|
|||
rescue LoadError
|
|||
end
|
|||
end
|