rwdhypernote 0.03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Notes/changes.lnk +1 -0
- data/Notes/changes.txt +1 -0
- data/Notes/hypernote/hypernote01.txt +1 -0
- data/Notes/hypernote/hypernote02.txt +1 -0
- data/Notes/hypernote/newnote3.txt +2 -0
- data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.lnk +1 -0
- data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.txt +11 -0
- data/Notes/rwdtinker/newnote.txt +1 -0
- data/Notes/rwdtinker/rwdtinker01.txt +9 -0
- data/Notes/rwdtinker/testnote2.txt +1 -0
- data/Readme.txt +97 -0
- data/bin/rwdhypernote +19 -0
- data/code/01rwdcore/01rwdcore.rb +20 -0
- data/code/01rwdcore/02helptexthashbegin.rb +4 -0
- data/code/01rwdcore/03helptexthash.rb +31 -0
- data/code/01rwdcore/04helptextend.rb +6 -0
- data/code/01rwdcore/openhelpwindow.rb +31 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rwdtinkerversion.rb +15 -0
- data/code/01rwdcore/rwdwindowreturn.rb +11 -0
- data/code/superant.com.hypernote/archiveevent.rb +14 -0
- data/code/superant.com.hypernote/changehypernotename.rb +21 -0
- data/code/superant.com.hypernote/clearhypernotescreendisplay.rb +8 -0
- data/code/superant.com.hypernote/clearlinkscreendisplay.rb +8 -0
- data/code/superant.com.hypernote/copyfilename.rb +10 -0
- data/code/superant.com.hypernote/createnewnote.rb +14 -0
- data/code/superant.com.hypernote/deletehypernoterecord.rb +20 -0
- data/code/superant.com.hypernote/helptexthashrwdhypernote.rb +60 -0
- data/code/superant.com.hypernote/hyperlinkcreatelinkfile.rb +19 -0
- data/code/superant.com.hypernote/listhypernotelinks.rb +52 -0
- data/code/superant.com.hypernote/listhypernotes.rb +55 -0
- data/code/superant.com.hypernote/listlinknotes.rb +33 -0
- data/code/superant.com.hypernote/loadconfigurationrecord.rb +34 -0
- data/code/superant.com.hypernote/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.hypernote/loadlinksrecord.rb +21 -0
- data/code/superant.com.hypernote/loadnoterecord.rb +24 -0
- data/code/superant.com.hypernote/openhelpwindowrwdhyernote.rb +23 -0
- data/code/superant.com.hypernote/returntomain.rb +10 -0
- data/code/superant.com.hypernote/rwdhypernotehelpabout.rb +14 -0
- data/code/superant.com.hypernote/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.hypernote/savehypernoterecord.rb +20 -0
- data/code/superant.com.hypernote/savelinkrecord.rb +23 -0
- data/code/superant.com.hypernote/viewrwdschedulesconfiguration.rb +21 -0
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +99 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +21 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +58 -0
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +54 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +31 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +18 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +42 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +28 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +21 -0
- data/code/zz0applicationend/zz0end.rb +4 -0
- data/configuration/language.cnf +5 -0
- data/configuration/rwdapplicationidentity.cnf +3 -0
- data/configuration/rwdhypernote.cnf +9 -0
- data/configuration/rwdhypernoteversion.cnf +3 -0
- data/configuration/rwdtinker.cnf +16 -0
- data/configuration/rwdtinkerversion.cnf +2 -0
- data/configuration/tinkerwin2variables.cnf +12 -0
- data/configuration/tinkerwin2version.cnf +3 -0
- data/ev/browser.rb +109 -0
- data/ev/ftools.rb +170 -0
- data/ev/net.rb +750 -0
- data/ev/ruby.rb +819 -0
- data/ev/rwd.rb +1849 -0
- data/ev/sgml.rb +236 -0
- data/ev/thread.rb +63 -0
- data/ev/tree.rb +343 -0
- data/ev/xml.rb +4 -0
- data/extras/zip/ioextras.rb +114 -0
- data/extras/zip/stdrubyext.rb +111 -0
- data/extras/zip/tempfile_bugfixed.rb +195 -0
- data/extras/zip/zip.rb +1376 -0
- data/extras/zip/zipfilesystem.rb +558 -0
- data/extras/zip/ziprequire.rb +61 -0
- data/gui/00coreguibegin/applicationguitop.rwd +4 -0
- data/gui/frontwindow0/superant.com.hypernote/10viewnote.rwd +32 -0
- data/gui/frontwindow0/superant.com.hypernote/20editlinks.rwd +34 -0
- data/gui/frontwindow0/superant.com.hypernote/30noteutilities.rwd +27 -0
- data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +16 -0
- data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +12 -0
- data/gui/frontwindowselectionzend/viewselectionzend/viewselectionend.rwd +3 -0
- data/gui/frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +15 -0
- data/gui/frontwindowtdocuments/superant.com.rwdhypernotedocument/rwdhypernotedocument.rwd +5 -0
- data/gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd +6 -0
- data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +12 -0
- data/gui/frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd +6 -0
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/ya0helpscreenstart.rwd +3 -0
- data/gui/helpaboutinstalled/superant.com.rwdhypernotehelpabout/1versionname.rwd +6 -0
- data/gui/helpaboutinstalled/superant.com.rwdhypernotehelpabout/5version.rwd +9 -0
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/1appname.rwd +4 -0
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/3copyright.rwd +3 -0
- data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/5version.rwd +10 -0
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd +4 -0
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +3 -0
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +10 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +42 -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 +38 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +33 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +33 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +11 -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/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +4 -0
- data/init.rb +269 -0
- data/lang/alanguagehashbegin.rb +4 -0
- data/lang/en/rwdcore/languagefile.rb +16 -0
- data/lang/es/rwdcore/languagefile-es.rb +14 -0
- data/lang/jp/rwdcore/languagefile.rb +9 -0
- data/lang/languagehash.rb +4 -0
- data/lang/nl/rwdcore/languagefile.rb +19 -0
- data/lang/templangfile.rb +16 -0
- data/lang/vlanguagehashend.rb +6 -0
- data/lang/wlocallangstart.rb +5 -0
- data/lang/xlocallangfile.rb +16 -0
- data/lang/zlocallangend.rb +2 -0
- data/lib/temp.rb +1 -0
- data/rwd_files/HowTo_HyperNote.txt +97 -0
- data/rwd_files/HowTo_Tinker.txt +375 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/Readme.txt +57 -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/rwdindex.html +6 -0
- data/rwd_files/tinker.png +0 -0
- data/zips/rwdahelloworld-0.5.zip +0 -0
- metadata +202 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<tab name=\"editconfigurationfile\" caption=\"Edit Configuration\">
|
|
4
|
+
<table>
|
|
5
|
+
<row> <p> </row>
|
|
6
|
+
<row> <p align=\"right\">You can view or edit the rwdtinker applet confiruration file here</row>
|
|
7
|
+
<row> <p> </row>
|
|
8
|
+
<horizontal>
|
|
9
|
+
<button caption=\"Load Record\" action=\"loadconfigurationrecord\"/>
|
|
10
|
+
<button caption=\"Save Changes\" action=\"saveconfigurationrecord\"/>
|
|
11
|
+
<button caption=\"Reload Variables\" action=\"loadconfigurationvariables\"/>
|
|
12
|
+
<button caption=\"Help\" action=\"runhelpwindowtinkerwin2\"/>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
</horizontal>
|
|
18
|
+
<table>
|
|
19
|
+
<row> <p align=\"right\" >FileName:</p> <text size=70 name=\"a_configurationfilename\"/> </row>
|
|
20
|
+
<row> <p align=\"right\">1:</p> <text size=70 name=\"a_configline1\"/> </row>
|
|
21
|
+
<row> <p align=\"right\">2:</p> <text size=70 name=\"a_configline2\"/> </row>
|
|
22
|
+
<row> <p align=\"right\">3:</p> <text size=70 name=\"a_configline3\"/> </row>
|
|
23
|
+
<row> <p align=\"right\">4:</p> <text size=70 name=\"a_configline4\"/> </row>
|
|
24
|
+
<row> <p align=\"right\">5:</p> <text size=70 name=\"a_configline5\"/> </row>
|
|
25
|
+
<row> <p align=\"right\">6:</p> <text size=70 name=\"a_configline6\"/> </row>
|
|
26
|
+
<row> <p align=\"right\">7:</p> <text size=70 name=\"a_configline7\"/> </row>
|
|
27
|
+
<row> <p align=\"right\">8:</p> <text size=70 name=\"a_configline8\"/> </row>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
</table>
|
|
31
|
+
<p>%extraconfigdatadisplay%</p>
|
|
32
|
+
<p>
|
|
33
|
+
<p>%newconfigurationresult%</p>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
</tab>"
|
|
38
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<tab name=\"diagnostictab\" caption=\"Diagnostic Tab\">
|
|
4
|
+
<horizontal>
|
|
5
|
+
<button caption=\"View Ruby Version\" action=\"runrubyversion\"/>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
</horizontal>
|
|
9
|
+
<p>%rubyversion%</p>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<table>
|
|
13
|
+
<row> <p> </row>
|
|
14
|
+
|
|
15
|
+
</table>
|
|
16
|
+
|
|
17
|
+
<horizontal>
|
|
18
|
+
<button caption=\"view platform\" action=\"runviewplatform\"/>
|
|
19
|
+
|
|
20
|
+
</horizontal>
|
|
21
|
+
|
|
22
|
+
<p>%platformdisplay%</p>
|
|
23
|
+
<horizontal>
|
|
24
|
+
<button caption=\"View rwdtinker Version\" action=\"rwdtinkerversiondiagnostic\"/>
|
|
25
|
+
|
|
26
|
+
</horizontal>
|
|
27
|
+
|
|
28
|
+
<p>%rwdtinkerversionreturn%</p>
|
|
29
|
+
|
|
30
|
+
</tab>"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<tab name=\"rwdremotecontrol\" caption=\"Remote Controls\">
|
|
4
|
+
<p></p>
|
|
5
|
+
Query remote rwdtinker applications (not yet functional on XP)
|
|
6
|
+
<horizontal>
|
|
7
|
+
<button caption=\"Start the Remote Control for This Application\" action=\"network_start\"/>
|
|
8
|
+
<button caption=\"Help\" action=\"runhelpwindowtinkerwin2\"/>
|
|
9
|
+
|
|
10
|
+
</horizontal>
|
|
11
|
+
<p>%viewremotecommandresult%</p>
|
|
12
|
+
<horizontal>
|
|
13
|
+
|
|
14
|
+
<button caption=\"Show remote Command Choices\" action=\"showremoteportoptions\"/>
|
|
15
|
+
|
|
16
|
+
</horizontal>
|
|
17
|
+
<table>
|
|
18
|
+
<select name=\"a_remoteportinput\"> %%remoteportoptions%% </select>
|
|
19
|
+
|
|
20
|
+
</table>
|
|
21
|
+
|
|
22
|
+
<table>
|
|
23
|
+
<select name=\"a_remotecommandinput\"> %%remotecommandoptions%% </select>
|
|
24
|
+
|
|
25
|
+
</table>
|
|
26
|
+
<horizontal>
|
|
27
|
+
<button caption=\"Run Command\" action=\"runcontrolcommand\"/>
|
|
28
|
+
<button caption=\"Cancel\" action=\"main\"/>
|
|
29
|
+
</horizontal>
|
|
30
|
+
<p> Remote Port</p>
|
|
31
|
+
<p>%lastremotecommand%</p>
|
|
32
|
+
<p>%remotecommandresult%</p>
|
|
33
|
+
</tab>"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<window name = \"rwdtinkerhelpwindow\" title=#{Message[:rwdtinker_help]}>
|
|
4
|
+
<horizontal>
|
|
5
|
+
%rwdhelptopic%
|
|
6
|
+
</horizontal>
|
|
7
|
+
|
|
8
|
+
<table>
|
|
9
|
+
<row> <p></row>
|
|
10
|
+
|
|
11
|
+
</table>
|
|
12
|
+
<horizontal>
|
|
13
|
+
%rwdhelpdataoutput%
|
|
14
|
+
</horizontal>
|
|
15
|
+
<row> <p></row>
|
|
16
|
+
<table>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<row> <p></row>
|
|
20
|
+
</table>
|
|
21
|
+
<horizontal>
|
|
22
|
+
|
|
23
|
+
<button caption=\"Return\" action=\"rwdwindowreturn\"/>
|
|
24
|
+
</horizontal>
|
|
25
|
+
<table>
|
|
26
|
+
<row> <p></row>
|
|
27
|
+
|
|
28
|
+
</table>
|
|
29
|
+
|
|
30
|
+
%%rwdhelpsubchoicesoutput%%
|
|
31
|
+
"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<window name = \"applicationversion\" title=\"Application Version\">
|
|
4
|
+
|
|
5
|
+
<row> <p></row>
|
|
6
|
+
<p>%versionappnamedisplay%</p>
|
|
7
|
+
<row> <p></row>
|
|
8
|
+
<p>%versioncopyrightdisplay%</p>
|
|
9
|
+
|
|
10
|
+
<row> <p></row>
|
|
11
|
+
<p>%versionnumberdisplay%</p>
|
|
12
|
+
|
|
13
|
+
<horizontal>
|
|
14
|
+
<cancel/>
|
|
15
|
+
</horizontal>
|
|
16
|
+
|
|
17
|
+
</window>"
|
|
18
|
+
|
|
19
|
+
|
data/init.rb
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
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 "steven@superant.com".
|
|
22
|
+
#***********************************************************************/
|
|
23
|
+
|
|
24
|
+
require "ev/rwd"
|
|
25
|
+
require 'fileutils'
|
|
26
|
+
|
|
27
|
+
$progdir = File::expand_path( File.dirname(__FILE__))
|
|
28
|
+
|
|
29
|
+
$tempdoc = " "
|
|
30
|
+
|
|
31
|
+
def findfiles(d)
|
|
32
|
+
a = Array.new(Dir[d].entries.sort)
|
|
33
|
+
#loop through and get the files names
|
|
34
|
+
a.each do |x|
|
|
35
|
+
#adjust the filters to the files you want to see...
|
|
36
|
+
if(!test(?d,x))
|
|
37
|
+
# only rwd files
|
|
38
|
+
if x =~ /rb|rwd|txt/
|
|
39
|
+
fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
|
|
40
|
+
$tempdoc+=fileA.read #reads the file into the doc string
|
|
41
|
+
fileA.close
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
def loadguifile(d)
|
|
47
|
+
a = Array.new(Dir[d].entries.sort)
|
|
48
|
+
#loop through and get the files names
|
|
49
|
+
a.each do |x|
|
|
50
|
+
#adjust the filters to the files you want to see...
|
|
51
|
+
if(!test(?d,x))
|
|
52
|
+
# only rwd files
|
|
53
|
+
if x =~ /rb|rwd|txt/
|
|
54
|
+
load x #opens the file thats in fileName and reads it
|
|
55
|
+
$tempdoc += $rwdguivar # adds the file into the doc string
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Read in the configuration files
|
|
62
|
+
|
|
63
|
+
Dir.chdir("configuration") #changes the current working directory
|
|
64
|
+
|
|
65
|
+
fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /cnf$/) } #creates an Array separated with \n
|
|
66
|
+
@doc = ""
|
|
67
|
+
fileList.length.times{ #opening of a block
|
|
68
|
+
fileName=fileList.pop #pops the first item out of the Array
|
|
69
|
+
load fileName #loads the the config file thats in fileName
|
|
70
|
+
} #closing block
|
|
71
|
+
# END of configuration reading
|
|
72
|
+
|
|
73
|
+
Dir.chdir($progdir) # change back to top program directory
|
|
74
|
+
|
|
75
|
+
# build the English Language hash file from the parts
|
|
76
|
+
startlangdir = File.join(LangDir,"en")
|
|
77
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
78
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
|
79
|
+
#loop through the list, ignore the files and add all new directories found
|
|
80
|
+
alanghash.each do |x|
|
|
81
|
+
#if a directory...
|
|
82
|
+
if(test(?d,x))
|
|
83
|
+
# add to the original list of directories
|
|
84
|
+
@@tmproot = x + "/**"
|
|
85
|
+
#adds the new ones to the array
|
|
86
|
+
blanghash = Dir[@@tmproot].entries.sort
|
|
87
|
+
blanghash.each do |x|
|
|
88
|
+
if(test(?d,x))
|
|
89
|
+
alanghash.push(x) #appends to the end of the array...
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
alanghash.each do |x|
|
|
95
|
+
#if it is a file...
|
|
96
|
+
if(!test(?d,x))
|
|
97
|
+
alanghash.delete(x)
|
|
98
|
+
else #it is a directory...
|
|
99
|
+
findfiles(x + "/**")
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
fileLangHash=File.open(TempLangHashFile,"w") #deletes and opens a the file in fileName
|
|
104
|
+
fileLangHash.write($tempdoc) #writes the contents of doc into the file
|
|
105
|
+
fileLangHash.close
|
|
106
|
+
# END of Lang building
|
|
107
|
+
$tempdoc = " "
|
|
108
|
+
Dir.chdir($progdir) # change back to top program directory
|
|
109
|
+
|
|
110
|
+
# build the local Language hash file from the parts
|
|
111
|
+
startlangdir = File.join(LangDir,$lang)
|
|
112
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
113
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
|
114
|
+
#loop through the list, ignore the files and add all new directories found
|
|
115
|
+
alanghash.each do |x|
|
|
116
|
+
#if a directory...
|
|
117
|
+
if(test(?d,x))
|
|
118
|
+
# add to the original list of directories
|
|
119
|
+
@@tmproot = x + "/**"
|
|
120
|
+
#adds the new ones to the array
|
|
121
|
+
blanghash = Dir[@@tmproot].entries.sort
|
|
122
|
+
blanghash.each do |x|
|
|
123
|
+
if(test(?d,x))
|
|
124
|
+
alanghash.push(x) #appends to the end of the array...
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
alanghash.each do |x|
|
|
130
|
+
#if it is a file...
|
|
131
|
+
if(!test(?d,x))
|
|
132
|
+
alanghash.delete(x)
|
|
133
|
+
else #it is a directory...
|
|
134
|
+
findfiles(x + "/**")
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
filelocalLangHash=File.open(LocalLangHashFile,"w") #deletes and opens a the file in fileName
|
|
139
|
+
filelocalLangHash.write($tempdoc) #writes the contents of doc into the file
|
|
140
|
+
filelocalLangHash.close
|
|
141
|
+
|
|
142
|
+
$tempdoc = " "
|
|
143
|
+
|
|
144
|
+
Dir.chdir($progdir) # change back to top program directory
|
|
145
|
+
|
|
146
|
+
# build the language hash constant object from the lang parts
|
|
147
|
+
#get a list of the files in lang directory only
|
|
148
|
+
alangfile = Dir.new(LangDir).entries.sort.reverse.delete_if { |x| ! (x =~ /rb$/) }
|
|
149
|
+
alangfile.length.times{
|
|
150
|
+
fileName = alangfile.pop
|
|
151
|
+
Dir.chdir($progdir)
|
|
152
|
+
Dir.chdir(LangDir)
|
|
153
|
+
fileLangA=File.open("#{fileName}","r") #opens the file thats in fileName as read only
|
|
154
|
+
$tempdoc += fileLangA.read #reads the file into the doc string
|
|
155
|
+
fileLangA.close
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
Dir.chdir($progdir)
|
|
159
|
+
fileLangB=File.open(LangNameFile,"w") #deletes and opens a the file in fileName
|
|
160
|
+
fileLangB.write($tempdoc) #writes the contents of doc into the file
|
|
161
|
+
fileLangB.close
|
|
162
|
+
load LangNameFile # load the file
|
|
163
|
+
|
|
164
|
+
$tempdoc = " "
|
|
165
|
+
|
|
166
|
+
# build the actual program from the code parts
|
|
167
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
168
|
+
a = Array.new(Dir[CodeDir].entries.sort)
|
|
169
|
+
#loop through the list, ignore the files and add all new directories found
|
|
170
|
+
a.each do |x|
|
|
171
|
+
#if a directory...
|
|
172
|
+
if(test(?d,x))
|
|
173
|
+
# add to the original list of directories
|
|
174
|
+
@@root = x + "/**"
|
|
175
|
+
#adds the new ones to the array
|
|
176
|
+
b = Dir[@@root].entries.sort
|
|
177
|
+
b.each do |x|
|
|
178
|
+
if(test(?d,x))
|
|
179
|
+
a.push(x) #appends to the end of the array...
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
a.each do |x|
|
|
185
|
+
#if it is a file...
|
|
186
|
+
if(!test(?d,x))
|
|
187
|
+
a.delete(x)
|
|
188
|
+
else #it is a directory...
|
|
189
|
+
findfiles(x + "/**")
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
fileB=File.open(CodeNameFile,"w") #deletes and opens a the file in fileName
|
|
194
|
+
fileB.write($tempdoc) #writes the contents of doc into the file
|
|
195
|
+
fileB.close
|
|
196
|
+
require CodeName # load the program file
|
|
197
|
+
|
|
198
|
+
# build the actual GUI from the gui parts
|
|
199
|
+
$tempdoc = " "
|
|
200
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
201
|
+
a = Array.new(Dir[GuiDir].entries.sort)
|
|
202
|
+
#loop through the list, ignore the files and add all new directories found
|
|
203
|
+
a.each do |x|
|
|
204
|
+
#if a directory...
|
|
205
|
+
if(test(?d,x))
|
|
206
|
+
#use this new dir find to add to the original list of directories
|
|
207
|
+
@@root = x + "/**"
|
|
208
|
+
#adds the new ones to the array
|
|
209
|
+
b = Dir[@@root].entries.sort
|
|
210
|
+
b.each do |x|
|
|
211
|
+
if(test(?d,x))
|
|
212
|
+
a.push(x) #appends to the end of the array...
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
a.each do |x|
|
|
218
|
+
#if it is a file...
|
|
219
|
+
if(!test(?d,x))
|
|
220
|
+
a.delete(x)
|
|
221
|
+
|
|
222
|
+
else #it is a directory...
|
|
223
|
+
loadguifile(x + "/**")
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
fileB=File.open(RWDFile,"w") #deletes and opens a the file in fileName
|
|
228
|
+
fileB.write($tempdoc) #writes the contents of doc into the file
|
|
229
|
+
fileB.close
|
|
230
|
+
|
|
231
|
+
require 'socket' # Network stuff
|
|
232
|
+
host = "127.0.0.1"
|
|
233
|
+
port = $port
|
|
234
|
+
|
|
235
|
+
# Create a socket to listen on and bind it to the host and port
|
|
236
|
+
freeportfound = false
|
|
237
|
+
until freeportfound
|
|
238
|
+
begin
|
|
239
|
+
@socket = UDPSocket::new()
|
|
240
|
+
@socket.bind(host, port)
|
|
241
|
+
freeportfound = true
|
|
242
|
+
$port = port
|
|
243
|
+
# Rescue the "Address in use" error
|
|
244
|
+
rescue Errno::EADDRINUSE
|
|
245
|
+
puts "RWD Startup: Port #{port} on host #{host} is already in use."
|
|
246
|
+
port=port +1
|
|
247
|
+
puts "trying port: #{port}"
|
|
248
|
+
# Rescue the "Address not available' error
|
|
249
|
+
rescue Errno::EADDRNOTAVAIL
|
|
250
|
+
puts "RWD Startup: Address #{host} is not available to bind."
|
|
251
|
+
port =port + 1
|
|
252
|
+
puts "trying port: #{port}"
|
|
253
|
+
# Rescue "permission denied errors
|
|
254
|
+
rescue Errno::EACCES
|
|
255
|
+
puts "RWD Startup: Access denied when binding interface addresses. ?"
|
|
256
|
+
port =port + 1
|
|
257
|
+
puts "trying port: #{port}"
|
|
258
|
+
# Rescue all other errors
|
|
259
|
+
rescue
|
|
260
|
+
puts "RWD Startup: An error occured."
|
|
261
|
+
port =port + 1
|
|
262
|
+
puts "trying port: #{port}"
|
|
263
|
+
# Rescue all other errors
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
RwdTinker.file(RWDFile).serve(port) # start the main class and program
|