rwdlanguage 0.01
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +475 -0
- data/bin/rwdlanguage +19 -0
- data/code/01rwdcore/01rwdcore.rb +29 -0
- data/code/01rwdcore/02helptexthashbegin.rb +16 -0
- data/code/01rwdcore/03helptexthash.rb +21 -0
- data/code/01rwdcore/jumplinkcommand.rb +36 -0
- data/code/01rwdcore/openhelpwindow.rb +38 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rundocuments.rb +10 -0
- data/code/01rwdcore/runeditconfiguration.rb +10 -0
- data/code/01rwdcore/runhelpabout.rb +15 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/runtab.rb +15 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +11 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +15 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +7 -0
- data/code/01rwdcore/test_cases.rb +158 -0
- data/code/01rwdcore/test_harness.rb +20 -0
- data/code/01rwdcore/uploadreturns.rb +65 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +5 -0
- data/code/superant.com.language/0uninstallapplet.rb +22 -0
- data/code/superant.com.language/googlelang.rb +25 -0
- data/code/superant.com.language/helptexthashload.rb +22 -0
- data/code/superant.com.language/loadconfigurationrecord.rb +22 -0
- data/code/superant.com.language/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.language/openhelpwindow.rb +24 -0
- data/code/superant.com.language/rubySteak.rb +40 -0
- data/code/superant.com.language/runappletwindow.rb +12 -0
- data/code/superant.com.language/runrwdshellwindow.rb +12 -0
- data/code/superant.com.language/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.language/rwdtinkerversion.rb +10 -0
- data/code/superant.com.language/saveconfigurationrecord.rb +20 -0
- data/code/superant.com.language/test_cases.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/changelocale.rb +84 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +169 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +38 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +55 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +37 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +40 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb +9 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +23 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +16 -0
- data/code/superant.com.thesaurus/clearhttpview3.rb +9 -0
- data/code/superant.com.thesaurus/listwordlookup.rb +37 -0
- data/code/superant.com.thesaurus/runappletwindow.rb +12 -0
- data/code/superant.com.words/dictlookup.rb +20 -0
- data/code/superant.com.words/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.words/rwdtinkerversion.rb +10 -0
- data/code/zz0applicationend/zz0end.rb +5 -0
- data/configuration/rwdtinker.dist +15 -0
- data/configuration/rwdwlanguage.dist +21 -0
- data/configuration/tinkerwin2variables.dist +23 -0
- data/gui/00coreguibegin/applicationguitop.rwd +9 -0
- data/gui/frontwindow0/cc0openphoto.rwd +22 -0
- data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
- data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselections/wwselectionend.rwd +3 -0
- data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
- data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
- data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
- data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
- data/gui/helpaboutzend/helpscreenend.rwd +3 -0
- data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.language/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.language/22google.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.language/44germany.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.language/67viewconfiguration.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.language/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.language/z9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.words/1dictionary.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.words/4thesaurus.rwd +36 -0
- data/gui/tinkerbackwindows/superant.com.words/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/z9end.rwd +6 -0
- data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
- data/init.rb +179 -0
- data/installed/rwdwlanguage.inf +24 -0
- data/installed/temp.rb +1 -0
- data/lang/en/rwdcore/en.po +197 -0
- data/lang/en/rwdlanguage/en.po +32 -0
- data/lang/es/rwdcore/es.po +184 -0
- data/lang/es/rwdlanguage/en.po +32 -0
- data/lang/fr/rwdcore/fr.po +169 -0
- data/lang/fr/rwdlanguage/en.po +32 -0
- data/lang/hi/rwdcore/hi.po +173 -0
- data/lang/hi/rwdlanguage/en.po +32 -0
- data/lang/ja/rwdcore/ja.po +171 -0
- data/lang/ja/rwdlanguage/en.po +32 -0
- data/lang/nl/rwdcore/nl.po +169 -0
- data/lang/nl/rwdlanguage/en.po +32 -0
- data/lib/dict.rb +438 -0
- data/lib/g_translate.rb +43 -0
- data/lib/g_translate/client.rb +84 -0
- data/lib/g_translate/translator.rb +57 -0
- data/lib/ger-eng.txt +111283 -0
- data/lib/oothesaurus.rb +76 -0
- data/lib/rconftool.rb +387 -0
- data/lib/rwd/browser.rb +123 -0
- data/lib/rwd/ftools.rb +174 -0
- data/lib/rwd/mime.rb +328 -0
- data/lib/rwd/net.rb +877 -0
- data/lib/rwd/ruby.rb +889 -0
- data/lib/rwd/rwd.rb +1425 -0
- data/lib/rwd/sgml.rb +236 -0
- data/lib/rwd/thread.rb +63 -0
- data/lib/rwd/tree.rb +371 -0
- data/lib/rwd/xml.rb +101 -0
- 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/lib/zip/ioextras.rb +155 -0
- data/lib/zip/stdrubyext.rb +111 -0
- data/lib/zip/tempfile_bugfixed.rb +195 -0
- data/lib/zip/zip.rb +1847 -0
- data/lib/zip/zipfilesystem.rb +609 -0
- data/lib/zip/ziprequire.rb +90 -0
- data/rwd_files/HowTo_Language.txt +179 -0
- data/rwd_files/HowTo_Tinker.txt +515 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/Readme.txt +57 -0
- data/rwd_files/RubyWebDialogs.html +6 -0
- data/rwd_files/Tinkerhelptexthash.txt +84 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/log/rwdtinker.log +726 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +76 -0
- data/rwd_files/rwdlanguagehelpfiles.txt +34 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +24 -0
- data/rwdlanguage.rb +1 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +6 -0
- data/tests/makedist-rwdwlanguage.rb +56 -0
- data/tests/makedist.rb +66 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdwcalc-0.63.zip +0 -0
- data/zips/rwdwfoldeditor-0.08.zip +0 -0
- data/zips/rwdwhypernote-0.16.zip +0 -0
- data/zips/rwdwlanguage-0.01.zip +0 -0
- data/zips/rwdwmovies-0.98.zip +0 -0
- data/zips/rwdwruby-1.08.zip +0 -0
- data/zips/temp.rb +1 -0
- data/zips/tinkerbellw-0.04.zip +0 -0
- data/zips/wrubyslippers-1.08.zip +0 -0
- metadata +246 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
require 'resolv'
|
6
|
+
require 'date'
|
7
|
+
|
8
|
+
# return the platform information
|
9
|
+
def runviewplatform
|
10
|
+
@platformdisplay = "Platform is " + RUBY_PLATFORM + "\n"
|
11
|
+
@platformdisplay = @platformdisplay + "Ruby Version " + VERSION + "\n"
|
12
|
+
@platformdisplay = @platformdisplay + "rwdtinker version " + RwdTinkerVersion + "\n"
|
13
|
+
@platformdisplay = @platformdisplay + "program directory " + $progdir + "\n"
|
14
|
+
@platformdisplay = @platformdisplay + "hostname " + Resolv.getname(Resolv.getaddress("localhost")) + "\n"
|
15
|
+
@platformdisplay = @platformdisplay + "application name " + $rwdapplicationidentity + "\n"
|
16
|
+
@platformdisplay = @platformdisplay + "Date " + Date.today().to_s
|
17
|
+
|
18
|
+
end
|
19
|
+
|
@@ -0,0 +1,169 @@
|
|
1
|
+
#***********************************************************************
|
2
|
+
#* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
|
3
|
+
#* Copyright (c) 2004 - 2005 by Steven Gibson. All Rights Reserved.
|
4
|
+
#*
|
5
|
+
#* This library is free software; you can redistribute it and/or
|
6
|
+
#* modify it under the terms of the GNU General Public
|
7
|
+
#* License as published by the Free Software Foundation; either
|
8
|
+
#* .
|
9
|
+
#*
|
10
|
+
#* These files are distributed in the hope that they will be useful,
|
11
|
+
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
#* General Public License for more details.
|
14
|
+
#*
|
15
|
+
#* You should have received a copy of the GNU General Public
|
16
|
+
#* License along with these files; if not, write to the Free Software
|
17
|
+
#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
#*
|
19
|
+
#* For further information please contact the author by e-mail
|
20
|
+
#* at "smalllinux@gmail.com".
|
21
|
+
#***********************************************************************/
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
# integrate the new configuration files
|
26
|
+
def initiateapplet(nametextlocal)
|
27
|
+
|
28
|
+
debuginitiate = 0
|
29
|
+
|
30
|
+
$rwdtinkerlog.info "initiateapplet: starting config load with: #{nametextlocal}"
|
31
|
+
|
32
|
+
Dir.chdir($progdir ) #changes the current working directory
|
33
|
+
|
34
|
+
@confignew = "configuration/" + "#{nametextlocal}.cnf"
|
35
|
+
@configdist = "configuration/" + "#{nametextlocal}.dist"
|
36
|
+
Rconftool::install(@configdist,@confignew)
|
37
|
+
|
38
|
+
begin
|
39
|
+
|
40
|
+
configfileload = File.open(@configdist){|f| f.read}
|
41
|
+
|
42
|
+
eval configfileload #load config file
|
43
|
+
|
44
|
+
rescue
|
45
|
+
|
46
|
+
$rwdtinkerlog.error "initiateapplet: error in initiateapplets - config load"
|
47
|
+
|
48
|
+
debuginitiate += 1
|
49
|
+
end
|
50
|
+
$tempdoc = " "
|
51
|
+
|
52
|
+
Dir.chdir($progdir) # change back to top program directory
|
53
|
+
|
54
|
+
# build the English Language hash file from the parts
|
55
|
+
require 'lib/rwdtinker/rwdlangdir'
|
56
|
+
|
57
|
+
tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,"en")
|
58
|
+
|
59
|
+
#writes the contents of doc into the languagehashvariable
|
60
|
+
|
61
|
+
languagehashvariable = tempdoc
|
62
|
+
|
63
|
+
# END of en Lang building
|
64
|
+
$tempdoc = " "
|
65
|
+
Dir.chdir($progdir) # change back to top program directory
|
66
|
+
|
67
|
+
# build the local Language hash file from the parts
|
68
|
+
tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,$lang)
|
69
|
+
|
70
|
+
#writes the contents of doc into the variable
|
71
|
+
|
72
|
+
languagehashvariable = languagehashvariable + tempdoc
|
73
|
+
|
74
|
+
Dir.chdir($progdir) # change back to top program directory
|
75
|
+
|
76
|
+
temp = eval( languagehashvariable )
|
77
|
+
|
78
|
+
|
79
|
+
tempguistorage = $rwd_gui_tinker # if gui load fails restore old
|
80
|
+
begin # error trap
|
81
|
+
|
82
|
+
# build the actual GUI from the gui parts
|
83
|
+
tempdoc = " "
|
84
|
+
|
85
|
+
require 'lib/rwdtinker/rwdguidir'
|
86
|
+
|
87
|
+
tempdoc = RwdtinkerTools.findguifiles(GuiDir)
|
88
|
+
|
89
|
+
$rwd_gui_tinker = tempdoc
|
90
|
+
|
91
|
+
rescue
|
92
|
+
$rwd_gui_tinker = tempguistorage # restore old gui
|
93
|
+
|
94
|
+
$rwdtinkerlog.error "error in initiateapplets - gui building"
|
95
|
+
|
96
|
+
debuginitiate += 1
|
97
|
+
end
|
98
|
+
|
99
|
+
begin # error trap
|
100
|
+
# now load in the code files
|
101
|
+
|
102
|
+
$tempdoc = ""
|
103
|
+
tempcodeinstallline = ""
|
104
|
+
|
105
|
+
@fileName = "installed/" + nametextlocal + ".inf"
|
106
|
+
|
107
|
+
$rwdtinkerlog.debug "initateapplets: loading file: #{@fileName}"
|
108
|
+
|
109
|
+
tmpfilearray = File.readlines(@fileName)
|
110
|
+
|
111
|
+
tmpfilearray.each do |line|
|
112
|
+
|
113
|
+
tempcodeinstallline = line.chomp
|
114
|
+
if tempcodeinstallline.include?('code/')
|
115
|
+
findfiles(tempcodeinstallline + "/**")
|
116
|
+
tempcoderesult = eval( $tempdoc ) # read the program code and evaluate
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
rescue
|
122
|
+
|
123
|
+
$rwdtinkerlog.error "error in initiateapplets - code building"
|
124
|
+
|
125
|
+
debuginitiate += 1
|
126
|
+
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
setuphelpaboutoptions # update the help about list
|
131
|
+
setuptinkerdocuments # update the document pull down list
|
132
|
+
runhelpwindow # update the help menu
|
133
|
+
showjumplinkoptions # update the application link menu
|
134
|
+
runrwdtinkerbackwindow # back to applet window
|
135
|
+
|
136
|
+
# resultend = tempcodeinstallline .index("\n",resultstart)
|
137
|
+
tempresult = @fileName
|
138
|
+
|
139
|
+
return " applet loading successful " + tempresult
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
if debuginitiate > 0
|
144
|
+
return " initiateapplet .."
|
145
|
+
else
|
146
|
+
return " initiateapplet success"
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
|
152
|
+
def findfiles(d)
|
153
|
+
a = Array.new(Dir[d].entries.sort)
|
154
|
+
#loop through and get the files names
|
155
|
+
a.each do |x|
|
156
|
+
#adjust the filters to the files you want to see...
|
157
|
+
if(!test(?d,x))
|
158
|
+
# only rwd files
|
159
|
+
if x =~ /rb|rwd|txt/
|
160
|
+
fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
|
161
|
+
$tempdoc+=fileA.read #reads the file into the doc string
|
162
|
+
fileA.close
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
|
169
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# install rwdtinker applet from a long directory location
|
3
|
+
|
4
|
+
def installgemapplet
|
5
|
+
require 'fileutils'
|
6
|
+
require 'lib/zip/zip'
|
7
|
+
nametext = "%s" % [@a_installapplet]
|
8
|
+
|
9
|
+
begin # exception trapped block
|
10
|
+
fullname = nametext + ".zip"
|
11
|
+
|
12
|
+
zf = Zip::ZipFile.new(fullname)
|
13
|
+
zf.sort.each {
|
14
|
+
|entry|
|
15
|
+
zf.extract(entry.to_s, entry.to_s)
|
16
|
+
}
|
17
|
+
|
18
|
+
rescue
|
19
|
+
|
20
|
+
$rwdtinkerlog.error "installgemapplet: unzip error - applet may not be installed correctly"
|
21
|
+
|
22
|
+
@installapplettext = " .. "
|
23
|
+
|
24
|
+
end # exception rescue
|
25
|
+
|
26
|
+
@rwd_ignore_vars << @nametextbase << @returninitiateresults << @installapplettext
|
27
|
+
tmpnametext = File.basename(nametext)
|
28
|
+
tmpnametext.chop!; tmpnametext.chop!; tmpnametext.chop!; tmpnametext.chop!
|
29
|
+
@nametextbase = tmpnametext.chop!
|
30
|
+
@returninitateresults = initiateapplet(@nametextbase)
|
31
|
+
@installapplettext = Message[:applet_installed] + " " + @returninitateresults
|
32
|
+
|
33
|
+
|
34
|
+
RWDWindow.new($rwd_gui_tinker, @rwd_window).render("DEFAULT")
|
35
|
+
|
36
|
+
|
37
|
+
end
|
38
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# download gem of rwdtinker applet
|
2
|
+
def superantcominstallremotegemapplet
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
tempnametext = "%s" % [@superantcominstallremoteappletinput]
|
6
|
+
temparray = tempnametext.split(/ /)
|
7
|
+
nametext = temparray[0]
|
8
|
+
begin # exception trapped block
|
9
|
+
|
10
|
+
|
11
|
+
commandline = $xpcommand + "gem install " + nametext
|
12
|
+
|
13
|
+
@superantcominstallremotegemappletresult = `#{commandline}`
|
14
|
+
|
15
|
+
rescue
|
16
|
+
@superantcominstallremotegemappletresult = "error during gem install!"
|
17
|
+
end # exception rescue
|
18
|
+
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# this code is to list the gem directories that are installed
|
2
|
+
def superantcomshowgemfiledirs
|
3
|
+
|
4
|
+
fileList = Dir.new($gemdirectory_withgemfiles).entries.sort.delete_if { |x| ! (x =~ /\Arwdzip/) }
|
5
|
+
@superantcomshowgemappletdirsresult = fileList.rwd_method("superantcomshowgemappletdirsname")
|
6
|
+
end
|
7
|
+
|
8
|
+
def superantcomshowgemappletdirsname(inffile)
|
9
|
+
applet = inffile
|
10
|
+
@a_gemfiledirsinput = applet
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# this code is to list the zips
|
3
|
+
|
4
|
+
def fillzipappletname(inffile)
|
5
|
+
applet = inffile.gsub(/\.zip$/, "")
|
6
|
+
@a_installapplet = applet
|
7
|
+
|
8
|
+
end
|
9
|
+
|
10
|
+
def findzipfiles(d)
|
11
|
+
a = Array.new(Dir[d].entries.sort)
|
12
|
+
#loop through and get the files names
|
13
|
+
a.each do |x|
|
14
|
+
#adjust the filters to the files you want to see...
|
15
|
+
if(!test(?d,x))
|
16
|
+
# only zip files
|
17
|
+
if x =~ /\.zip/
|
18
|
+
#opens the file thats in fileName as read only
|
19
|
+
$zipsarray = $zipsarray | ["#{x}"]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def listgemzips
|
26
|
+
startlangdir = $geminstalled_directory
|
27
|
+
#get a list of the files and subdirectories on the starting directory only
|
28
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
29
|
+
p alanghash
|
30
|
+
#loop through the list, ignore the files and add all new directories found
|
31
|
+
alanghash.each do |x|
|
32
|
+
#if a directory...
|
33
|
+
if(test(?d,x))
|
34
|
+
# add to the original list of directories
|
35
|
+
@@tmproot = x + "/**"
|
36
|
+
#adds the new ones to the array
|
37
|
+
blanghash = Dir[@@tmproot].entries.sort
|
38
|
+
blanghash.each do |x|
|
39
|
+
if(test(?d,x))
|
40
|
+
alanghash.push(x) #appends to the end of the array...
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
alanghash.each do |x|
|
46
|
+
#if it is a file...
|
47
|
+
if(!test(?d,x))
|
48
|
+
alanghash.delete(x)
|
49
|
+
else #it is a directory...
|
50
|
+
findzipfiles(x + "/**")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
@zipslistresult = $zipsarray.rwd_method("fillzipappletname")
|
54
|
+
end
|
55
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# this code is to list the applets that are installed
|
3
|
+
|
4
|
+
def listinstalledfiles
|
5
|
+
fileList = Dir.new("installed").entries.sort.reverse.delete_if { |x| ! (x =~ /inf$/) }
|
6
|
+
@filesresult = fileList.rwd_method("fillappletname")
|
7
|
+
end
|
8
|
+
|
9
|
+
def fillappletname(inffile)
|
10
|
+
applet = inffile.gsub(/\.inf$/, "")
|
11
|
+
@a_installlist = applet
|
12
|
+
@a_removeapplet = applet
|
13
|
+
end
|
14
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# this code is to list the zipped applets that can be installed
|
3
|
+
|
4
|
+
def fillziptoinstallname(inffile)
|
5
|
+
applet = inffile.gsub(/\.zip$/, "")
|
6
|
+
@a_installapplet = applet
|
7
|
+
|
8
|
+
end
|
9
|
+
|
10
|
+
def listzipfilestoinstall
|
11
|
+
|
12
|
+
$zipsarraylocal = []
|
13
|
+
|
14
|
+
if $zipslocation.slice(0,1) == "/" || $zipslocation.include?(":")
|
15
|
+
startlangdir = $zipslocation
|
16
|
+
else
|
17
|
+
startlangdir = File.join($progdir, $zipslocation )
|
18
|
+
end
|
19
|
+
|
20
|
+
#get a list of the files and subdirectories on the starting directory only
|
21
|
+
|
22
|
+
|
23
|
+
a = Array.new(Dir["#{startlangdir}/*"].entries.sort)
|
24
|
+
|
25
|
+
#loop through and get the files names
|
26
|
+
a.each do |x|
|
27
|
+
# only zip files
|
28
|
+
if x =~ /\.zip/
|
29
|
+
#adds the file to the array to display on the screen
|
30
|
+
$zipsarraylocal = $zipsarraylocal | ["#{x}"]
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
@zipslistresult = $zipsarraylocal.rwd_method("fillziptoinstallname")
|
36
|
+
end
|
37
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# this method puts the configuration rexord on the screen
|
3
|
+
|
4
|
+
def loadconfigurationrecord
|
5
|
+
|
6
|
+
require 'fileutils'
|
7
|
+
if TinkerWin2ConfigurationFileName
|
8
|
+
@a_configurationfilename = TinkerWin2ConfigurationFileName
|
9
|
+
end
|
10
|
+
|
11
|
+
begin # exception trapped block
|
12
|
+
|
13
|
+
Dir.chdir($progdir)
|
14
|
+
fileName = File.join(ConfigurationDir, TinkerWin2ConfigurationFileName)
|
15
|
+
|
16
|
+
fd = File.open(fileName,"r")
|
17
|
+
@a_configurationfile = fd.read
|
18
|
+
fd.close
|
19
|
+
rescue SystemCallError, StandardError
|
20
|
+
$stderr.print "system call error: " + $!
|
21
|
+
end # exception rescue
|
22
|
+
|
23
|
+
end
|
24
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# this method loads the on screen variables into the running class
|
2
|
+
def loadconfigurationvariables
|
3
|
+
|
4
|
+
configfiletoload = File.join(ConfigurationDir,TinkerWin2ConfigurationFileName)
|
5
|
+
begin
|
6
|
+
load configfiletoload
|
7
|
+
@extraconfigdatadisplay = ""
|
8
|
+
@newconfigurationresult = "Config Variables loaded"
|
9
|
+
rescue
|
10
|
+
@extraconfigdatadisplay = ""
|
11
|
+
@newconfigurationresult = "loading error"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
@@ -0,0 +1,87 @@
|
|
1
|
+
#network
|
2
|
+
require 'socket' # Network stuff
|
3
|
+
require 'timeout' # Timeout functions
|
4
|
+
|
5
|
+
def network_start
|
6
|
+
if RUBY_PLATFORM != "i386-mswin32"
|
7
|
+
processone = fork {
|
8
|
+
network_demon }
|
9
|
+
Process.detach(processone)
|
10
|
+
|
11
|
+
else
|
12
|
+
puts "fork not tried winXP?"
|
13
|
+
end
|
14
|
+
@viewremotecommandresult = "starting controller on next available port"
|
15
|
+
end
|
16
|
+
|
17
|
+
def network_demon
|
18
|
+
# Find configuration variables
|
19
|
+
host = "127.0.0.1"
|
20
|
+
port = $rwdcontrolports[0].to_i
|
21
|
+
|
22
|
+
openportfound = false
|
23
|
+
until openportfound
|
24
|
+
|
25
|
+
# Create a socket to listen on and bind it to the host and port
|
26
|
+
begin
|
27
|
+
@socket = UDPSocket::new()
|
28
|
+
@socket.bind(host, port)
|
29
|
+
# Rescue the "Address in use" error
|
30
|
+
openportfound = true
|
31
|
+
|
32
|
+
rescue Errno::EADDRINUSE
|
33
|
+
puts "controller startup: Port #{port} on host #{host} is already in use."
|
34
|
+
port=port+1
|
35
|
+
# Rescue the "Address not available' error
|
36
|
+
rescue Errno::EADDRNOTAVAIL
|
37
|
+
puts "Network plugin: Address #{host} is not available to bind."
|
38
|
+
port=port+1
|
39
|
+
# Rescue "permission denied errors
|
40
|
+
rescue Errno::EACCES
|
41
|
+
puts "controller startup: Access denied when binding interface addresses. Did you try to bind a port under 1024 as a regular user?"
|
42
|
+
port=port+1
|
43
|
+
# Rescue all other errors
|
44
|
+
rescue
|
45
|
+
puts "Network plugin: An error occured."
|
46
|
+
port = port+1
|
47
|
+
# Rescue all other errors
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
# Get all acceptable hosts
|
54
|
+
hosts = ["localhost","vaio-sag"]
|
55
|
+
# Do some nice errorchecking
|
56
|
+
if(hosts.type != Array)
|
57
|
+
puts "Network plugin: No hosts found in networkConfig/acceptHosts. Shutting down plugin."
|
58
|
+
return -1 # Return the errorcode for plugin failure
|
59
|
+
end
|
60
|
+
|
61
|
+
# Main loop
|
62
|
+
while(true)
|
63
|
+
# Get data and client data from the client
|
64
|
+
data, info = @socket.recvfrom(256)
|
65
|
+
|
66
|
+
# Is this an acceptable IP address?
|
67
|
+
if(hosts.include?(info[2]) || hosts.include?(info[3]))
|
68
|
+
command, parameter = data.split(';')
|
69
|
+
|
70
|
+
# Command actions
|
71
|
+
command.downcase!()
|
72
|
+
case command
|
73
|
+
|
74
|
+
when 'stop'
|
75
|
+
@socket.send("hello world",0,info[3],info[1].to_i)
|
76
|
+
|
77
|
+
when 'query'
|
78
|
+
@socket.send("#{$rwdapplicationidentity} on port #{$port}",0,info[3],info[1].to_i)
|
79
|
+
|
80
|
+
|
81
|
+
end # case command
|
82
|
+
|
83
|
+
end # Access control if
|
84
|
+
end # while(true)
|
85
|
+
|
86
|
+
end # Network::start()
|
87
|
+
|