tinkerbell 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/tinkerbell +19 -0
- data/code/01rwdcore/01rwdcore.rb +29 -0
- data/code/01rwdcore/02helptexthashbegin.rb +4 -0
- data/code/01rwdcore/03helptexthash.rb +23 -0
- data/code/01rwdcore/04helptextend.rb +6 -0
- data/code/01rwdcore/jumplinkcommand.rb +26 -0
- data/code/01rwdcore/openhelpwindow.rb +31 -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 +10 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +9 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
- data/code/01rwdcore/test_cases.rb +109 -0
- data/code/01rwdcore/test_harness.rb +13 -0
- data/code/01rwdcore/uploadreturns.rb +62 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +240 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +34 -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 +53 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +33 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +22 -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 +38 -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/viewappletcontents.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/superant.com.sandbox/tabone.rb +1 -0
- data/code/superant.com.sandbox/tabthree.rb +54 -0
- data/code/superant.com.sandbox/tabtwo.rb +1 -0
- data/code/superant.com.tinkerbell/0uninstallapplet.rb +9 -0
- data/code/superant.com.tinkerbell/clearguiscreen.rb +15 -0
- data/code/superant.com.tinkerbell/helptexthashrwdhypernote.rb +30 -0
- data/code/superant.com.tinkerbell/initiateapplets.rb +148 -0
- data/code/superant.com.tinkerbell/launchtinkerbellnew.rb +19 -0
- data/code/superant.com.tinkerbell/listcodefiles.rb +8 -0
- data/code/superant.com.tinkerbell/listoptions.rb +7 -0
- data/code/superant.com.tinkerbell/loadcode01.rb +19 -0
- data/code/superant.com.tinkerbell/loadconfigurationrecord.rb +22 -0
- data/code/superant.com.tinkerbell/loadconfigurationvariables.rb +15 -0
- data/code/superant.com.tinkerbell/loadtab01.rb +50 -0
- data/code/superant.com.tinkerbell/openhelpwindow.rb +30 -0
- data/code/superant.com.tinkerbell/runrwdapplet.rb +14 -0
- data/code/superant.com.tinkerbell/rwdtinkerversion.rb +10 -0
- data/code/superant.com.tinkerbell/savecoderecord.rb +18 -0
- data/code/superant.com.tinkerbell/saveconfigurationrecord.rb +20 -0
- data/code/superant.com.tinkerbell/saveguirecord.rb +22 -0
- data/code/superant.com.tinkerbellback/helptexthashshell.rb +18 -0
- data/code/superant.com.tinkerbellback/rubyeval.rb +23 -0
- data/code/zz0applicationend/zz0end.rb +4 -0
- data/configuration/language.dist +8 -0
- data/configuration/rwdapplicationidentity.dist +3 -0
- data/configuration/rwdtinker.dist +18 -0
- data/configuration/tinkerbellw-0.01.dist +8 -0
- data/configuration/tinkerwin2variables.dist +17 -0
- data/gui/00coreguibegin/applicationguitop.rwd +4 -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.sandbox/10appletbegin.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.sandbox/11tabone.rwd +12 -0
- data/gui/tinkerbackwindows/superant.com.sandbox/22tabtwo.rwd +12 -0
- data/gui/tinkerbackwindows/superant.com.sandbox/33tabthree.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.sandbox/98jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.sandbox/9end.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/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbell/10appletbegin.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbell/10guiedit.rwd +37 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbell/15codeedit.rwd +37 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbell/67viewconfiguration.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbell/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbell/9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/1rwdrubyeval.rwd +15 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/2rwdrubyeval.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/z9end.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/zzcoreguiend/yy9rwdend.rwd +4 -0
- data/init.rb +277 -0
- data/installed/temp.rb +1 -0
- data/installed/tinkerbellw-0.01.inf +13 -0
- data/lang/en/rwdcore/languagefile.rb +58 -0
- data/lang/es/rwdcore/languagefile-es.rb +62 -0
- data/lang/fr/rwdcore/languagefile.rb +64 -0
- data/lang/jp/rwdcore/languagefile.rb +72 -0
- data/lang/nl/rwdcore/languagefile.rb +75 -0
- data/lib/rconftool.rb +380 -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 +866 -0
- data/lib/rwd/ruby.rb +889 -0
- data/lib/rwd/rwd.rb +1405 -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/zip/ioextras.rb +114 -0
- data/lib/zip/stdrubyext.rb +111 -0
- data/lib/zip/tempfile_bugfixed.rb +195 -0
- data/lib/zip/zip.rb +1378 -0
- data/lib/zip/zipfilesystem.rb +558 -0
- data/lib/zip/ziprequire.rb +61 -0
- data/rwd_files/HowTo_Tinker.txt +475 -0
- data/rwd_files/HowTo_TinkerBell.txt +110 -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/favicon.ico +0 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +54 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +21 -0
- data/rwdtinker.rb +1 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +6 -0
- data/tests/makedist-tinkerbell.rb +56 -0
- data/tests/makedist.rb +69 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/tinkerbell-0.01.gem +0 -0
- data/zips/rwdwaddresses-1.05.zip +0 -0
- data/zips/rwdwgutenberg-0.09.zip +0 -0
- data/zips/temp.rb +1 -0
- data/zips/tinkerbellw-0.01.zip +0 -0
- data/zips/wrubyslippers-1.06.zip +0 -0
- metadata +231 -0
@@ -0,0 +1,148 @@
|
|
1
|
+
|
2
|
+
#***********************************************************************
|
3
|
+
#* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
|
4
|
+
#* Copyright (c) 2004 - 2005 by Steven Gibson. All Rights Reserved.
|
5
|
+
#*
|
6
|
+
#* This library is free software; you can redistribute it and/or
|
7
|
+
#* modify it under the terms of the GNU General Public
|
8
|
+
#* License as published by the Free Software Foundation; either
|
9
|
+
#* .
|
10
|
+
#*
|
11
|
+
#* These files are distributed in the hope that they will be useful,
|
12
|
+
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
#* General Public License for more details.
|
15
|
+
#*
|
16
|
+
#* You should have received a copy of the GNU General Public
|
17
|
+
#* License along with these files; if not, write to the Free Software
|
18
|
+
#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
+
#*
|
20
|
+
#* For further information please contact the author by e-mail
|
21
|
+
#* at "smalllinux@gmail.com".
|
22
|
+
#***********************************************************************/
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
# integrate the new configuration files
|
27
|
+
def initiateapplettinkerbell()
|
28
|
+
|
29
|
+
debuginitiate = 0
|
30
|
+
$stderr.puts "starting initiate"
|
31
|
+
|
32
|
+
if $DEBUG
|
33
|
+
$stderr.puts "starting load with: Sandbox"
|
34
|
+
end
|
35
|
+
|
36
|
+
Dir.chdir($progdir ) #changes the current working directory
|
37
|
+
|
38
|
+
$tempdoc = " "
|
39
|
+
|
40
|
+
Dir.chdir($progdir) # change back to top program directory
|
41
|
+
|
42
|
+
$tempdoc = " "
|
43
|
+
Dir.chdir($progdir) # change back to top program directory
|
44
|
+
|
45
|
+
tempguistorage = $rwd_gui_tinker # if gui load fails restore old
|
46
|
+
begin # error trap
|
47
|
+
|
48
|
+
# build the actual GUI from the gui parts
|
49
|
+
$tempdoc = " "
|
50
|
+
#get a list of the files and subdirectories on the starting directory only
|
51
|
+
a = Array.new(Dir[GuiDir].entries.sort)
|
52
|
+
#loop through the list, ignore the files and add all new directories found
|
53
|
+
a.each do |x|
|
54
|
+
#if a directory...
|
55
|
+
if(test(?d,x))
|
56
|
+
#use this new dir find to add to the original list of directories
|
57
|
+
@@root = x + "/**"
|
58
|
+
#adds the new ones to the array
|
59
|
+
b = Dir[@@root].entries.sort
|
60
|
+
b.each do |x|
|
61
|
+
if(test(?d,x))
|
62
|
+
a.push(x) #appends to the end of the array...
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
a.each do |x|
|
68
|
+
#if it is a file...
|
69
|
+
if(!test(?d,x))
|
70
|
+
a.delete(x)
|
71
|
+
|
72
|
+
else #it is a directory...
|
73
|
+
loadguifile(x + "/**")
|
74
|
+
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
$rwd_gui_tinker = $tempdoc
|
80
|
+
|
81
|
+
|
82
|
+
rescue
|
83
|
+
$rwd_gui_tinker = tempguistorage # restore old gui
|
84
|
+
if $DEBUG
|
85
|
+
$stderr.puts "error in initiateapplets - gui building"
|
86
|
+
end
|
87
|
+
|
88
|
+
debuginitiate += 1
|
89
|
+
end
|
90
|
+
|
91
|
+
if $DEBUG
|
92
|
+
$stderr.puts "just did gui load"
|
93
|
+
end
|
94
|
+
# build the actual program from the code parts
|
95
|
+
#get a list of the files and subdirectories on the starting directory only
|
96
|
+
begin # error trap
|
97
|
+
# now load in the code files
|
98
|
+
|
99
|
+
$tempdoc = ""
|
100
|
+
tempcodeinstallline = ""
|
101
|
+
tmpfilename = File.join($progdir,"code")
|
102
|
+
dirName = File.join(tmpfilename,"superant.com.sandbox")
|
103
|
+
|
104
|
+
a = Dir.entries(dirName)
|
105
|
+
#loop through the list,
|
106
|
+
if $DEBUG
|
107
|
+
$stderr.puts a.length
|
108
|
+
end
|
109
|
+
a.each do |x|
|
110
|
+
if x =~ /rb/
|
111
|
+
# only rb files
|
112
|
+
fileName = File.join(dirName, x)
|
113
|
+
fileA=File.open(fileName,"r") #opens the file thats in fileName as read only
|
114
|
+
$tempdoc+=fileA.read
|
115
|
+
if $DEBUG
|
116
|
+
$stderr.puts fileName.to_s
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
end
|
121
|
+
tempcoderesult = eval( $tempdoc )
|
122
|
+
|
123
|
+
|
124
|
+
rescue
|
125
|
+
if $DEBUG
|
126
|
+
$stderr.puts "error in initiateapplets - code building"
|
127
|
+
end
|
128
|
+
debuginitiate += 1
|
129
|
+
|
130
|
+
|
131
|
+
end
|
132
|
+
|
133
|
+
# resultend = tempcodeinstallline .index("\n",resultstart)
|
134
|
+
tempresult = dirName
|
135
|
+
|
136
|
+
return " sandbox loading successful " + tempresult
|
137
|
+
|
138
|
+
if debuginitiate > 0
|
139
|
+
return " initiateapplet .."
|
140
|
+
else
|
141
|
+
return " initiateapplet success"
|
142
|
+
end
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Application rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
#
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def launchtinkerbellnew
|
7
|
+
|
8
|
+
returninitateresults = initiateapplettinkerbell()
|
9
|
+
|
10
|
+
$stderr.puts returninitateresults
|
11
|
+
|
12
|
+
|
13
|
+
RWDWindow.new($rwd_gui_tinker, @rwd_window).render("DEFAULT")
|
14
|
+
|
15
|
+
@rwd_window = "tinkerbellsandbox"
|
16
|
+
@rwd_tab = "sandboxtabone"
|
17
|
+
|
18
|
+
end
|
19
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# this code is to list the fold files that are available
|
2
|
+
def loadtinkerbellcodetablist
|
3
|
+
codedir = File.join($progdir, "code")
|
4
|
+
sandboxcode_directory = File.join(codedir,"superant.com.sandbox")
|
5
|
+
fileList = Dir.new(sandboxcode_directory).entries.sort.delete_if { |x| ! (x =~ /rb$/) }
|
6
|
+
@tinkerbellcodetabs = fileList.rwd_options
|
7
|
+
end
|
8
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# this code is to load the tabs that are available
|
2
|
+
def loadcodetabdesign
|
3
|
+
sandboxdir1 = File.join($progdir, "code")
|
4
|
+
sandboxdir = File.join(sandboxdir1 , "superant.com.sandbox")
|
5
|
+
fileName = File.join(sandboxdir, @a_tinkerbellcodeselect)
|
6
|
+
|
7
|
+
begin # exception trapped block
|
8
|
+
|
9
|
+
fd = File.open(fileName,"r")
|
10
|
+
|
11
|
+
@tinkerbellcodedesign = fd.read
|
12
|
+
|
13
|
+
fd.close
|
14
|
+
rescue SystemCallError, StandardError
|
15
|
+
$stderr.print "system call error: " + $!
|
16
|
+
end # exception rescue
|
17
|
+
|
18
|
+
end
|
19
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# this method puts the configuration rexord on the screen
|
2
|
+
def loadtinkerbellconfiguration
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
@a_tinkerbellconfigurationfilename = "tinkerbellw-" + TinkerBellVersion + ".cnf"
|
7
|
+
|
8
|
+
|
9
|
+
begin # exception trapped block
|
10
|
+
|
11
|
+
Dir.chdir($progdir)
|
12
|
+
fileName = File.join(ConfigurationDir, @a_tinkerbellconfigurationfilename )
|
13
|
+
|
14
|
+
|
15
|
+
fd = File.open(fileName,"r")
|
16
|
+
@a_tinkerbellconfigurationfile= fd.read
|
17
|
+
fd.close
|
18
|
+
rescue SystemCallError, StandardError
|
19
|
+
$stderr.print "system call error: " + $!
|
20
|
+
end # exception rescue
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# this method loads the on screen variables into the running class
|
2
|
+
def loadtinkerbellconfigurationvariables
|
3
|
+
|
4
|
+
tmpfilename = "tinkerbellw-" + TinkerBellVersion + ".cnf"
|
5
|
+
configfiletoload = File.join(ConfigurationDir, tmpfilename )
|
6
|
+
begin
|
7
|
+
load configfiletoload
|
8
|
+
|
9
|
+
|
10
|
+
rescue
|
11
|
+
if $DEBUG
|
12
|
+
$stderr.puts "loading error"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# this code is to load the tabs that are available
|
2
|
+
def loadguitabdesign
|
3
|
+
sandboxdir1 = File.join("gui", "tinkerbackwindows")
|
4
|
+
sandboxdir = File.join(sandboxdir1 , "superant.com.sandbox")
|
5
|
+
case @a_tinkerbellguiselect
|
6
|
+
when "1sttab"
|
7
|
+
begin # exception trapped block
|
8
|
+
|
9
|
+
fileName = File.join(sandboxdir, "11tabone.rwd")
|
10
|
+
|
11
|
+
fd = File.open(fileName,"r")
|
12
|
+
|
13
|
+
@tinkerbellguidesign = fd.read
|
14
|
+
|
15
|
+
fd.close
|
16
|
+
rescue SystemCallError, StandardError
|
17
|
+
$stderr.print "system call error: " + $!
|
18
|
+
end # exception rescue
|
19
|
+
when "2ndtab"
|
20
|
+
begin # exception trapped block
|
21
|
+
|
22
|
+
fileName = File.join(sandboxdir, "22tabtwo.rwd")
|
23
|
+
|
24
|
+
fd = File.open(fileName,"r")
|
25
|
+
|
26
|
+
@tinkerbellguidesign = fd.read
|
27
|
+
|
28
|
+
fd.close
|
29
|
+
rescue SystemCallError, StandardError
|
30
|
+
$stderr.print "system call error: " + $!
|
31
|
+
end # exception rescue
|
32
|
+
when "3rdtab"
|
33
|
+
begin # exception trapped block
|
34
|
+
|
35
|
+
fileName = File.join(sandboxdir, "33tabthree.rwd")
|
36
|
+
|
37
|
+
fd = File.open(fileName,"r")
|
38
|
+
|
39
|
+
@tinkerbellguidesign = fd.read
|
40
|
+
|
41
|
+
fd.close
|
42
|
+
rescue SystemCallError, StandardError
|
43
|
+
$stderr.print "system call error: " + $!
|
44
|
+
end # exception rescue
|
45
|
+
|
46
|
+
else
|
47
|
+
$stderr.puts "not a valid tab"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# this code is to call the help window
|
2
|
+
def runhelpwindowtinkerbell
|
3
|
+
|
4
|
+
$help_topic = "tinkerbell_generalhelp"
|
5
|
+
|
6
|
+
if @rwd_tab == "tinkerbellgui"
|
7
|
+
$help_topic = "tinkerbellgui_help"
|
8
|
+
end
|
9
|
+
|
10
|
+
if @rwd_tab == "rwdshellruby"
|
11
|
+
$help_topic = "tinkerbellruby_help"
|
12
|
+
end
|
13
|
+
|
14
|
+
if @rwd_tab == "rwdlinesruby"
|
15
|
+
$help_topic = "tinkerbellruby_help"
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
$helptopicsarray = $helptopicsarray | ["tinkerbell_generalhelp"]
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
if @rwd_window != "rwdtinkerhelpwindow"
|
24
|
+
$previouswindow = @rwd_window
|
25
|
+
$previoustab = @rwd_tab
|
26
|
+
end
|
27
|
+
runhelpwindow
|
28
|
+
end
|
29
|
+
|
30
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Application rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
#
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def runtinkerbellwindow
|
7
|
+
@rwd_window = "tinkerbellwindow"
|
8
|
+
@rwd_tab = "tinkerbellgui"
|
9
|
+
end
|
10
|
+
|
11
|
+
def tinkerbellbackwindow
|
12
|
+
@rwd_window = "tinkerbellbackwindow"
|
13
|
+
@rwd_tab = "rwdshellruby"
|
14
|
+
end
|
@@ -0,0 +1,10 @@
|
|
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
|
+
# return the version constant defined in the config file
|
6
|
+
def tinkerbellhelpaboutsetup
|
7
|
+
return ["TinkerBell","(c) 2005-2008 Steven Gibson ","Version #{TinkerBellVersion}"]
|
8
|
+
end
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# this method saves record
|
2
|
+
def savetinkerbellcoderecord
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
sandboxdir1 = File.join($progdir, "code")
|
6
|
+
sandboxdir = File.join(sandboxdir1 , "superant.com.sandbox")
|
7
|
+
fileName = File.join(sandboxdir, @a_tinkerbellcodeselect)
|
8
|
+
begin
|
9
|
+
|
10
|
+
fd = File.open(fileName,"w")
|
11
|
+
fd.print(@tinkerbellcodedesign) # save the record info to the file
|
12
|
+
fd.close
|
13
|
+
|
14
|
+
rescue SystemCallError, StandardError
|
15
|
+
$stderr.print "system call error: " + $!
|
16
|
+
end # exception rescue
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# this method saves configuration record
|
2
|
+
def savetinkerbellconfiguration
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
|
6
|
+
newname = "tinkerbellw-" + TinkerBellVersion + ".cnf" # grab the filename to create
|
7
|
+
newdata = @a_tinkerbellconfigurationfile
|
8
|
+
|
9
|
+
|
10
|
+
begin # exception trapped block
|
11
|
+
fileName = File.join( ConfigurationDir, newname )
|
12
|
+
fd = File.open(fileName,"w")
|
13
|
+
fd.print(newdata) # save the record info to the file
|
14
|
+
fd.close
|
15
|
+
|
16
|
+
rescue SystemCallError, StandardError
|
17
|
+
$stderr.print "system call error: " + $!
|
18
|
+
end # exception rescue
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# this method saves configuration record
|
2
|
+
def savetinkerbellguirecord
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
sandboxdir1 = File.join("gui", "tinkerbackwindows")
|
6
|
+
sandboxdir = File.join(sandboxdir1 , "superant.com.sandbox")
|
7
|
+
case @a_tinkerbellguiselect
|
8
|
+
when "1sttab"
|
9
|
+
|
10
|
+
begin # exception trapped block
|
11
|
+
fileName = File.join( sandboxdir, "11tabone.rwd")
|
12
|
+
fd = File.open(fileName,"w")
|
13
|
+
fd.print(@tinkerbellguidesign) # save the record info to the file
|
14
|
+
fd.close
|
15
|
+
|
16
|
+
rescue SystemCallError, StandardError
|
17
|
+
$stderr.print "system call error: " + $!
|
18
|
+
end # exception rescue
|
19
|
+
else
|
20
|
+
$stderr.puts "not a valid tab"
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
Helptext.update( :tinkerbellruby_help => ' You can enter ruby commands here
|
4
|
+
|
5
|
+
<p>
|
6
|
+
you can put in something like "Hello!"
|
7
|
+
<p>
|
8
|
+
"Howdy Steven".upcase
|
9
|
+
<p>
|
10
|
+
carray = ["one "] ; carray << " two" ; carray.each{|x| x.upcase}
|
11
|
+
<p>
|
12
|
+
10.between?(7,12)
|
13
|
+
<p>
|
14
|
+
["tivo","nokia", "ipaq"].length
|
15
|
+
<p>
|
16
|
+
xhash = { "altima" => "nissan", "camry" => "toyota", "rx7" => "mazda" } ; xhash.keys
|
17
|
+
'
|
18
|
+
)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#
|
2
|
+
|
3
|
+
def rubyevaltinkerbell
|
4
|
+
|
5
|
+
require 'English'
|
6
|
+
|
7
|
+
commandtextruby = "%s " % [@a_rubyevaltinkerbell]
|
8
|
+
|
9
|
+
|
10
|
+
begin # begin rescue monitored block
|
11
|
+
if commandtextruby.include? '�'
|
12
|
+
@rubydisplaytinkerbell = "\n" + "problem in eval"
|
13
|
+
else
|
14
|
+
@rubydisplaytinkerbell = eval( commandtextruby ).to_s
|
15
|
+
end
|
16
|
+
|
17
|
+
rescue # process exeption
|
18
|
+
|
19
|
+
@rubydisplaytinkerbell = "\n" + "error in eval"
|
20
|
+
|
21
|
+
end # end of rescue process # of rescure monitored block
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
##VERSION:1.77
|
2
|
+
ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
|
3
|
+
CodeName = "rwdtinker"
|
4
|
+
CodeNameFile = CodeName + ".rb"
|
5
|
+
RWDFile = "rwdtinker.rwd"
|
6
|
+
LangDir = "lang"
|
7
|
+
CodeDir = "code"
|
8
|
+
GuiDir = "gui"
|
9
|
+
$help_topic = "general_help"
|
10
|
+
$helptopicsarray = [ "general_help","network_help"]
|
11
|
+
$prevouswindow ="main"
|
12
|
+
$rwdcontrolports =["13713","13714","13715","13716","13717","13718"] # remote control code not actived 2007
|
13
|
+
$port = 7705
|
14
|
+
$rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain","opendocuments","editconfiguration"]
|
15
|
+
Browser_Exe = 'mozilla '
|
16
|
+
$tinkerdocumentsarray +=["HowTo_Tinker.txt","rwdapplications.html","RubyWebDialogs.html"]
|
17
|
+
RwdTinkerVersion = "1.77"
|
18
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
##VERSION:0.01
|
2
|
+
$tinkerhelpaboutarray += ["TinkerBell"]
|
3
|
+
$tinkerdocumentsarray += ["HowTo_TinkerBell.txt"]
|
4
|
+
JumpLink.update(:TinkerBell=>"runtinkerbellwindow", :TinkerBellBackWindow=> "tinkerbellbackwindow")
|
5
|
+
$rwdjumplink +=["TinkerBell","TinkerBellBackWindow"]
|
6
|
+
##NAME:TinkerBellVersion:0
|
7
|
+
TinkerBellVersion = "0.01"
|
8
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
##VERSION:1.69
|
2
|
+
TinkerWin2ConfigurationFileName = "tinkerwin2variables.cnf" # this file name - do not change
|
3
|
+
##NAME:$zipslocation:0
|
4
|
+
$zipslocation = "zips" # location of applets to add
|
5
|
+
$zipsarray = [""] ; $zipsarraylocal = [""]
|
6
|
+
##NAME:$xpcommand:0
|
7
|
+
$xpcommand = " " # Linux machines
|
8
|
+
# $xpcommand = "cmd /C " # XP machines with cmd shell
|
9
|
+
##NAME:$gemdirectory_withgemfiles:0
|
10
|
+
$gemdirectory_withgemfiles = "/var/lib/gems/1.8/gems"
|
11
|
+
# $gemdirectory_withgemfiles = "c:\\ruby\\lib\\ruby\\gems\\1.8\\gems" # XP machine
|
12
|
+
##NAME:$geminstalled_directory:0
|
13
|
+
# $geminstalled_directory = "/ruby/lib/ruby/gems/1.8/gems" # XP machine
|
14
|
+
$geminstalled_directory = "/var/lib/gems/1.8/gems" # Debian Linux
|
15
|
+
|
16
|
+
RwdTinkerWin2Version = "0.8"
|
17
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
|
3
|
+
"
|
4
|
+
<tab name=\"viewtinkerlogo\" caption=\"Tinker\">
|
5
|
+
|
6
|
+
<table>
|
7
|
+
<row> <p align=\"right\">#{Message[:tinker_logo]}</row>
|
8
|
+
|
9
|
+
</table>
|
10
|
+
<image src=\"tinker.png\"> </image>
|
11
|
+
<table>
|
12
|
+
<row> <p></row>
|
13
|
+
|
14
|
+
</table>
|
15
|
+
<horizontal>
|
16
|
+
|
17
|
+
<button caption=#{Message[:help]} action=\"runhelpwindow\"/>
|
18
|
+
|
19
|
+
|
20
|
+
</horizontal>
|
21
|
+
|
22
|
+
</tab>"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<horizontal>
|
4
|
+
<button caption=#{Message[:showjump_links]} action=\"showjumplinkoptions\"/>
|
5
|
+
<button caption=#{Message[:help]} action=\"runhelpwindowtinkerwin2\"/>
|
6
|
+
</horizontal>
|
7
|
+
<table>
|
8
|
+
<select name=\"a_jumplinkinput\"> %%jumplinkoptions%% </select>
|
9
|
+
|
10
|
+
</table>
|
11
|
+
|
12
|
+
<horizontal>
|
13
|
+
<button caption=#{Message[:jumptoapplication_location]} action=\"runjumplinkcommand\"/>
|
14
|
+
</horizontal>
|
15
|
+
"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<horizontal>
|
4
|
+
<button caption=#{Message[:showdocument_list]} action=\"setuptinkerdocuments\"/>
|
5
|
+
|
6
|
+
</horizontal>
|
7
|
+
<table>
|
8
|
+
<select name=\"a_tinkerdocumentinput\"> %%tinkerdocumentsarray%% </select>
|
9
|
+
|
10
|
+
</table>
|
11
|
+
<horizontal>
|
12
|
+
<button caption=#{Message[:open_document]} action=\"runopentinkerdocument\"/>
|
13
|
+
</horizontal>
|
14
|
+
"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<horizontal>
|
4
|
+
<button caption=#{Message[:showhelpabout_links]} action=\"setuphelpaboutoptions\"/>
|
5
|
+
|
6
|
+
</horizontal>
|
7
|
+
<table>
|
8
|
+
<select name=\"a_helpaboutinput\"> %%helpaboutoptions%% </select>
|
9
|
+
|
10
|
+
</table>
|
11
|
+
|
12
|
+
<horizontal>
|
13
|
+
<button caption=#{Message[:openselectedhelp_about]} action=\"runrwdtinkerversion\"/>
|
14
|
+
</horizontal>
|
15
|
+
"
|