rubyslippers 0.99 → 1.00

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.
Files changed (63) hide show
  1. data/Readme.txt +9 -0
  2. data/code/01rwdcore/03helptexthash.rb +8 -28
  3. data/code/01rwdcore/openhelpwindow.rb +10 -29
  4. data/code/01rwdcore/returntomain.rb +10 -0
  5. data/code/superant.com.rubyslippers/listgemrecord.rb +4 -3
  6. data/code/superant.com.rubyslippers/listgemzips.rb +54 -0
  7. data/code/superant.com.rubyslippers/loadconfigurationrecord.rb +5 -1
  8. data/code/superant.com.rubyslippers/saveconfigurationrecord.rb +1 -1
  9. data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +26 -27
  10. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
  11. data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +6 -3
  12. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -0
  13. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -0
  14. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
  15. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +54 -0
  16. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +22 -7
  17. data/code/superant.com.rwdtinkerbackwindow/network.rb +1 -1
  18. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +42 -0
  19. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
  20. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +10 -6
  21. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +1 -1
  22. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +21 -0
  23. data/configuration/language.dist +7 -0
  24. data/configuration/{rubyslippers.cnf → rubyslippers.dist} +7 -1
  25. data/configuration/rwdapplicationidentity.dist +3 -0
  26. data/configuration/{rwdtinker.cnf → rwdtinker.dist} +7 -8
  27. data/configuration/tinkerwin2variables.dist +17 -0
  28. data/extras/rconftool.rb +380 -0
  29. data/extras/zip/zip.rb +1 -0
  30. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/92viewconfiguration.rwd +5 -0
  31. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +12 -12
  32. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
  33. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +1 -1
  34. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +1 -1
  35. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +1 -1
  36. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +1 -1
  37. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +0 -1
  38. data/init.rb +42 -37
  39. data/rwd_files/HowTo_RubySlippers.txt +6 -0
  40. data/rwd_files/HowTo_Tinker.txt +33 -6
  41. data/rwd_files/remotegemlist.txt +154 -34
  42. data/rwdconfig.dist +6 -0
  43. data/tests/checkdepends.sh +4 -0
  44. data/tests/cleancnf.sh +5 -0
  45. data/tests/makedist.rb +29 -0
  46. data/tests/rdep.rb +354 -0
  47. data/tests/rwdtinkertestEN.rb +163 -0
  48. data/tests/test.result +32 -0
  49. metadata +31 -23
  50. data/configuration/language.cnf +0 -5
  51. data/configuration/rubyslippersversion.cnf +0 -2
  52. data/configuration/rwdapplicationidentity.cnf +0 -3
  53. data/configuration/rwdtinkerversion.cnf +0 -2
  54. data/configuration/tinkerwin2variables.cnf +0 -8
  55. data/configuration/tinkerwin2version.cnf +0 -3
  56. data/lang/alanguagehashbegin.rb +0 -4
  57. data/lang/languagehash.rb +0 -4
  58. data/lang/templangfile.rb +0 -26
  59. data/lang/vlanguagehashend.rb +0 -6
  60. data/lang/wlocallangstart.rb +0 -5
  61. data/lang/xlocallangfile.rb +0 -26
  62. data/lang/zlocallangend.rb +0 -2
  63. data/zips/rwdcalc-0.4.zip +0 -0
data/Readme.txt CHANGED
@@ -157,6 +157,15 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
157
157
  Thanks, Steven Gibson
158
158
 
159
159
  =Changelog
160
+ version 1.00
161
+ correct view gemspec screen
162
+ added rconftool use to update configuration files
163
+ changed applets removal to not use external rm
164
+ removed version number from directory name
165
+
166
+ version 0.99
167
+ bug fix - "view gem" tab - name selection
168
+
160
169
  version 0.98
161
170
  updated for rwdtinker version 1.50
162
171
  changed width of text fields with help from RubyWebDialogs author
@@ -13,33 +13,7 @@ init.rb file to something like:\n
13
13
  RwdTinker.file(RWDFile).serve(8080, '-r' ? '.rwduids' : nil)\n
14
14
  Then you should be able to login at: http://yourhostname:8080",
15
15
 
16
- :applet_viewing => "You can get a list of all installed applets by clicking the 'listfiles button'
17
- To see the text of a install file
18
- Type in the name of the file you want.
19
-
20
- type it without the inf ending
21
- rwdapplet-0.1
22
-
23
- Then click the 'View Installed File' button
24
-
25
- If it finds the file it will open it. It displays the text the search box.
26
-
27
- You can uninstall applets on this screen",
28
-
29
- :applet_installation => " You can download an applet created by someone else\n
30
- put the file in the zips directory\n
31
-
32
- click on the 'list zips' tab\n
33
- click on 'list applets available for installing'\n
34
-
35
- chose the applet you want\n
36
- click on 'install applet'\n
37
- If all goes well the applet should be installed.\n
38
- You will need to restart rwdtinker to see the new screens",
39
- :applet_tinkerbackeditconfiguration => " You can edit the configuration
40
-
41
- Remember to reload the configuration variables if you want your
42
- changes used.",
16
+
43
17
  :documents_rwdtinker => "Documents:
44
18
 
45
19
 
@@ -47,5 +21,11 @@ Then you should be able to login at: http://yourhostname:8080",
47
21
  browser window, or in another browser tab.",
48
22
  :remote_control => "Remote control gives you a way to determine what applications are running on which ports
49
23
 
50
- The name of the application is set in the config file"
24
+ The name of the application is set in the config file
25
+ You need to click the show remote command choices first - this will show the port and query choices
26
+ Then you can click in 'Run Command' to see if other applications are running.
27
+
28
+ The remote ports daemon will not be running unless you start it.
29
+
30
+ "
51
31
 
@@ -1,41 +1,22 @@
1
1
  # this code is to call the help window
2
2
  def runhelpwindow
3
-
3
+ $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing","applet_tinkerbackeditconfiguration","remote_control"]
4
+
4
5
  if @rwd_window == "main"
5
6
  if @rwd_tab == "documentsrwdtinkerone"
6
7
  $help_topic = "documents_rwdtinker"
7
8
  end
8
- $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing"]
9
- $previouswindow = @rwd_window
10
- $previoustab = @rwd_tab
11
-
12
- end
13
-
14
- if @rwd_window == "tinkerbackwindow"
15
- if @rwd_tab == "filelister"
16
- $help_topic = "applet_viewing"
17
- $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing"]
18
- end
19
- if @rwd_tab == "zipslister"
20
- $help_topic = "applet_installation"
21
- $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing"]
22
- end
23
- if @rwd_tab == "editconfigurationfile"
24
- $help_topic = "applet_tinkerbackeditconfiguration"
25
- $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing"]
26
- end
27
- if @rwd_tab == "rwdremotecontrol"
28
- $help_topic = "remote_control"
29
- $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing", "remote_control"]
30
- end
31
-
32
- $previouswindow = @rwd_window
33
- $previoustab = @rwd_tab
34
- end
9
+
10
+ end
35
11
 
36
12
  if @rwd_window == "rwdtinkerhelpwindow"
37
- $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing"]
13
+ puts "in help window processing"
14
+ else
15
+ $previouswindow = @rwd_window
16
+ $previoustab = @rwd_tab
38
17
  end
18
+
19
+
39
20
  @rwdhelptopic = $help_topic
40
21
  @rwdhelpdataoutput = "#{Helptext[:"#{$help_topic}"]}"
41
22
  @rwdhelpsubchoicesoutput = $helptopicsarray.rwd_method("choosenewhelptopic")
@@ -0,0 +1,10 @@
1
+ # Application RwdAddresses 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 returntomain
7
+ @rwd_window = "main"
8
+ @rwd_tab = "selectiontab"
9
+ end
10
+
@@ -1,12 +1,13 @@
1
1
  # this code is to list the gemspecs
2
2
  def listgemrecordfiles
3
3
  fileList = Dir.new($gemspecificationsdirectory).entries.sort.delete_if { |x| ! (x =~ /gemspec$/) }
4
- # fileList = Dir.new($gemspecificationsdirectory).entries.sort
4
+
5
5
  @listgemrecordfilesresult = fileList.rwd_method("fillgemrecordname")
6
6
  end
7
7
 
8
8
  def fillgemrecordname(inffile)
9
- applet = inffile.gsub(/\.gemspec$/, "")
10
- @a_viewgemdata = applet
9
+ applet = inffile.gsub(/\.gemspec$/, "")
10
+ puts applet
11
+ @a_viewgemdata = applet.to_s
11
12
 
12
13
  end
@@ -0,0 +1,54 @@
1
+ # this code is to list the zips
2
+
3
+
4
+ def fillhypernotename(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
+ puts "#{x}" #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("fillhypernotename")
54
+ end
@@ -22,7 +22,11 @@
22
22
  @a_rsconfigline7 =fd.readline.chomp
23
23
  @a_rsconfigline8 = fd.readline.chomp
24
24
  @a_rsconfigline9 = fd.readline.chomp
25
-
25
+ @a_rsconfigline10 = fd.readline.chomp
26
+ @a_rsconfigline11 = fd.readline.chomp
27
+ @a_rsconfigline12 = fd.readline.chomp
28
+ @a_rsconfigline13 = fd.readline.chomp
29
+ @a_rsconfigline14 = fd.readline.chomp
26
30
  while ! fd.eof?
27
31
  @extrarsconfigdatadisplay = fd.readline
28
32
  end
@@ -3,7 +3,7 @@
3
3
  require 'fileutils'
4
4
 
5
5
  newname = "rubyslippers.cnf" # grab the filename to create
6
- newdata =@a_rsconfigline1.to_s + "\n" + @a_rsconfigline2.to_s + "\n" + @a_rsconfigline3.to_s + "\n" + @a_rsconfigline4.to_s + "\n" + @a_rsconfigline5.to_s + "\n" + @a_rsconfigline6.to_s + "\n" + @a_rsconfigline7.to_s + "\n" + @a_rsconfigline8.to_s + "\n" + @a_rsconfigline9.to_s + "\n"
6
+ newdata =@a_rsconfigline1.to_s + "\n" + @a_rsconfigline2.to_s + "\n" + @a_rsconfigline3.to_s + "\n" + @a_rsconfigline4.to_s + "\n" + @a_rsconfigline5.to_s + "\n" + @a_rsconfigline6.to_s + "\n" + @a_rsconfigline7.to_s + "\n" + @a_rsconfigline8.to_s + "\n" + @a_rsconfigline9.to_s + "\n"+ @a_rsconfigline10.to_s + "\n"+ @a_rsconfigline11.to_s + "\n"+ @a_rsconfigline12.to_s + "\n"+ @a_rsconfigline13.to_s + "\n"+ @a_rsconfigline14.to_s + "\n"
7
7
 
8
8
  begin # exception trapped block
9
9
  fileName = File.join( ConfigurationDir, newname )
@@ -1,28 +1,22 @@
1
- #
1
+ # Bind message passing socket to rwdtinker application
2
2
 
3
3
  def runcontrolcommand
4
4
  require 'socket'
5
5
 
6
6
  # Change this line...
7
- ip = '127.0.0.1'
7
+ ip = '127.0.0.1'
8
8
  # And this one...
9
- port = $rwdcontrolport1
10
- if @a_remoteportinput
11
- port = @a_remoteportinput.to_i
12
- end
13
- # Done!
9
+ port = $rwdcontrolport1
10
+ if @a_remoteportinput
11
+ port = @a_remoteportinput.to_i
12
+ end
14
13
 
15
-
16
14
  commandtext = @a_remotecommandinput.to_s
17
-
18
- remotehostnotfound = true
19
-
20
- client = UDPSocket::new()
21
- client.send(commandtext, 0, ip, port)
22
-
23
-
24
- if (commandtext == "stop")
25
- begin
15
+ remotehostnotfound = true
16
+ if (commandtext == "stop")
17
+ begin
18
+ client = UDPSocket::new()
19
+ client.send(commandtext, 0, ip, port)
26
20
  @socket = UDPSocket::new()
27
21
  @socket.bind(ip, port)
28
22
  # Rescue the "Address in use" error
@@ -51,17 +45,20 @@ begin
51
45
  @remotecommandresult = "Remote Host not running"
52
46
  end
53
47
  @socket.close
54
- end
48
+ # Close the socket after use
49
+ client.close()
50
+ end
55
51
 
56
- remotehostnotfound = true
57
- if (commandtext == "query")
58
- begin
52
+ remotehostnotfound = true
53
+ if (commandtext == "query")
54
+ begin
55
+ client = UDPSocket::new()
56
+ client.send(commandtext, 0, ip, port)
59
57
  @socket = UDPSocket::new()
60
58
  @socket.bind(ip, port)
61
59
  # Rescue the "Address in use" error
62
60
  rescue Errno::EADDRINUSE
63
61
 
64
-
65
62
  databack, info = client.recv(128)
66
63
  @remotecommandresult = databack
67
64
  @lastremotecommand = "rwdtinker remote: Port #{port} on host #{ip} "
@@ -82,18 +79,20 @@ begin
82
79
  # Rescue all other errors
83
80
  end
84
81
  @socket.close
85
- end
86
- if remotehostnotfound
87
- @remotecommandresult = "Remote Host not running"
88
- end
82
+
89
83
  # Close the socket after use
90
84
  client.close()
85
+ end
91
86
 
87
+ if remotehostnotfound
88
+ @remotecommandresult = "Remote Host not running"
89
+ end
92
90
  end
93
91
 
92
+ # list the remote control options on the screen
94
93
  def showremoteportoptions
95
94
 
96
- @remoteportoptions = ["#{$rwdcontrolport1}","#{$rwdcontrolport2}","#{$rwdcontrolport3}"].rwd_options
95
+ @remoteportoptions = $rwdcontrolports.rwd_options
97
96
  @remotecommandoptions = ["query","stop"].rwd_options
98
97
  end
99
98
 
@@ -0,0 +1,61 @@
1
+ # help text files used by context sensitive help
2
+
3
+ Helptext.update( :tinkerwin2_help => " You can view the list of applets you can install
4
+ by clicking on the list files button
5
+
6
+ You can download an applet created by someone else
7
+
8
+ put the file in the zips directory
9
+
10
+ rwdtinker applets packaged as RubyGems can be used if you have RubyGems installed.
11
+ You can download rwdtinker gems at the 'Install Remote Applets' tab
12
+ to install applets you need the ruby zlib library installed
13
+ ",
14
+ :applet_viewing => "You can get a list of all installed applets by clicking the 'listfiles button'
15
+ To see the text of a install file
16
+ Type in the name of the file you want.
17
+
18
+ type it without the inf ending
19
+ rwdapplet-0.1
20
+
21
+ Then click the 'View Installed File' button
22
+
23
+ If it finds the file it will open it. It displays the text the search box.
24
+
25
+ You can uninstall applets on this screen",
26
+
27
+ :applet_installation => " You can download an applet created by someone else\n
28
+ put the file in the zips directory\n
29
+
30
+ click on the 'list zips' tab\n
31
+ click on 'list applets available for installing'\n
32
+
33
+ chose the applet you want\n
34
+ click on 'install applet'\n
35
+ If all goes well the applet should be installed.\n
36
+ You will need to restart rwdtinker to see the new screens
37
+ to install applets you need the ruby zlib library installed",
38
+
39
+ :applet_tinkerbackeditconfiguration => " You can edit the configuration
40
+
41
+ Remember to reload the configuration variables if you want your
42
+ changes used.",
43
+ :remotegemapplet_install => " To download and install use the 'Install Remote Applets'
44
+
45
+ First click on 'List applets in the Remote GEM Repository available for downloading'
46
+ then go to the very bottom to click on the applet you want
47
+ then on the top click 'install remote Gem applet package'
48
+
49
+ This installs the package in the Gem system
50
+ You still need to install it into rwdtinker - do that in the 'List Zips' tab
51
+
52
+ For this feature to work, you need
53
+ RubyGems installed
54
+ Variables set correctly in the tinerwin2.cnf file
55
+ $xpcommand, $gemdirectory_withgemfiles and $geminstalled_directory
56
+ the defaults as shipped will normally be for a Debian Linux system
57
+ On Debian Linux, you would usually need to be running rwdtinker as root in order to install RubyGems
58
+
59
+ You can view the list of rwdtinker applets you have installed already by clicking 'view already installed GEM applets'
60
+ "
61
+ )
@@ -1,9 +1,12 @@
1
+ # code in install rwdtinker applets - now uses ruby.zip module
1
2
  def installapplet
2
- require 'fileutils'
3
- require 'extras/zip/zip'
3
+
4
4
  nametext = "%s" % [@a_installapplet]
5
-
5
+
6
6
  begin # exception trapped block
7
+
8
+
9
+ require 'extras/zip/zip'
7
10
  fullname = nametext + ".zip"
8
11
  fileName = File.join($zipslocation,fullname)
9
12
 
@@ -0,0 +1,20 @@
1
+ # install rwdtinker applet from a long directory location
2
+ def installgemapplet
3
+ require 'fileutils'
4
+ require 'extras/zip/zip'
5
+ nametext = "%s" % [@a_installapplet]
6
+
7
+ begin # exception trapped block
8
+ fullname = nametext + ".zip"
9
+
10
+ zf = Zip::ZipFile.new(fullname)
11
+ zf.sort.each {
12
+ |entry|
13
+ zf.extract(entry.to_s, entry.to_s)
14
+ }
15
+ @installapplettext = Message[:applet_installed]
16
+
17
+ rescue
18
+ @installapplettext = "unzip error - applet may not be installed correctly"
19
+ end # exception rescue
20
+ end
@@ -0,0 +1,19 @@
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
@@ -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,54 @@
1
+ # this code is to list the zips
2
+
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
+ puts "#{x}" #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
@@ -1,16 +1,31 @@
1
1
  # this code is to list the zipped applets that can be installed
2
- def listzipfilestoinstall
3
- if File.exist?($zipslocation)
4
- fileList = Dir.new($zipslocation).entries.sort.delete_if { |x| ! (x =~ /zip$/) }
5
- @zipslistresult = fileList.rwd_method("fillziptoinstallname")
6
- end
7
- end
2
+
8
3
 
9
4
  def fillziptoinstallname(inffile)
10
5
  applet = inffile.gsub(/\.zip$/, "")
11
6
  @a_installapplet = applet
12
7
 
13
8
  end
9
+
14
10
 
15
11
 
16
-
12
+
13
+ def listzipfilestoinstall
14
+ startlangdir = File.join($progdir, $zipslocation )
15
+ #get a list of the files and subdirectories on the starting directory only
16
+
17
+
18
+ a = Array.new(Dir["#{startlangdir}/*"].entries.sort)
19
+
20
+ #loop through and get the files names
21
+ a.each do |x|
22
+ # only zip files
23
+ if x =~ /\.zip/
24
+ # puts "#{x}" #adds the file to the array to display on the screen
25
+ $zipsarraylocal = $zipsarraylocal | ["#{x}"]
26
+ end
27
+
28
+ end
29
+
30
+ @zipslistresult = $zipsarraylocal.rwd_method("fillziptoinstallname")
31
+ end
@@ -17,7 +17,7 @@ end
17
17
  def network_demon
18
18
  # Find configuration variables
19
19
  host = "127.0.0.1"
20
- port = $rwdcontrolport1
20
+ port = $rwdcontrolports[0].to_i
21
21
 
22
22
  openportfound = false
23
23
  until openportfound
@@ -0,0 +1,42 @@
1
+ # this code is to call the help window
2
+ def runhelpwindowtinkerwin2
3
+
4
+ # $helptopicsarray = $helptopicsarray | [""]
5
+
6
+ $help_topic = "tinkerwin2_help"
7
+ if @rwd_tab == "rwdzipslister"
8
+ $help_topic = "tinkerwin2_help"
9
+ end
10
+
11
+ if @rwd_tab == "filelister"
12
+ $help_topic = "applet_viewing"
13
+
14
+ end
15
+ if @rwd_tab == "zipslister"
16
+ $help_topic = "applet_installation"
17
+
18
+ end
19
+ if @rwd_tab == "editconfigurationfile"
20
+ $help_topic = "applet_tinkerbackeditconfiguration"
21
+
22
+ end
23
+ if @rwd_tab == "rwdremotecontrol"
24
+ $help_topic = "remote_control"
25
+
26
+ end
27
+ if @rwd_tab == "superantcomremotezipsinstall"
28
+ $help_topic = "remotegemapplet_install"
29
+ end
30
+
31
+
32
+ if @rwd_window != "rwdtinkerhelpwindow"
33
+ $previouswindow = @rwd_window
34
+ $previoustab = @rwd_tab
35
+ else
36
+ $previouswindow = @rwd_window
37
+ $previoustab = @rwd_tab
38
+ end
39
+ runhelpwindow
40
+ end
41
+
42
+
@@ -0,0 +1,24 @@
1
+ # This tinker method is to retrieve the list of rwdzip applets available to install from the remote repository
2
+
3
+ def superantcomremotegemlist
4
+ gemcommandoption = "search --remote "
5
+ gemfilename = "rwdzip"
6
+ commandtext = "gem search --remote rwdzip"
7
+ commandtemp = $xpcommand + commandtext
8
+ begin # exception trapped block
9
+
10
+ tempremotegemappletsresult = `#{commandtemp} 2>&1`
11
+ @superantcomremotegemappletsfullresult = tempremotegemappletsresult
12
+ fileList = tempremotegemappletsresult.split(/\n/).delete_if { |x| ! (x =~ /\Arwdzip/) }
13
+
14
+ @superantcomremotegemappletsresult = fileList.rwd_method("superantcomremotegemappletdirsname")
15
+ rescue SystemCallError, StandardError
16
+ @superantcomremotegemappletsresult = "system call error: " + $!
17
+ end # exception rescue
18
+ end
19
+
20
+ def superantcomremotegemappletdirsname(inffile)
21
+ applet = inffile
22
+ @superantcominstallremoteappletinput = applet
23
+
24
+ end
@@ -10,19 +10,23 @@
10
10
 
11
11
  fd.each { |oneline|
12
12
  if count == 1
13
- commandline = "rm -r " + oneline
14
- system( commandline+' > temp.output' )
13
+ if File.exist?(oneline.chop)
14
+ FileUtils.rm_rf( oneline.chop)
15
+ end
16
+
15
17
  end
16
18
  count = 1
17
19
  }
18
20
  fd.close
19
- commandline = "rm " + fileName
21
+
22
+ FileUtils.rm_rf( fileName)
23
+
20
24
 
21
- system(commandline)
22
25
  @removeapplettext = "applet files removed! - restart rwd to finish uninstalling"
23
26
 
24
27
  rescue
25
- @removeapplettext = "\n" + "error"
26
- end # exception rescue
28
+ @removeapplettext = "\n" + "error"
29
+
30
+ end # exception rescue
27
31
 
28
32
  end
@@ -1,4 +1,4 @@
1
- # this method adds a new address record
1
+ # this method saves the configuration record
2
2
  def saveconfigurationrecord
3
3
  require 'fileutils'
4
4
  if @a_configurationfilename