def Vtk.LoadRubyTkWidgets
??
name = 'vtkRenderingRubyTkWidgets'
pkgname = name.downcase.capitalize
loaded = Tk.tk_call('info', 'loaded')
if loaded.include?(pkgname)
return false
end
prefix = ''
if Config::CONFIG['arch']=~/linux/
prefix = 'lib'
end
extension = Tk.tk_call('info', 'sharedlibextension')
filename = prefix+name+extension
pathlist = $LOAD_PATH
auto_paths = Tk::AUTO_PATH.to_a
pathlist += auto_paths
if Config::CONFIG['arch']=~/linux/
pathlist += ['/usr/local/lib']
end
for path in pathlist
fullpath = File.join(path, filename)
begin
Tk.load_tcllibrary(fullpath, pkgname)
return true
rescue
next
end
end
Tk.tk_call('load', filename)
return nil
end