-
Notifications
You must be signed in to change notification settings - Fork 0
/
loadpath.rb
59 lines (58 loc) · 1.35 KB
/
loadpath.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# file: '!loadpaths.rb'
# for Win32
#
# Version 3.0.1 - Public Domain
#
# Authored by : Dan Rathbun
# Contributors : Jim Foltz
#
begin
#
# TWEEKER variables
#
# may change 'ver' to a literal string
if RUBY_VERSION < '1.9.0'
ver=RUBY_VERSION.split('.')[0..1].join('.')
else
ver=RUBY_VERSION
end
#
# 'pre' is the rubylib path prefix
pre='C:/ruby'<<RUBY_VERSION.split('.').join<<'/lib/ruby'
#pre='/usr/lib/ruby'
plat='i386-mingw32'#RUBY_PLATFORM
#
# add the standard lib path
$LOAD_PATH << "#{pre}/#{ver}"
# add the standard platform sub lib path
$LOAD_PATH << "#{pre}/#{ver}/#{plat}"
#
# optionally add paths to vendor_ruby libs
# only apply if there are things installed there
#$LOAD_PATH << "#{pre}/vendor_ruby/#{ver}"
#$LOAD_PATH << "#{pre}/vendor_ruby/#{ver}/#{plat}"
#
# optionally add paths to site_ruby libs
# only apply if there are things installed there
#$LOAD_PATH << "#{pre}/site_ruby/#{ver}"
#$LOAD_PATH << "#{pre}/site_ruby/#{ver}/#{plat}"
#
$LOAD_PATH.uniq!
#
# print LOAD PATHS to console
# (May not print during Sketchup startup!)
Sketchup.send_action('showRubyPanel:')
UI.start_timer(1,false) {
puts "\nLOAD PATHS:\n"
$LOAD_PATH.each {|x| puts "#{x}\n"}
puts "\n\n"
}
#
end
# cleanup
ver=nil
pre=nil
plat=nil
GC.start
#
# end of '!loadpaths.rb'