rwddemo 0.91 → 0.92
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +32 -305
- data/code/01rwdcore/01rwdcore.rb +15 -13
- data/code/01rwdcore/jumplinkcommand.rb +30 -0
- data/code/01rwdcore/openhelpwindow.rb +26 -26
- data/code/01rwdcore/returntomain.rb +8 -8
- data/code/01rwdcore/rwdtinkerversion.rb +12 -13
- data/code/01rwdcore/rwdwindowreturn.rb +3 -5
- data/code/01rwdcore/test_cases.rb +115 -0
- data/code/01rwdcore/test_harness.rb +12 -0
- data/code/01rwdcore/uploadreturns.rb +62 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +3 -4
- data/code/superant.com.rwdcalc/jumplinkupdate.rb +11 -0
- data/code/superant.com.rwdcalendar/helptexthashrwdschedule.rb +14 -0
- data/code/superant.com.rwdcalendar/openhelpwindowrwdschedule.rb +17 -0
- data/code/superant.com.rwdshell/helptexthashshell.rb +8 -1
- data/code/superant.com.rwdshell/openhelpwindowshell.rb +6 -0
- data/code/superant.com.rwdshell/runrwdshellwindow.rb +4 -1
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +89 -92
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +16 -18
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -19
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +7 -7
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +48 -49
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +8 -7
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +22 -26
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -31
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -13
- data/code/superant.com.rwdtinkerbackwindow/network.rb +82 -82
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +18 -17
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +37 -37
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +20 -20
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +33 -32
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +8 -9
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +10 -11
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -18
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -20
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +23 -20
- data/configuration/language.dist +1 -1
- data/configuration/rwddemo.dist +3 -0
- data/configuration/rwdtinker.dist +3 -3
- data/configuration/tinkerwin2variables.dist +1 -1
- data/gui/frontwindow0/superant.com.rwdcalendar/hl9calendar.rwd +1 -1
- data/gui/frontwindow0/superant.com.shellscripts/3editscripts.rwd +1 -0
- data/gui/frontwindow0/viewlogo/cc0openphoto.rwd +22 -0
- data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +2 -7
- data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselections/viewselectionzend/viewselectionend.rwd +3 -0
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.rwdcalc/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/46editscriptrecord.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/94rwddiagnostics.rwd +0 -17
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/98jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +12 -16
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/init.rb +231 -228
- data/rwd_files/HowTo_Tinker.txt +20 -0
- data/rwdconfig.dist +6 -2
- data/tests/makedist.rb +36 -7
- metadata +54 -69
- data/code/superant.com.rwdshell/runrwdshellmenu1.rb +0 -57
- data/configuration/language.cnf +0 -7
- data/configuration/rwdapplicationidentity.cnf +0 -3
- data/configuration/rwdcalc.cnf +0 -7
- data/configuration/rwdcalendar.cnf +0 -10
- data/configuration/rwdshell.cnf +0 -3
- data/configuration/rwdtinker.cnf +0 -15
- data/configuration/tinkerwin2variables.cnf +0 -17
- data/extras/cmdline_parse +0 -47
- data/extras/config_file +0 -69
- data/extras/errorMsg +0 -19
- data/extras/makePlaylist +0 -34
- data/extras/mp3controld +0 -289
- data/extras/playlist +0 -186
- data/extras/showHelp +0 -18
- data/gui/frontwindowselections/superant.com.rwdcalcselectiontab/rwdcalc.rwd +0 -12
- data/gui/frontwindowselections/superant.com.rwdshellselectiontab/rwdshellbackwindowselectiontab.rwd +0 -12
- data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +0 -12
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/1appname.rwd +0 -4
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/3copyright.rwd +0 -3
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/5version.rwd +0 -10
- data/gui/tinkerbackwindows/superant.com.rwdcalc/98returntab.rwd +0 -11
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/v9returntab.rwd +0 -11
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +0 -11
- data/rwdconfig.cnf +0 -6
@@ -1,87 +1,87 @@
|
|
1
|
-
|
1
|
+
#network
|
2
2
|
require 'socket' # Network stuff
|
3
3
|
require 'timeout' # Timeout functions
|
4
4
|
|
5
5
|
def network_start
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
openportfound = false
|
23
|
-
until openportfound
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
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
87
|
|
@@ -1,18 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
def openappletname
|
2
|
+
require 'fileutils'
|
3
|
+
nametext = "%s" % [@a_installlist]
|
4
|
+
|
5
|
+
begin # exception trapped block
|
6
|
+
fileName = "installed/" + nametext + ".inf"
|
7
|
+
|
8
|
+
fd = File.open(fileName,"r")
|
9
|
+
@displaytext = " "
|
10
|
+
while ! fd.eof?
|
11
|
+
@displaytext = fd.read
|
12
|
+
end
|
13
|
+
fd.close
|
14
|
+
rescue
|
15
|
+
@displaytext = "\n" + "error"
|
16
|
+
end # exception rescue
|
17
|
+
|
18
|
+
end
|
17
19
|
|
18
|
-
end
|
@@ -1,42 +1,42 @@
|
|
1
1
|
# this code is to call the help window
|
2
2
|
def runhelpwindowtinkerwin2
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
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
40
|
end
|
41
41
|
|
42
42
|
|
@@ -1,24 +1,24 @@
|
|
1
1
|
# This tinker method is to retrieve the list of rwdzip applets available to install from the remote repository
|
2
|
-
|
3
2
|
def superantcomremotegemlist
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
3
|
+
gemcommandoption = "search --remote "
|
4
|
+
gemfilename = "rwdzip"
|
5
|
+
commandtext = "gem search --remote rwdzip"
|
6
|
+
commandtemp = $xpcommand + commandtext
|
7
|
+
begin # exception trapped block
|
8
|
+
|
9
|
+
tempremotegemappletsresult = `#{commandtemp} 2>&1`
|
10
|
+
@superantcomremotegemappletsfullresult = tempremotegemappletsresult
|
11
|
+
fileList = tempremotegemappletsresult.split(/\n/).delete_if { |x| ! (x =~ /\Arwdzip/) }
|
12
|
+
|
13
|
+
@superantcomremotegemappletsresult = fileList.rwd_method("superantcomremotegemappletdirsname")
|
14
|
+
rescue SystemCallError, StandardError
|
15
|
+
@superantcomremotegemappletsresult = "system call error: " + $!
|
16
|
+
end # exception rescue
|
18
17
|
end
|
19
|
-
|
18
|
+
|
20
19
|
def superantcomremotegemappletdirsname(inffile)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
20
|
+
applet = inffile
|
21
|
+
@superantcominstallremoteappletinput = applet
|
22
|
+
|
23
|
+
end
|
24
|
+
|
@@ -1,32 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
1
|
+
# method to remove a tinker applet
|
2
|
+
def removeapplet
|
3
|
+
require 'fileutils'
|
4
|
+
nametext = "%s" % [@a_removeapplet]
|
5
|
+
|
6
|
+
begin # exception trapped block
|
7
|
+
fileName = "installed/" + nametext + ".inf"
|
8
|
+
count = 0
|
9
|
+
fd = File.open(fileName,"r")
|
10
|
+
|
11
|
+
|
12
|
+
fd.each { |oneline|
|
13
|
+
if count == 1
|
14
|
+
if File.exist?(oneline.chop)
|
15
|
+
FileUtils.rm_rf( oneline.chop)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
count = 1
|
20
|
+
}
|
21
|
+
fd.close
|
22
|
+
|
23
|
+
FileUtils.rm_rf( fileName)
|
24
|
+
|
25
|
+
|
26
|
+
@removeapplettext = "applet files removed! - restart rwd to finish uninstalling"
|
27
|
+
|
28
|
+
rescue
|
29
|
+
@removeapplettext = "\n" + "error"
|
30
|
+
|
31
|
+
end # exception rescue
|
32
|
+
|
33
|
+
end
|
@@ -1,12 +1,11 @@
|
|
1
1
|
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
2
|
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
-
# http://www.
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the rwdtinker helpwindow
|
6
|
+
|
7
|
+
def runrwdtinkerbackwindow
|
8
|
+
@rwd_window = "tinkerbackwindow"
|
9
|
+
@rwd_tab = "rwdzipslister"
|
10
|
+
end
|
7
11
|
|
8
|
-
def runrwdtinkerbackwindow
|
9
|
-
@rwd_window = "tinkerbackwindow"
|
10
|
-
@rwd_tab = "rwdzipslister"
|
11
|
-
end
|
12
|
-
|
@@ -1,14 +1,13 @@
|
|
1
1
|
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
2
|
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
-
# http://www.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# return the version constant defined in the config file
|
6
|
+
def runrwdtinkerwin2version
|
7
|
+
@rwd_window = "applicationversion"
|
8
|
+
@versionappnamedisplay = "RwdTinkerWin2"
|
9
|
+
@versioncopyrightdisplay = "(c) 2004 Steven Gibson "
|
10
|
+
@versionnumberdisplay = "Version " + RwdTinkerWin2Version
|
11
|
+
|
12
|
+
end
|
12
13
|
|
13
|
-
end
|
14
|
-
|
@@ -1,18 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
# this method saves the configuration record
|
2
|
+
def saveconfigurationrecord
|
3
|
+
require 'fileutils'
|
4
|
+
if @a_configurationfilename
|
5
|
+
newname = "%s" % [@a_configurationfilename] # grab the filename to create
|
6
|
+
newdata =@a_configline1.to_s + "\n" + @a_configline2.to_s + "\n" + @a_configline3.to_s + "\n" + @a_configline4.to_s + "\n" + @a_configline5.to_s + "\n" + @a_configline6.to_s + "\n" + @a_configline7.to_s + "\n" + @a_configline8.to_s + "\n"
|
7
|
+
|
8
|
+
begin # exception trapped block
|
9
|
+
fileName = File.join( ConfigurationDir, newname )
|
10
|
+
fd = File.open(fileName,"w")
|
11
|
+
fd.print(newdata) # save the record info to the file
|
12
|
+
fd.close
|
13
|
+
@newconfigurationresult=newdata # show the record info in the browser
|
14
|
+
rescue SystemCallError, StandardError
|
15
|
+
$stderr.print "system call error: " + $!
|
16
|
+
end # exception rescue
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|