rubyslippers 1.07 → 1.08
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Readme.txt +20 -7
- data/code/01rwdcore/02helptexthashbegin.rb +10 -0
- data/code/01rwdcore/03helptexthash.rb +18 -20
- data/code/01rwdcore/runopentinkerdocument.rb +1 -1
- data/code/superant.com.rubyslippers/0uninstallapplet.rb +1 -1
- data/code/superant.com.rubyslippers/gemserve.rb +0 -0
- data/code/superant.com.rubyslippers/gemwhich.rb +1 -1
- data/code/superant.com.rubyslippers/loadconfigurationrecord.rb +8 -24
- data/code/superant.com.rubyslippers/loadconfigurationvariables.rb +8 -8
- data/code/superant.com.rubyslippers/saveconfigurationrecord.rb +2 -2
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +62 -132
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +9 -7
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +8 -2
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +6 -6
- data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +13 -0
- data/configuration/rwdtinker.dist +5 -8
- data/configuration/tinkerwin2variables.dist +13 -7
- data/configuration/{wrubyslippers-1.07.dist → wrubyslippers.dist} +10 -10
- data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/91viewconfiguration.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
- data/init.rb +59 -163
- data/installed/{wrubyslippers-1.07.inf → wrubyslippers.inf} +7 -7
- data/lang/en/rubyslippers/en.po +21 -0
- data/lang/en/rwdcore/en.po +166 -0
- data/lang/es/rubyslippers/es.po +21 -0
- data/lang/es/rwdcore/es.po +172 -0
- data/lang/fr/rubyslippers/fr.po +21 -0
- data/lang/fr/rwdcore/fr.po +166 -0
- data/lang/hi/rwdcore/hi.po +170 -0
- data/lang/ja/rubyslippers/ja.po +21 -0
- data/lang/ja/rwdcore/ja.po +168 -0
- data/lang/nl/rubyslippers/nl.po +21 -0
- data/lang/nl/rwdcore/nl.po +166 -0
- data/lib/rconftool.rb +13 -6
- data/lib/rwd/net.rb +15 -4
- data/lib/rwd/ruby.rb +1 -1
- data/lib/rwd/rwd.rb +103 -620
- data/lib/rwdthemes/default.rwd +317 -0
- data/lib/rwdthemes/pda.rwd +72 -0
- data/lib/rwdthemes/windowslike.rwd +171 -0
- data/lib/rwdtinker/rwdcodedir.rb +56 -0
- data/lib/rwdtinker/rwdguidir.rb +57 -0
- data/lib/rwdtinker/rwdlangdir.rb +60 -0
- data/lib/rwdtinker/rwdtinkertools.rb +25 -0
- data/rwd_files/HowTo_RubySlippers.txt +14 -0
- data/rwd_files/HowTo_Tinker.txt +37 -7
- data/rwd_files/Tinkerhelptexthash.txt +81 -0
- data/rwd_files/log/rwdtinker.log +2 -0
- data/rwdconfig.dist +14 -13
- data/{rubyslippers.rb → rwdtinker.rb} +0 -0
- data/tests/makedist-tinkerbellw.rb +58 -0
- data/tests/makedist-wrubyslippers.rb +8 -5
- data/tests/makedist.rb +2 -2
- data/zips/rwdwcalc-0.63.zip +0 -0
- data/zips/rwdwfoldeditor-0.05.zip +0 -0
- data/zips/rwdwhypernote-0.15.zip +0 -0
- data/zips/rwdwmovies-0.98.zip +0 -0
- data/zips/rwdwmpd-0.07.zip +0 -0
- data/zips/rwdwruby-1.08.zip +0 -0
- data/zips/tinkerbellw-0.03.zip +0 -0
- data/zips/wrubyslippers-1.08.zip +0 -0
- metadata +37 -26
- data/code/01rwdcore/04helptextend.rb +0 -6
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -61
- data/configuration/language.dist +0 -8
- data/configuration/rwdapplicationidentity.dist +0 -3
- data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/92viewconfiguration.rwd +0 -45
- data/lang/en/rubyslippers/languagefile.rb +0 -10
- data/lang/en/rwdcore/languagefile.rb +0 -58
- data/lang/es/rubyslippers/languagefile.rb +0 -7
- data/lang/es/rwdcore/languagefile-es.rb +0 -62
- data/lang/fr/rubyslippers/languagefile.rb +0 -6
- data/lang/fr/rwdcore/languagefile.rb +0 -64
- data/lang/jp/rubyslippers/languagefile.rb +0 -6
- data/lang/jp/rwdcore/languagefile.rb +0 -72
- data/lang/nl/rubyslippers/languagefile.rb +0 -6
- data/lang/nl/rwdcore/languagefile.rb +0 -75
- data/zips/rwdwaddresses-1.05.zip +0 -0
- data/zips/rwdwcalc-0.61.zip +0 -0
- data/zips/rwdwgutenberg-0.09.zip +0 -0
- data/zips/rwdwschedule-1.04.zip +0 -0
- data/zips/rwdwshell-1.04.zip +0 -0
- data/zips/wrubyslippers-1.06.zip +0 -0
@@ -13,16 +13,18 @@ def installgemapplet
|
|
13
13
|
zf.extract(entry.to_s, entry.to_s)
|
14
14
|
}
|
15
15
|
|
16
|
-
|
16
|
+
rescue
|
17
17
|
|
18
|
-
|
19
|
-
$stderr.puts "unzip error - applet may not be installed correctly"
|
20
|
-
end
|
21
|
-
@installapplettext = " .. "
|
18
|
+
$rwdtinkerlog.error "installgemapplet: unzip error - applet may not be installed correctly"
|
22
19
|
|
23
|
-
|
20
|
+
@installapplettext = " .. "
|
24
21
|
|
25
|
-
|
22
|
+
end # exception rescue
|
23
|
+
|
24
|
+
@rwd_ignore_vars << @nametextbase << @returninitiateresults << @installapplettext
|
25
|
+
tmpnametext = File.basename(nametext)
|
26
|
+
tmpnametext.chop!; tmpnametext.chop!; tmpnametext.chop!; tmpnametext.chop!
|
27
|
+
@nametextbase = tmpnametext.chop!
|
26
28
|
@returninitateresults = initiateapplet(@nametextbase)
|
27
29
|
@installapplettext = Message[:applet_installed] + " " + @returninitateresults
|
28
30
|
|
@@ -5,8 +5,14 @@ def fillziptoinstallname(inffile)
|
|
5
5
|
|
6
6
|
end
|
7
7
|
|
8
|
-
def listzipfilestoinstall
|
9
|
-
|
8
|
+
def listzipfilestoinstall
|
9
|
+
|
10
|
+
if $zipslocation.slice(0,1) == "/" || $zipslocation.include?(":")
|
11
|
+
startlangdir = $zipslocation
|
12
|
+
else
|
13
|
+
startlangdir = File.join($progdir, $zipslocation )
|
14
|
+
end
|
15
|
+
|
10
16
|
#get a list of the files and subdirectories on the starting directory only
|
11
17
|
|
12
18
|
|
@@ -24,14 +24,14 @@
|
|
24
24
|
def removeappletvariables(tempremovename)
|
25
25
|
|
26
26
|
begin # exception trapped block
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
|
28
|
+
$rwdtinkerlog.info "in removeappletvariables"
|
29
|
+
|
30
30
|
# removefileinf = File.open(tempremove){|f| f.read}
|
31
31
|
|
32
|
-
|
33
|
-
removemethod =
|
34
|
-
|
32
|
+
|
33
|
+
removemethod = tempremovename
|
34
|
+
|
35
35
|
|
36
36
|
send "#{removemethod}"
|
37
37
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
def rwdtinkerrunviewlog
|
2
|
+
require 'lib/rwdtinker/rwdtinkertools'
|
3
|
+
|
4
|
+
if @a_rwdtinkerlognumber == nil
|
5
|
+
@a_rwdtinkerlognumber = 11
|
6
|
+
@returnlogdisplay = RwdtinkerTools.tail("rwd_files/log/rwdtinker.log",@a_rwdtinkerlognumber.to_i)
|
7
|
+
|
8
|
+
else
|
9
|
+
@returnlogdisplay = RwdtinkerTools.tail("rwd_files/log/rwdtinker.log",@a_rwdtinkerlognumber.to_i)
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
##VERSION:1.
|
1
|
+
##VERSION: (1.82)
|
2
2
|
ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
|
3
3
|
CodeName = "rwdtinker"
|
4
4
|
CodeNameFile = CodeName + ".rb"
|
@@ -7,12 +7,9 @@ LangDir = "lang"
|
|
7
7
|
CodeDir = "code"
|
8
8
|
GuiDir = "gui"
|
9
9
|
$help_topic = "general_help"
|
10
|
-
|
11
|
-
|
12
|
-
$rwdcontrolports =["13713","13714","13715","13716","13717","13718"] # remote control code not actived 2007
|
10
|
+
$prevouswindow ="main"
|
11
|
+
$rwdcontrolports =["13713","13714","13715","13716"] # remote control code not actived 2007
|
13
12
|
$port = 7705
|
14
|
-
|
15
|
-
|
16
|
-
$tinkerdocumentsarray +=["HowTo_Tinker.txt","rwdapplications.html","RubyWebDialogs.html"]
|
17
|
-
RwdTinkerVersion = "1.76"
|
13
|
+
##NAME: (RwdTinkerVersion):(1.82)
|
14
|
+
RwdTinkerVersion = "1.82"
|
18
15
|
|
@@ -1,17 +1,23 @@
|
|
1
|
-
##VERSION:1.
|
1
|
+
##VERSION: (1.82)
|
2
2
|
TinkerWin2ConfigurationFileName = "tinkerwin2variables.cnf" # this file name - do not change
|
3
|
-
##NAME
|
3
|
+
##NAME: ($zipslocation):(1.78)
|
4
4
|
$zipslocation = "zips" # location of applets to add
|
5
|
-
$zipsarray = [""]
|
6
|
-
|
5
|
+
$zipsarray = [""]
|
6
|
+
$zipsarraylocal = [""]
|
7
|
+
##NAME: ($xpcommand):(1.78)
|
7
8
|
$xpcommand = " " # Linux machines
|
8
9
|
# $xpcommand = "cmd /C " # XP machines with cmd shell
|
9
|
-
##NAME
|
10
|
+
##NAME: ($gemdirectory_withgemfiles):(1.78)
|
10
11
|
$gemdirectory_withgemfiles = "/var/lib/gems/1.8/gems"
|
11
12
|
# $gemdirectory_withgemfiles = "c:\\ruby\\lib\\ruby\\gems\\1.8\\gems" # XP machine
|
12
|
-
##NAME
|
13
|
+
##NAME: ($geminstalled_directory):(1.78)
|
13
14
|
# $geminstalled_directory = "/ruby/lib/ruby/gems/1.8/gems" # XP machine
|
14
15
|
$geminstalled_directory = "/var/lib/gems/1.8/gems" # Debian Linux
|
15
16
|
|
16
|
-
|
17
|
+
$rwdapplicationidentity = "rwdtinker main application"
|
17
18
|
|
19
|
+
RwdTinkerWin2Version = "1.81"
|
20
|
+
Browser_Exe = 'mozilla '
|
21
|
+
#language selection file
|
22
|
+
##NAME: ($langarray):(1.82)
|
23
|
+
$langarray = [ "en","ja", "nl","es", "fr","hi"]
|
@@ -1,24 +1,24 @@
|
|
1
|
-
##VERSION:1.
|
2
|
-
##NAME
|
1
|
+
##VERSION: (1.08)
|
2
|
+
##NAME: ($gemdirectory):(1.07)
|
3
3
|
#$gemdirectory = "c:\\ruby\\lib\\ruby\\gems\\1.8" # XP machine
|
4
4
|
$gemdirectory = "/usr/lib/ruby/gems/1.8/gems" # Linux machine
|
5
|
-
##NAME
|
5
|
+
##NAME: ($gemspecificationsdirectory):(1.07)
|
6
6
|
#$gemspecificationsdirectory = "c:\\ruby\\lib\\ruby\\gems\\1.8\\specifications" # XP
|
7
7
|
$gemspecificationsdirectory = "/usr/lib/ruby/gems/1.8/specifications"
|
8
|
-
##NAME
|
8
|
+
##NAME: ($xpcommand):(1.07)
|
9
9
|
#$xpcommand = "cmd /C " # XP machines with cmd shell
|
10
10
|
$xpcommand = " " # Linux machines
|
11
|
-
##NAME
|
11
|
+
##NAME: ($gemspec_directory):(1.07)
|
12
12
|
$gemspec_directory = "/usr/lib/ruby/gems/1.8/specifications"
|
13
13
|
##NAME:$gembuild_directory:0
|
14
14
|
$gembuild_directory = "/usr/src/rubygems"
|
15
15
|
$tinkerdocumentsarray += ["HowTo_RubySlippers.txt"]
|
16
|
-
##NAME
|
16
|
+
##NAME: ($testharnessarray):(1.07)
|
17
17
|
$testharnessarray += ["rubyslippers_all_tests"]
|
18
18
|
$tinkerhelpaboutarray += ["RubySlippers"]
|
19
|
-
##NAME: JumpLink:
|
19
|
+
##NAME: (JumpLink):(1.07)
|
20
20
|
JumpLink.update(:RubyslippersWindow=>"runrubyslippersbackwindow",:GemCommands=>"runrubyslippersmenu1", :GemspecUtilities =>"runrubyslippersmenu8", :RubyslippersConfiguration=>"runrubyslippersmenu10" )
|
21
|
-
##NAME
|
21
|
+
##NAME: ($rwdjumplink):(1.07)
|
22
22
|
$rwdjumplink +=["RubyslippersWindow","GemCommands","GemspecUtilities","RubyslippersConfiguration"]
|
23
|
-
##NAME: RubySlippersVersion:
|
24
|
-
RubySlippersVersion = "1.
|
23
|
+
##NAME: (RubySlippersVersion):(1.08)
|
24
|
+
RubySlippersVersion = "1.08"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<tab name=\"viewrubyslippersconfiguration\" caption=\"Rubyslippers Configuration\">
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
<table>
|
8
|
+
<row> <p> </row>
|
9
|
+
<row> <p align=\"right\">You can view or edit the Rubyslippers configuration file here</row>
|
10
|
+
<row> <p> </row>
|
11
|
+
<horizontal>
|
12
|
+
<button caption=\"Fill Record\" action=\"loadrubyslippersconfiguration\"/>
|
13
|
+
<button caption=\"Save Changes\" action=\"saverubyslippersconfiguration\"/>
|
14
|
+
<button caption=\"Reload Variables\" action=\"loadrubyslippersconfigurationvariables\"/>
|
15
|
+
<button caption=\"Help\" action=\"runhelpwindowrubyslippers\"/>
|
16
|
+
</horizontal>
|
17
|
+
<table>
|
18
|
+
<row> <p align=\"right\">FileName:</p> <text size=55 name=\"a_rsconfigurationfilename\"/> </row>
|
19
|
+
<table>
|
20
|
+
<textarea name=\"a_rsconfigdata\"/> </row>
|
21
|
+
|
22
|
+
</table>
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
</tab>"
|
27
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<tab name=\"rwdlogfiletab\" caption=\"RWD Log Files\">
|
4
|
+
<table>
|
5
|
+
<horizontal>
|
6
|
+
|
7
|
+
|
8
|
+
<p align=\"left\">Number of lines to display</p> <text size=11 name=\"a_rwdtinkerlognumber\"/>
|
9
|
+
|
10
|
+
<button caption=#{Message[:viewlogger_information]} action=\"rwdtinkerrunviewlog\"/>
|
11
|
+
</horizontal>
|
12
|
+
|
13
|
+
</table>
|
14
|
+
|
15
|
+
<p>%returnlogdisplay%</p>
|
16
|
+
|
17
|
+
</tab>"
|
18
|
+
|
19
|
+
|
20
|
+
|
data/init.rb
CHANGED
@@ -21,44 +21,18 @@
|
|
21
21
|
#* at "smalllinux@gmail.com".
|
22
22
|
#***********************************************************************/
|
23
23
|
|
24
|
+
require 'logger'
|
25
|
+
|
26
|
+
$rwdtinkerlog = Logger.new( 'rwd_files/log/rwdtinker.log', 'weekly' )
|
27
|
+
$rwdtinkerlog.level = Logger::INFO
|
28
|
+
|
24
29
|
require "lib/rwd/rwd"
|
25
30
|
require 'fileutils'
|
26
31
|
require 'lib/rconftool'
|
27
32
|
|
28
33
|
$progdir = File::expand_path( File.dirname(__FILE__))
|
29
34
|
|
30
|
-
|
31
|
-
|
32
|
-
def findfiles(d)
|
33
|
-
a = Array.new(Dir[d].entries.sort)
|
34
|
-
#loop through and get the files names
|
35
|
-
a.each do |x|
|
36
|
-
#adjust the filters to the files you want to see...
|
37
|
-
if(!test(?d,x))
|
38
|
-
# only rwd files
|
39
|
-
if x =~ /rb|rwd|txt/
|
40
|
-
fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
|
41
|
-
$tempdoc+=fileA.read #reads the file into the doc string
|
42
|
-
fileA.close
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
def loadguifile(d)
|
48
|
-
a = Array.new(Dir[d].entries.sort)
|
49
|
-
#loop through and get the files names
|
50
|
-
a.each do |x|
|
51
|
-
#adjust the filters to the files you want to see...
|
52
|
-
if(!test(?d,x))
|
53
|
-
# only rwd files
|
54
|
-
if x =~ /rb|rwd|txt/
|
55
|
-
|
56
|
-
load x #opens the file thats in fileName and reads it
|
57
|
-
$tempdoc += $rwdguivar # adds the file into the doc string
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
35
|
+
tempdoc = " "
|
62
36
|
|
63
37
|
# integrate the new configuration files
|
64
38
|
MAINconfignew = "rwdconfig.cnf"
|
@@ -94,148 +68,70 @@ Rconftool::install(configdist,confignew) #integrates new file with old
|
|
94
68
|
|
95
69
|
Dir.chdir($progdir) # change back to top program directory
|
96
70
|
|
71
|
+
|
97
72
|
# build the English Language hash file from the parts
|
98
|
-
|
99
|
-
langmessage = {
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
#loop through the list, ignore the files and add all new directories found
|
104
|
-
alanghash.each do |x|
|
105
|
-
#if a directory...
|
106
|
-
if(test(?d,x))
|
107
|
-
# add to the original list of directories
|
108
|
-
@@tmproot = x + "/**"
|
109
|
-
#adds the new ones to the array
|
110
|
-
blanghash = Dir[@@tmproot].entries.sort
|
111
|
-
blanghash.each do |x|
|
112
|
-
if(test(?d,x))
|
113
|
-
alanghash.push(x) #appends to the end of the array...
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
alanghash.each do |x|
|
119
|
-
#if it is a file...
|
120
|
-
if(!test(?d,x))
|
121
|
-
alanghash.delete(x)
|
122
|
-
else #it is a directory...
|
123
|
-
findfiles(x + "/**")
|
124
|
-
end
|
73
|
+
Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
|
74
|
+
langmessage = { :clear => "Clear", :rwdtinker => "Rwdtinker" } ; langmessage.each { |kk, vv| Message[kk] = vv }
|
75
|
+
|
76
|
+
def msgid(programkey)
|
77
|
+
$programkey = programkey
|
125
78
|
end
|
126
|
-
|
79
|
+
|
80
|
+
def msgstr(programmsg)
|
81
|
+
if programmsg == ""
|
82
|
+
$rwdtinkerlog.info "msgstr: no translation for #{$programkey}"
|
83
|
+
else
|
84
|
+
Message.update( $programkey.to_sym => programmsg )
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
require 'lib/rwdtinker/rwdlangdir'
|
89
|
+
|
90
|
+
tempdoc = " "
|
91
|
+
#go get all the po language file files in english
|
92
|
+
tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,"en")
|
127
93
|
|
128
94
|
#writes the contents of doc into the languagehashvariable
|
129
|
-
languagehashvariable =
|
95
|
+
languagehashvariable = tempdoc
|
130
96
|
|
131
97
|
# END of en Lang building
|
132
|
-
|
98
|
+
tempdoc = " "
|
133
99
|
Dir.chdir($progdir) # change back to top program directory
|
134
100
|
|
135
101
|
# build the local Language hash file from the parts
|
136
|
-
|
137
|
-
#
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
# add to the original list of directories
|
144
|
-
@@tmproot = x + "/**"
|
145
|
-
#adds the new ones to the array
|
146
|
-
blanghash = Dir[@@tmproot].entries.sort
|
147
|
-
blanghash.each do |x|
|
148
|
-
if(test(?d,x))
|
149
|
-
alanghash.push(x) #appends to the end of the array...
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
154
|
-
alanghash.each do |x|
|
155
|
-
#if it is a file...
|
156
|
-
if(!test(?d,x))
|
157
|
-
alanghash.delete(x)
|
158
|
-
else #it is a directory...
|
159
|
-
findfiles(x + "/**")
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
|
164
|
-
#writes the contents of doc into the variable
|
165
|
-
languagehashvariable = languagehashvariable + " ; Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
|
166
|
-
|
167
|
-
|
168
|
-
$tempdoc = " "
|
169
|
-
|
170
|
-
Dir.chdir($progdir) # change back to top program directory
|
102
|
+
|
103
|
+
$lang = $langarray[0] # pick the language of choice
|
104
|
+
|
105
|
+
# Go get all the po files for the language of choice
|
106
|
+
tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,$lang)
|
107
|
+
# the contents of doc into the variable
|
108
|
+
languagehashvariable = languagehashvariable + tempdoc
|
171
109
|
|
172
|
-
|
110
|
+
Dir.chdir($progdir) # change back to top program directory
|
111
|
+
|
112
|
+
# lets read those po files, first english then the chosen language
|
113
|
+
temp = eval( languagehashvariable )
|
173
114
|
|
174
|
-
|
115
|
+
|
175
116
|
|
176
117
|
# build the actual program from the code parts
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
a.each do |x|
|
181
|
-
#if a directory...
|
182
|
-
if(test(?d,x))
|
183
|
-
# add to the original list of directories
|
184
|
-
@@root = x + "/**"
|
185
|
-
#adds the new ones to the array
|
186
|
-
b = Dir[@@root].entries.sort
|
187
|
-
b.each do |x|
|
188
|
-
if(test(?d,x))
|
189
|
-
a.push(x) #appends to the end of the array...
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
|
-
end
|
194
|
-
a.each do |x|
|
195
|
-
#if it is a file...
|
196
|
-
if(!test(?d,x))
|
197
|
-
a.delete(x)
|
198
|
-
else #it is a directory...
|
199
|
-
findfiles(x + "/**")
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
118
|
+
require 'lib/rwdtinker/rwdcodedir'
|
119
|
+
|
120
|
+
tempdoc = RwdtinkerTools.findprogramfiles(CodeDir)
|
203
121
|
|
204
122
|
# load the program file
|
205
|
-
|
123
|
+
|
124
|
+
tempcoderesult = eval( tempdoc )
|
206
125
|
|
207
126
|
# build the actual GUI from the gui parts
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
a.each do |x|
|
213
|
-
#if a directory...
|
214
|
-
if(test(?d,x))
|
215
|
-
#use this new dir find to add to the original list of directories
|
216
|
-
@@root = x + "/**"
|
217
|
-
#adds the new ones to the array
|
218
|
-
b = Dir[@@root].entries.sort
|
219
|
-
b.each do |x|
|
220
|
-
if(test(?d,x))
|
221
|
-
a.push(x) #appends to the end of the array...
|
222
|
-
end
|
223
|
-
end
|
224
|
-
end
|
225
|
-
end
|
226
|
-
a.each do |x|
|
227
|
-
#if it is a file...
|
228
|
-
if(!test(?d,x))
|
229
|
-
a.delete(x)
|
230
|
-
|
231
|
-
else #it is a directory...
|
232
|
-
loadguifile(x + "/**")
|
233
|
-
end
|
234
|
-
end
|
127
|
+
require 'lib/rwdtinker/rwdguidir'
|
128
|
+
|
129
|
+
tempdoc = RwdtinkerTools.findguifiles(GuiDir)
|
130
|
+
|
235
131
|
|
236
132
|
# gui variable is done
|
237
133
|
guiRWD = ""
|
238
|
-
$rwd_gui_tinker =
|
134
|
+
$rwd_gui_tinker = tempdoc
|
239
135
|
require 'socket' # Network stuff
|
240
136
|
host = "127.0.0.1"
|
241
137
|
port = $port
|
@@ -250,27 +146,27 @@ Rconftool::install(configdist,confignew) #integrates new file with old
|
|
250
146
|
$port = port
|
251
147
|
# Rescue the "Address in use" error
|
252
148
|
rescue Errno::EADDRINUSE
|
253
|
-
|
149
|
+
$rwdtinkerlog.warn "RWD Startup: Port #{port} on host #{host} is already in use."
|
254
150
|
port=port +1
|
255
|
-
|
151
|
+
$rwdtinkerlog.warn "trying port: #{port}"
|
256
152
|
# Rescue the "Address not available' error
|
257
153
|
rescue Errno::EADDRNOTAVAIL
|
258
|
-
|
154
|
+
$rwdtinkerlog.warn "RWD Startup: Address #{host} is not available to bind."
|
259
155
|
port =port + 1
|
260
|
-
|
156
|
+
$rwdtinkerlog.warn "trying port: #{port}"
|
261
157
|
# Rescue "permission denied errors
|
262
158
|
rescue Errno::EACCES
|
263
|
-
|
159
|
+
$rwdtinkerlog.warn "RWD Startup: Access denied when binding interface addresses. ?"
|
264
160
|
port =port + 1
|
265
|
-
|
161
|
+
$rwdtinkerlog.warn "trying port: #{port}"
|
266
162
|
# Rescue all other errors
|
267
163
|
rescue
|
268
|
-
|
164
|
+
$rwdtinkerlog.warn "RWD Startup: An error occured."
|
269
165
|
port =port + 1
|
270
|
-
|
166
|
+
$rwdtinkerlog.warn "trying port: #{port}"
|
271
167
|
# Rescue all other errors
|
272
168
|
end
|
273
|
-
|
169
|
+
$port = port
|
274
170
|
end
|
275
171
|
|
276
172
|
|