rwdmpd 0.06
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +475 -0
- data/bin/rwdmpd +19 -0
- data/code/01rwdcore/01rwdcore.rb +29 -0
- data/code/01rwdcore/02helptexthashbegin.rb +4 -0
- data/code/01rwdcore/03helptexthash.rb +23 -0
- data/code/01rwdcore/04helptextend.rb +6 -0
- data/code/01rwdcore/jumplinkcommand.rb +26 -0
- data/code/01rwdcore/openhelpwindow.rb +31 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rundocuments.rb +10 -0
- data/code/01rwdcore/runeditconfiguration.rb +10 -0
- data/code/01rwdcore/runhelpabout.rb +10 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +9 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
- data/code/01rwdcore/test_cases.rb +109 -0
- data/code/01rwdcore/test_harness.rb +13 -0
- data/code/01rwdcore/uploadreturns.rb +62 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
- data/code/superant.com.rwdmp3/0uninstallapplet.rb +11 -0
- data/code/superant.com.rwdmp3/clearscreendisplay.rb +7 -0
- data/code/superant.com.rwdmp3/controlmpd.rb +139 -0
- data/code/superant.com.rwdmp3/helptexthashrwdmp3.rb +41 -0
- data/code/superant.com.rwdmp3/listplaylistfiles.rb +12 -0
- data/code/superant.com.rwdmp3/loadconfigurationrecord.rb +22 -0
- data/code/superant.com.rwdmp3/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.rwdmp3/loadplaylistrecord.rb +19 -0
- data/code/superant.com.rwdmp3/mpd_client.rb +41 -0
- data/code/superant.com.rwdmp3/mpd_seek.rb +23 -0
- data/code/superant.com.rwdmp3/openhelpwindowrwdmp3.rb +25 -0
- data/code/superant.com.rwdmp3/runrwdmpdwindow.rb +10 -0
- data/code/superant.com.rwdmp3/rwdtinkerversion.rb +10 -0
- data/code/superant.com.rwdmp3/saveconfigurationrecord.rb +19 -0
- data/code/superant.com.rwdmp3/saveplaylistrecord.rb +18 -0
- data/code/superant.com.rwdmp3/startmp3server.rb +16 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +240 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +34 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +53 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +33 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +38 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/zz0applicationend/zz0end.rb +4 -0
- data/configuration/language.dist +8 -0
- data/configuration/rwdapplicationidentity.dist +3 -0
- data/configuration/rwdtinker.dist +15 -0
- data/configuration/rwdwmpd-0.06.dist +14 -0
- data/configuration/tinkerwin2variables.dist +18 -0
- data/gui/00coreguibegin/applicationguitop.rwd +4 -0
- data/gui/frontwindow0/cc0openphoto.rwd +22 -0
- data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
- data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselections/wwselectionend.rwd +3 -0
- data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
- data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
- data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
- data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
- data/gui/helpaboutzend/helpscreenend.rwd +3 -0
- data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/10appletbegin.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/20rwdmpd.rwd +37 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/25rwdseek.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/30editplaylist.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/88viewconfiguration.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/89rwddiagnostics.rwd +26 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/90jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdmp3/9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
- data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
- data/init.rb +277 -0
- data/installed/mpdmusicdata2.inf +2 -0
- data/installed/rwdwmpd-0.06.inf +10 -0
- data/installed/temp.rb +1 -0
- data/lang/en/rwdcore/languagefile.rb +58 -0
- data/lang/es/rwdcore/languagefile-es.rb +62 -0
- data/lang/fr/rwdcore/languagefile.rb +64 -0
- data/lang/jp/rwdcore/languagefile.rb +72 -0
- data/lang/nl/rwdcore/languagefile.rb +75 -0
- data/lib/librmpd.rb +1152 -0
- data/lib/mpdserver.rb +1204 -0
- data/lib/rconftool.rb +387 -0
- data/lib/rwd/browser.rb +123 -0
- data/lib/rwd/ftools.rb +174 -0
- data/lib/rwd/mime.rb +328 -0
- data/lib/rwd/net.rb +876 -0
- data/lib/rwd/ruby.rb +889 -0
- data/lib/rwd/rwd.rb +1422 -0
- data/lib/rwd/sgml.rb +236 -0
- data/lib/rwd/thread.rb +63 -0
- data/lib/rwd/tree.rb +371 -0
- data/lib/rwd/xml.rb +101 -0
- data/lib/rwdthemes/default.rwd +317 -0
- data/lib/rwdthemes/pda.rwd +72 -0
- data/lib/rwdthemes/windowslike.rwd +171 -0
- data/lib/zip/ioextras.rb +114 -0
- data/lib/zip/stdrubyext.rb +111 -0
- data/lib/zip/tempfile_bugfixed.rb +195 -0
- data/lib/zip/zip.rb +1378 -0
- data/lib/zip/zipfilesystem.rb +558 -0
- data/lib/zip/ziprequire.rb +61 -0
- data/music/classicalmues.mp3 +0 -0
- data/rwd_files/HowTo_Mpd.txt +136 -0
- data/rwd_files/HowTo_Tinker.txt +482 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/Readme.txt +57 -0
- data/rwd_files/RubyWebDialogs.html +6 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +54 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +22 -0
- data/rwdmpd.rb +1 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +6 -0
- data/tests/makedist-rwdwmpd.rb +58 -0
- data/tests/makedist.rb +66 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdwaddresses-1.06.zip +0 -0
- data/zips/rwdwcalc-0.62.zip +0 -0
- data/zips/rwdwfoldeditor-0.04.zip +0 -0
- data/zips/rwdwgutenberg-0.09.zip +0 -0
- data/zips/rwdwmpd-0.06.zip +0 -0
- data/zips/rwdwruby-1.07.zip +0 -0
- data/zips/temp.rb +1 -0
- data/zips/tinkerbellw-0.02.zip +0 -0
- data/zips/wrubyslippers-1.06.zip +0 -0
- metadata +220 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<tab name=\"superantcomremotezipsinstall\" caption=\"Install Remote Applets\">
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<row> <p align=\"right\">#{Message[: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=#{Message[:help]} action=\"runhelpwindowtinkerwin2\"/>
|
12
|
+
|
13
|
+
</horizontal>
|
14
|
+
<p>%superantcominstallremotegemappletresult%</p>
|
15
|
+
|
16
|
+
<horizontal>
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
<button caption=#{Message[:viewalreadyinstalled_applications]} action=\"superantcomshowgemfiledirs\"/>
|
21
|
+
</horizontal>
|
22
|
+
<p>%%superantcomshowgemappletdirsresult%%</p>
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
<table>
|
29
|
+
<row> <p align=\"right\">#{Message[:clickbelowtoviewlistof_zip]} </row>
|
30
|
+
|
31
|
+
</table>
|
32
|
+
|
33
|
+
<horizontal>
|
34
|
+
|
35
|
+
<button caption=#{Message[:listappletsinthegem_directory]} 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=#{Message[:list_applets]}>
|
4
|
+
|
5
|
+
|
6
|
+
<table>
|
7
|
+
<row> <p align=\"right\">#{Message[:file_name]}</p> <text name=\"a_installlist\"/> </row>
|
8
|
+
|
9
|
+
</table>
|
10
|
+
|
11
|
+
<horizontal>
|
12
|
+
<button caption=#{Message[:viewinstalled_text]} action=\"openappletname\"/>
|
13
|
+
<button caption=#{Message[:help]} action=\"runhelpwindowtinkerwin2\"/>
|
14
|
+
</horizontal>
|
15
|
+
<p>%displaytext%</p>
|
16
|
+
|
17
|
+
<table>
|
18
|
+
<row> <p align=\"right\">#{Message[:file_name]}</p> <text name=\"a_removeapplet\"/> </row>
|
19
|
+
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<p>%removeapplettext%</p>
|
23
|
+
<horizontal>
|
24
|
+
<button caption=#{Message[:remove_applet]} action=\"removeapplet\"/>
|
25
|
+
<button caption=#{Message[:cancel]} action=\"main\"/>
|
26
|
+
|
27
|
+
</horizontal>
|
28
|
+
<table>
|
29
|
+
<row> <p> </row>
|
30
|
+
<row> <p align=\"right\">#{Message[:viewlistinstall_files]} </row>
|
31
|
+
|
32
|
+
</table>
|
33
|
+
<horizontal>
|
34
|
+
|
35
|
+
<button caption=#{Message[:list_files]} action=\"listinstalledfiles\"/>
|
36
|
+
|
37
|
+
</horizontal>
|
38
|
+
|
39
|
+
<p>%%filesresult%%</p>
|
40
|
+
|
41
|
+
</tab>"
|
42
|
+
|
43
|
+
|
44
|
+
|
@@ -0,0 +1,30 @@
|
|
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=#{Message[:save_changes]} action=\"saveconfigurationrecord\"/>
|
11
|
+
<button caption=\"Reload Variables\" action=\"loadconfigurationvariables\"/>
|
12
|
+
<button caption=#{Message[:help]} action=\"runhelpwindowtinkerwin2\"/>
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
</horizontal>
|
18
|
+
<table>
|
19
|
+
<textarea name=\"a_configurationfile\"/>
|
20
|
+
|
21
|
+
|
22
|
+
</table>
|
23
|
+
<p>%extraconfigdatadisplay%</p>
|
24
|
+
<p>
|
25
|
+
<p>%newconfigurationresult%</p>
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
</tab>"
|
30
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<tab name=\"diagnostictab\" caption=\"Diagnostic Tab\">
|
4
|
+
<horizontal>
|
5
|
+
<button caption=#{Message[:viewplatform_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,17 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<tab name=selectiontab caption=#{Message[:selection_tab]}>
|
4
|
+
<horizontal>
|
5
|
+
<button caption=#{Message[:showjump_links]} action=\"showjumplinkoptions\"/>
|
6
|
+
<button caption=#{Message[:help]} action=\"runhelpwindowtinkerwin2\"/>
|
7
|
+
</horizontal>
|
8
|
+
<table>
|
9
|
+
<select name=\"a_jumplinkinput\"> %%jumplinkoptions%% </select>
|
10
|
+
|
11
|
+
</table>
|
12
|
+
|
13
|
+
<horizontal>
|
14
|
+
<button caption=#{Message[:jumptoapplication_location]} action=\"runjumplinkcommand\"/>
|
15
|
+
</horizontal>
|
16
|
+
</tab>
|
17
|
+
"
|
@@ -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=#{Message[: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
|
+
<button caption=#{Message[:return]} action=returntomain/>
|
15
|
+
</horizontal>
|
16
|
+
|
17
|
+
</window>"
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
$rwdguivar=
|
2
|
+
"
|
3
|
+
<window name=tinkerhelpabout title=#{Message[:help_about]}>
|
4
|
+
<horizontal>
|
5
|
+
<button caption=#{Message[:showhelpabout_links]} action=\"setuphelpaboutoptions\"/>
|
6
|
+
|
7
|
+
</horizontal>
|
8
|
+
<table>
|
9
|
+
<select name=\"a_helpaboutinput\"> %%helpaboutoptions%% </select>
|
10
|
+
|
11
|
+
</table>
|
12
|
+
|
13
|
+
<horizontal>
|
14
|
+
<button caption=#{Message[:openselectedhelp_about]} action=\"runrwdtinkerversion\"/>
|
15
|
+
</horizontal>
|
16
|
+
</window>
|
17
|
+
"
|
data/init.rb
ADDED
@@ -0,0 +1,277 @@
|
|
1
|
+
|
2
|
+
#***********************************************************************
|
3
|
+
#* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
|
4
|
+
#* Copyright (c) 2004, 2005 by Steven Gibson. All Rights Reserved.
|
5
|
+
#*
|
6
|
+
#* This library is free software; you can redistribute it and/or
|
7
|
+
#* modify it under the terms of the GNU General Public
|
8
|
+
#* License as published by the Free Software Foundation; either
|
9
|
+
#* .
|
10
|
+
#*
|
11
|
+
#* These files are distributed in the hope that they will be useful,
|
12
|
+
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
#* General Public License for more details.
|
15
|
+
#*
|
16
|
+
#* You should have received a copy of the GNU General Public
|
17
|
+
#* License along with these files; if not, write to the Free Software
|
18
|
+
#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
+
#*
|
20
|
+
#* For further information please contact the author by e-mail
|
21
|
+
#* at "smalllinux@gmail.com".
|
22
|
+
#***********************************************************************/
|
23
|
+
|
24
|
+
require "lib/rwd/rwd"
|
25
|
+
require 'fileutils'
|
26
|
+
require 'lib/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
|
+
#load main config file
|
69
|
+
load 'rwdconfig.cnf'
|
70
|
+
|
71
|
+
Dir.chdir("configuration") #changes the current working directory
|
72
|
+
|
73
|
+
fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /dist$/) } #creates an Array separated with \n
|
74
|
+
@doc = ""
|
75
|
+
fileList.length.times{ #opening of a block
|
76
|
+
configdist =fileList.pop #pops the first item out of the Array
|
77
|
+
tempconfigfile = configdist.gsub(/\.dist$/, "")
|
78
|
+
confignew = tempconfigfile + ".cnf"
|
79
|
+
Rconftool::install(configdist,confignew) #integrates new file with old
|
80
|
+
} #closing block
|
81
|
+
# END of configuration integration
|
82
|
+
Dir.chdir($progdir)
|
83
|
+
|
84
|
+
# Read in the configuration files
|
85
|
+
Dir.chdir("configuration") #changes the current working directory
|
86
|
+
|
87
|
+
fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /cnf$/) } #creates an Array separated with \n
|
88
|
+
@doc = ""
|
89
|
+
fileList.length.times{ #opening of a block
|
90
|
+
fileName=fileList.pop #pops the first item out of the Array
|
91
|
+
load fileName #loads the the config file thats in fileName
|
92
|
+
} #closing block
|
93
|
+
# END of configuration reading
|
94
|
+
|
95
|
+
Dir.chdir($progdir) # change back to top program directory
|
96
|
+
|
97
|
+
# build the English Language hash file from the parts
|
98
|
+
languagehashvariable = 'Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
|
99
|
+
langmessage = {' + "\n"
|
100
|
+
startlangdir = File.join(LangDir,"en")
|
101
|
+
#get a list of the files and subdirectories on the starting directory only
|
102
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
103
|
+
#loop through the list, ignore the files and add all new directories found
|
104
|
+
alanghash.each do |x|
|
105
|
+
#if a directory...
|
106
|
+
if(test(?d,x))
|
107
|
+
# add to the original list of directories
|
108
|
+
@@tmproot = x + "/**"
|
109
|
+
#adds the new ones to the array
|
110
|
+
blanghash = Dir[@@tmproot].entries.sort
|
111
|
+
blanghash.each do |x|
|
112
|
+
if(test(?d,x))
|
113
|
+
alanghash.push(x) #appends to the end of the array...
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
alanghash.each do |x|
|
119
|
+
#if it is a file...
|
120
|
+
if(!test(?d,x))
|
121
|
+
alanghash.delete(x)
|
122
|
+
else #it is a directory...
|
123
|
+
findfiles(x + "/**")
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
#writes the contents of doc into the languagehashvariable
|
129
|
+
languagehashvariable = languagehashvariable + $tempdoc + "} ; langmessage.each { |kk, vv| Message[kk] = vv }"
|
130
|
+
|
131
|
+
# END of en Lang building
|
132
|
+
$tempdoc = " "
|
133
|
+
Dir.chdir($progdir) # change back to top program directory
|
134
|
+
|
135
|
+
# build the local Language hash file from the parts
|
136
|
+
startlangdir = File.join(LangDir,$lang)
|
137
|
+
#get a list of the files and subdirectories on the starting directory only
|
138
|
+
alanghash = Array.new(Dir[startlangdir].entries.sort)
|
139
|
+
#loop through the list, ignore the files and add all new directories found
|
140
|
+
alanghash.each do |x|
|
141
|
+
#if a directory...
|
142
|
+
if(test(?d,x))
|
143
|
+
# add to the original list of directories
|
144
|
+
@@tmproot = x + "/**"
|
145
|
+
#adds the new ones to the array
|
146
|
+
blanghash = Dir[@@tmproot].entries.sort
|
147
|
+
blanghash.each do |x|
|
148
|
+
if(test(?d,x))
|
149
|
+
alanghash.push(x) #appends to the end of the array...
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
alanghash.each do |x|
|
155
|
+
#if it is a file...
|
156
|
+
if(!test(?d,x))
|
157
|
+
alanghash.delete(x)
|
158
|
+
else #it is a directory...
|
159
|
+
findfiles(x + "/**")
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
#writes the contents of doc into the variable
|
165
|
+
languagehashvariable = languagehashvariable + " ; Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
|
166
|
+
|
167
|
+
|
168
|
+
$tempdoc = " "
|
169
|
+
|
170
|
+
Dir.chdir($progdir) # change back to top program directory
|
171
|
+
|
172
|
+
temp = eval( languagehashvariable )
|
173
|
+
|
174
|
+
$tempdoc = " "
|
175
|
+
|
176
|
+
# build the actual program from the code parts
|
177
|
+
#get a list of the files and subdirectories on the starting directory only
|
178
|
+
a = Array.new(Dir[CodeDir].entries.sort)
|
179
|
+
#loop through the list, ignore the files and add all new directories found
|
180
|
+
a.each do |x|
|
181
|
+
#if a directory...
|
182
|
+
if(test(?d,x))
|
183
|
+
# add to the original list of directories
|
184
|
+
@@root = x + "/**"
|
185
|
+
#adds the new ones to the array
|
186
|
+
b = Dir[@@root].entries.sort
|
187
|
+
b.each do |x|
|
188
|
+
if(test(?d,x))
|
189
|
+
a.push(x) #appends to the end of the array...
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
a.each do |x|
|
195
|
+
#if it is a file...
|
196
|
+
if(!test(?d,x))
|
197
|
+
a.delete(x)
|
198
|
+
else #it is a directory...
|
199
|
+
findfiles(x + "/**")
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
|
204
|
+
# load the program file
|
205
|
+
tempcoderesult = eval( $tempdoc )
|
206
|
+
|
207
|
+
# build the actual GUI from the gui parts
|
208
|
+
$tempdoc = " "
|
209
|
+
#get a list of the files and subdirectories on the starting directory only
|
210
|
+
a = Array.new(Dir[GuiDir].entries.sort)
|
211
|
+
#loop through the list, ignore the files and add all new directories found
|
212
|
+
a.each do |x|
|
213
|
+
#if a directory...
|
214
|
+
if(test(?d,x))
|
215
|
+
#use this new dir find to add to the original list of directories
|
216
|
+
@@root = x + "/**"
|
217
|
+
#adds the new ones to the array
|
218
|
+
b = Dir[@@root].entries.sort
|
219
|
+
b.each do |x|
|
220
|
+
if(test(?d,x))
|
221
|
+
a.push(x) #appends to the end of the array...
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
a.each do |x|
|
227
|
+
#if it is a file...
|
228
|
+
if(!test(?d,x))
|
229
|
+
a.delete(x)
|
230
|
+
|
231
|
+
else #it is a directory...
|
232
|
+
loadguifile(x + "/**")
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
# gui variable is done
|
237
|
+
guiRWD = ""
|
238
|
+
$rwd_gui_tinker = $tempdoc
|
239
|
+
require 'socket' # Network stuff
|
240
|
+
host = "127.0.0.1"
|
241
|
+
port = $port
|
242
|
+
|
243
|
+
# Create a socket to listen on and bind it to the host and port
|
244
|
+
freeportfound = false
|
245
|
+
until freeportfound
|
246
|
+
begin
|
247
|
+
@socket = UDPSocket::new()
|
248
|
+
@socket.bind(host, port)
|
249
|
+
freeportfound = true
|
250
|
+
$port = port
|
251
|
+
# Rescue the "Address in use" error
|
252
|
+
rescue Errno::EADDRINUSE
|
253
|
+
puts "RWD Startup: Port #{port} on host #{host} is already in use."
|
254
|
+
port=port +1
|
255
|
+
puts "trying port: #{port}"
|
256
|
+
# Rescue the "Address not available' error
|
257
|
+
rescue Errno::EADDRNOTAVAIL
|
258
|
+
puts "RWD Startup: Address #{host} is not available to bind."
|
259
|
+
port =port + 1
|
260
|
+
puts "trying port: #{port}"
|
261
|
+
# Rescue "permission denied errors
|
262
|
+
rescue Errno::EACCES
|
263
|
+
puts "RWD Startup: Access denied when binding interface addresses. ?"
|
264
|
+
port =port + 1
|
265
|
+
puts "trying port: #{port}"
|
266
|
+
# Rescue all other errors
|
267
|
+
rescue
|
268
|
+
puts "RWD Startup: An error occured."
|
269
|
+
port =port + 1
|
270
|
+
puts "trying port: #{port}"
|
271
|
+
# Rescue all other errors
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
275
|
+
|
276
|
+
|
277
|
+
RwdTinker.new( $rwd_gui_tinker ).serve(port) # start the main class and program
|