rwdgutenberg 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/Books/8sam810.txt +8522 -0
- data/Books/Sam2.gut +2 -0
- data/Readme.txt +94 -0
- data/bin/rwdgutenberg +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/01rwdcore/uploadreturns.rb +62 -0
- data/code/superant.com.gutenberg/changegutenbergname.rb +16 -0
- data/code/superant.com.gutenberg/clearbookscreendisplay.rb +8 -0
- data/code/superant.com.gutenberg/copyfilename.rb +24 -0
- data/code/superant.com.gutenberg/createnewnote.rb +23 -0
- data/code/superant.com.gutenberg/deletegutenbergrecord.rb +21 -0
- data/code/superant.com.gutenberg/gutenbergcreatefile.rb +9 -0
- data/code/superant.com.gutenberg/helptexthashrwdgutenberg.rb +41 -0
- data/code/superant.com.gutenberg/listnamerecord.rb +15 -0
- data/code/superant.com.gutenberg/listtextfilesgutenberg.rb +58 -0
- data/code/superant.com.gutenberg/loadbookrecord.rb +21 -0
- data/code/superant.com.gutenberg/loadconfigurationrecord.rb +36 -0
- data/code/superant.com.gutenberg/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.gutenberg/openhelpwindowgutenberg.rb +29 -0
- data/code/superant.com.gutenberg/returntomain.rb +10 -0
- data/code/superant.com.gutenberg/rungutenbergwindow.rb +42 -0
- data/code/superant.com.gutenberg/rwdgutenbergbackward.rb +27 -0
- data/code/superant.com.gutenberg/rwdhypernotehelpabout.rb +14 -0
- data/code/superant.com.gutenberg/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.gutenberg/savegutenbergrecord.rb +20 -0
- data/code/superant.com.gutenberg/savelinkrecord.rb +23 -0
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +99 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +25 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +24 -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 +32 -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.dist +7 -0
- data/configuration/rwdapplicationidentity.dist +3 -0
- data/configuration/rwdgutenberg.dist +12 -0
- data/configuration/rwdtinker.dist +15 -0
- data/configuration/tinkerwin2variables.dist +17 -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/rconftool.rb +380 -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 +1377 -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.gutenberg/10viewnote.rwd +32 -0
- data/gui/frontwindow0/superant.com.gutenberg/20listfiles.rwd +35 -0
- data/gui/frontwindow0/superant.com.gutenberg/30booklistutilities.rwd +28 -0
- data/gui/frontwindow0/superant.com.gutenberg/35displaytab.rwd +10 -0
- data/gui/frontwindow0/superant.com.gutenberg/40rwdgutenberg.rwd +16 -0
- data/gui/frontwindow0/superant.com.gutenberg/67viewconfiguration.rwd +40 -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,rwdgutenbergdocument/rwdgutenbergdocument.rwd +5 -0
- data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +15 -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.rwdgutenberghelpabout/1versionname.rwd +6 -0
- data/gui/helpaboutinstalled/superant.com.rwdgutenberghelpabout/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.gutendisplay/gutendisplaywindow.rwd +9 -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 +29 -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 +274 -0
- data/installed/rwdviewlogo-0.4.inf +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/nl/rwdcore/languagefile.rb +19 -0
- data/lib/temp.rb +1 -0
- data/rwd_files/HowTo_Gutenberg.txt +94 -0
- data/rwd_files/HowTo_Tinker.txt +400 -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/rwdconfig.dist +6 -0
- data/rwdgutenberg-0.03.gem +0 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +5 -0
- data/tests/makedist.rb +29 -0
- data/tests/rdep.rb +354 -0
- data/tests/rwdtinkertestEN.rb +163 -0
- data/tests/test.result +32 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdahelloworld-0.5.zip +0 -0
- metadata +198 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<tab name=\"superantcomremotezipsinstall\" caption=\"Install Remote Applets\">
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<row> <p align=\"right\">File Name:</p> <text size=70 name=\"superantcominstallremoteappletinput\"/> </row>
|
|
7
|
+
|
|
8
|
+
</table>
|
|
9
|
+
<horizontal>
|
|
10
|
+
<button caption=\"install remote Gem applet package\" action=\"superantcominstallremotegemapplet\"/>
|
|
11
|
+
<button caption=\"Help\" action=\"runhelpwindowtinkerwin2\"/>
|
|
12
|
+
|
|
13
|
+
</horizontal>
|
|
14
|
+
<p>%superantcominstallremotegemappletresult%</p>
|
|
15
|
+
|
|
16
|
+
<horizontal>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
<button caption=\"view already installed GEM applets\" action=\"superantcomshowgemfiledirs\"/>
|
|
21
|
+
</horizontal>
|
|
22
|
+
<p>%%superantcomshowgemappletdirsresult%%</p>
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<table>
|
|
29
|
+
<row> <p align=\"right\">Click below to view the list of zip files </row>
|
|
30
|
+
|
|
31
|
+
</table>
|
|
32
|
+
|
|
33
|
+
<horizontal>
|
|
34
|
+
|
|
35
|
+
<button caption=\"List applets in the Remote GEM Repository available for downloading\" action=\"superantcomremotegemlist\"/>
|
|
36
|
+
|
|
37
|
+
</horizontal>
|
|
38
|
+
<p>%superantcomremotegemappletsfullresult%</p>
|
|
39
|
+
<p>%%superantcomremotegemappletsresult%%</p>
|
|
40
|
+
|
|
41
|
+
</tab>"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<tab name=\"filelister\" caption=\"List Applets\">
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
<table>
|
|
7
|
+
<row> <p align=\"right\">File Name:</p> <text name=\"a_installlist\"/> </row>
|
|
8
|
+
|
|
9
|
+
</table>
|
|
10
|
+
|
|
11
|
+
<horizontal>
|
|
12
|
+
<button caption=\"View Install Text\" action=\"openappletname\"/>
|
|
13
|
+
<button caption=\"Help\" action=\"runhelpwindowtinkerwin2\"/>
|
|
14
|
+
</horizontal>
|
|
15
|
+
<p>%displaytext%</p>
|
|
16
|
+
|
|
17
|
+
<table>
|
|
18
|
+
<row> <p align=\"right\">File Name:</p> <text name=\"a_removeapplet\"/> </row>
|
|
19
|
+
|
|
20
|
+
</table>
|
|
21
|
+
|
|
22
|
+
<p>%removeapplettext%</p>
|
|
23
|
+
<horizontal>
|
|
24
|
+
<button caption=\"remove applet\" action=\"removeapplet\"/>
|
|
25
|
+
<button caption=\"Cancel\" action=\"main\"/>
|
|
26
|
+
|
|
27
|
+
</horizontal>
|
|
28
|
+
<table>
|
|
29
|
+
<row> <p> </row>
|
|
30
|
+
<row> <p align=\"right\">View the list of installation files </row>
|
|
31
|
+
|
|
32
|
+
</table>
|
|
33
|
+
<horizontal>
|
|
34
|
+
|
|
35
|
+
<button caption=\"List Files\" action=\"listinstalledfiles\"/>
|
|
36
|
+
|
|
37
|
+
</horizontal>
|
|
38
|
+
|
|
39
|
+
<p>%%filesresult%%</p>
|
|
40
|
+
|
|
41
|
+
</tab>"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
@@ -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,29 @@
|
|
|
1
|
+
$rwdguivar=
|
|
2
|
+
"
|
|
3
|
+
<tab name=\"diagnostictab\" caption=\"Diagnostic Tab\">
|
|
4
|
+
<horizontal>
|
|
5
|
+
<button caption=\"View Platform Information\" action=\"runviewplatform\"/>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
</horizontal>
|
|
9
|
+
|
|
10
|
+
<p>%platformdisplay%</p>
|
|
11
|
+
<horizontal>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
</horizontal>
|
|
15
|
+
<horizontal>
|
|
16
|
+
<button caption=\"upload this page of information to the Program Author\" action=\"uploadreturnsfile\"/>
|
|
17
|
+
</horizontal>
|
|
18
|
+
<horizontal>
|
|
19
|
+
<p align=\"right\">Email:(optional)</p> <text size=50 name=\"a_emailupload\"/>
|
|
20
|
+
|
|
21
|
+
</horizontal>
|
|
22
|
+
<p align=\"center\">Comment/Suggestion/Feature Request or Bug Report:(optional)</p> <textarea name=\"a_commentupload\"/>
|
|
23
|
+
|
|
24
|
+
<p>%returnsftpdisplay%</p>
|
|
25
|
+
|
|
26
|
+
</tab>"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
@@ -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,274 @@
|
|
|
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
|
+
require 'extras/rconftool'
|
|
27
|
+
|
|
28
|
+
$progdir = File::expand_path( File.dirname(__FILE__))
|
|
29
|
+
|
|
30
|
+
$tempdoc = " "
|
|
31
|
+
|
|
32
|
+
def findfiles(d)
|
|
33
|
+
a = Array.new(Dir[d].entries.sort)
|
|
34
|
+
#loop through and get the files names
|
|
35
|
+
a.each do |x|
|
|
36
|
+
#adjust the filters to the files you want to see...
|
|
37
|
+
if(!test(?d,x))
|
|
38
|
+
# only rwd files
|
|
39
|
+
if x =~ /rb|rwd|txt/
|
|
40
|
+
fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
|
|
41
|
+
$tempdoc+=fileA.read #reads the file into the doc string
|
|
42
|
+
fileA.close
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
def loadguifile(d)
|
|
48
|
+
a = Array.new(Dir[d].entries.sort)
|
|
49
|
+
#loop through and get the files names
|
|
50
|
+
a.each do |x|
|
|
51
|
+
#adjust the filters to the files you want to see...
|
|
52
|
+
if(!test(?d,x))
|
|
53
|
+
# only rwd files
|
|
54
|
+
if x =~ /rb|rwd|txt/
|
|
55
|
+
|
|
56
|
+
load x #opens the file thats in fileName and reads it
|
|
57
|
+
$tempdoc += $rwdguivar # adds the file into the doc string
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# integrate the new configuration files
|
|
64
|
+
MAINconfignew = "rwdconfig.cnf"
|
|
65
|
+
MAINconfigdist = "rwdconfig.dist"
|
|
66
|
+
Rconftool::install(MAINconfigdist,MAINconfignew)
|
|
67
|
+
|
|
68
|
+
Dir.chdir("configuration") #changes the current working directory
|
|
69
|
+
|
|
70
|
+
fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /dist$/) } #creates an Array separated with \n
|
|
71
|
+
@doc = ""
|
|
72
|
+
fileList.length.times{ #opening of a block
|
|
73
|
+
configdist =fileList.pop #pops the first item out of the Array
|
|
74
|
+
tempconfigfile = configdist.gsub(/\.dist$/, "")
|
|
75
|
+
confignew = tempconfigfile + ".cnf"
|
|
76
|
+
Rconftool::install(configdist,confignew) #integrates new file with old
|
|
77
|
+
} #closing block
|
|
78
|
+
# END of configuration integration
|
|
79
|
+
Dir.chdir($progdir)
|
|
80
|
+
|
|
81
|
+
# Read in the configuration files
|
|
82
|
+
Dir.chdir("configuration") #changes the current working directory
|
|
83
|
+
|
|
84
|
+
fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /cnf$/) } #creates an Array separated with \n
|
|
85
|
+
@doc = ""
|
|
86
|
+
fileList.length.times{ #opening of a block
|
|
87
|
+
fileName=fileList.pop #pops the first item out of the Array
|
|
88
|
+
load fileName #loads the the config file thats in fileName
|
|
89
|
+
} #closing block
|
|
90
|
+
# END of configuration reading
|
|
91
|
+
|
|
92
|
+
Dir.chdir($progdir) # change back to top program directory
|
|
93
|
+
|
|
94
|
+
# build the English Language hash file from the parts
|
|
95
|
+
languagehashvariable = 'Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
|
|
96
|
+
langmessage = {' + "\n"
|
|
97
|
+
startlangdir = File.join(LangDir,"en")
|
|
98
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
99
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
|
100
|
+
#loop through the list, ignore the files and add all new directories found
|
|
101
|
+
alanghash.each do |x|
|
|
102
|
+
#if a directory...
|
|
103
|
+
if(test(?d,x))
|
|
104
|
+
# add to the original list of directories
|
|
105
|
+
@@tmproot = x + "/**"
|
|
106
|
+
#adds the new ones to the array
|
|
107
|
+
blanghash = Dir[@@tmproot].entries.sort
|
|
108
|
+
blanghash.each do |x|
|
|
109
|
+
if(test(?d,x))
|
|
110
|
+
alanghash.push(x) #appends to the end of the array...
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
alanghash.each do |x|
|
|
116
|
+
#if it is a file...
|
|
117
|
+
if(!test(?d,x))
|
|
118
|
+
alanghash.delete(x)
|
|
119
|
+
else #it is a directory...
|
|
120
|
+
findfiles(x + "/**")
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
#writes the contents of doc into the languagehashvariable
|
|
126
|
+
languagehashvariable = languagehashvariable + $tempdoc + "} ; langmessage.each { |kk, vv| Message[kk] = vv }"
|
|
127
|
+
|
|
128
|
+
# END of en Lang building
|
|
129
|
+
$tempdoc = " "
|
|
130
|
+
Dir.chdir($progdir) # change back to top program directory
|
|
131
|
+
|
|
132
|
+
# build the local Language hash file from the parts
|
|
133
|
+
startlangdir = File.join(LangDir,$lang)
|
|
134
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
135
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
|
136
|
+
#loop through the list, ignore the files and add all new directories found
|
|
137
|
+
alanghash.each do |x|
|
|
138
|
+
#if a directory...
|
|
139
|
+
if(test(?d,x))
|
|
140
|
+
# add to the original list of directories
|
|
141
|
+
@@tmproot = x + "/**"
|
|
142
|
+
#adds the new ones to the array
|
|
143
|
+
blanghash = Dir[@@tmproot].entries.sort
|
|
144
|
+
blanghash.each do |x|
|
|
145
|
+
if(test(?d,x))
|
|
146
|
+
alanghash.push(x) #appends to the end of the array...
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
alanghash.each do |x|
|
|
152
|
+
#if it is a file...
|
|
153
|
+
if(!test(?d,x))
|
|
154
|
+
alanghash.delete(x)
|
|
155
|
+
else #it is a directory...
|
|
156
|
+
findfiles(x + "/**")
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
#writes the contents of doc into the variable
|
|
162
|
+
languagehashvariable = languagehashvariable + " ; Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
$tempdoc = " "
|
|
166
|
+
|
|
167
|
+
Dir.chdir($progdir) # change back to top program directory
|
|
168
|
+
|
|
169
|
+
temp = eval( languagehashvariable )
|
|
170
|
+
|
|
171
|
+
$tempdoc = " "
|
|
172
|
+
|
|
173
|
+
# build the actual program from the code parts
|
|
174
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
175
|
+
a = Array.new(Dir[CodeDir].entries.sort)
|
|
176
|
+
#loop through the list, ignore the files and add all new directories found
|
|
177
|
+
a.each do |x|
|
|
178
|
+
#if a directory...
|
|
179
|
+
if(test(?d,x))
|
|
180
|
+
# add to the original list of directories
|
|
181
|
+
@@root = x + "/**"
|
|
182
|
+
#adds the new ones to the array
|
|
183
|
+
b = Dir[@@root].entries.sort
|
|
184
|
+
b.each do |x|
|
|
185
|
+
if(test(?d,x))
|
|
186
|
+
a.push(x) #appends to the end of the array...
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
a.each do |x|
|
|
192
|
+
#if it is a file...
|
|
193
|
+
if(!test(?d,x))
|
|
194
|
+
a.delete(x)
|
|
195
|
+
else #it is a directory...
|
|
196
|
+
findfiles(x + "/**")
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
# load the program file
|
|
202
|
+
tempcoderesult = eval( $tempdoc )
|
|
203
|
+
|
|
204
|
+
# build the actual GUI from the gui parts
|
|
205
|
+
$tempdoc = " "
|
|
206
|
+
#get a list of the files and subdirectories on the starting directory only
|
|
207
|
+
a = Array.new(Dir[GuiDir].entries.sort)
|
|
208
|
+
#loop through the list, ignore the files and add all new directories found
|
|
209
|
+
a.each do |x|
|
|
210
|
+
#if a directory...
|
|
211
|
+
if(test(?d,x))
|
|
212
|
+
#use this new dir find to add to the original list of directories
|
|
213
|
+
@@root = x + "/**"
|
|
214
|
+
#adds the new ones to the array
|
|
215
|
+
b = Dir[@@root].entries.sort
|
|
216
|
+
b.each do |x|
|
|
217
|
+
if(test(?d,x))
|
|
218
|
+
a.push(x) #appends to the end of the array...
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
a.each do |x|
|
|
224
|
+
#if it is a file...
|
|
225
|
+
if(!test(?d,x))
|
|
226
|
+
a.delete(x)
|
|
227
|
+
|
|
228
|
+
else #it is a directory...
|
|
229
|
+
loadguifile(x + "/**")
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# gui variable is done
|
|
234
|
+
guiRWD = $tempdoc
|
|
235
|
+
|
|
236
|
+
require 'socket' # Network stuff
|
|
237
|
+
host = "127.0.0.1"
|
|
238
|
+
port = $port
|
|
239
|
+
|
|
240
|
+
# Create a socket to listen on and bind it to the host and port
|
|
241
|
+
freeportfound = false
|
|
242
|
+
until freeportfound
|
|
243
|
+
begin
|
|
244
|
+
@socket = UDPSocket::new()
|
|
245
|
+
@socket.bind(host, port)
|
|
246
|
+
freeportfound = true
|
|
247
|
+
$port = port
|
|
248
|
+
# Rescue the "Address in use" error
|
|
249
|
+
rescue Errno::EADDRINUSE
|
|
250
|
+
puts "RWD Startup: Port #{port} on host #{host} is already in use."
|
|
251
|
+
port=port +1
|
|
252
|
+
puts "trying port: #{port}"
|
|
253
|
+
# Rescue the "Address not available' error
|
|
254
|
+
rescue Errno::EADDRNOTAVAIL
|
|
255
|
+
puts "RWD Startup: Address #{host} is not available to bind."
|
|
256
|
+
port =port + 1
|
|
257
|
+
puts "trying port: #{port}"
|
|
258
|
+
# Rescue "permission denied errors
|
|
259
|
+
rescue Errno::EACCES
|
|
260
|
+
puts "RWD Startup: Access denied when binding interface addresses. ?"
|
|
261
|
+
port =port + 1
|
|
262
|
+
puts "trying port: #{port}"
|
|
263
|
+
# Rescue all other errors
|
|
264
|
+
rescue
|
|
265
|
+
puts "RWD Startup: An error occured."
|
|
266
|
+
port =port + 1
|
|
267
|
+
puts "trying port: #{port}"
|
|
268
|
+
# Rescue all other errors
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
RwdTinker.new( guiRWD).serve(port) # start the main class and program
|