blob: b1b44c539108fc38fe955dd95ec94185682c347e (
plain)
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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>Gubed_install</class>
<comment>Simple script to make installation of the Gubed PHP debugger server easier.</comment>
<author>(C) 2004 Andras Mantia <[email protected]></author>
<widget class="Dialog">
<property name="name">
<cstring>Gubed_install</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>578</width>
<height>327</height>
</rect>
</property>
<property name="caption">
<string>Gubed Installation v0.1</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>
</string>
</stringlist>
</property>
<widget class="CloseButton">
<property name="name">
<cstring>CancelButton</cstring>
</property>
<property name="geometry">
<rect>
<x>490</x>
<y>289</y>
<width>77</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>&Cancel</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<spacer>
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>332</width>
<height>0</height>
</size>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>302</y>
<width>332</width>
<height>16</height>
</rect>
</property>
</spacer>
<spacer>
<property name="name">
<cstring>Spacer2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>175</height>
</size>
</property>
<property name="geometry">
<rect>
<x>416</x>
<y>108</y>
<width>16</width>
<height>175</height>
</rect>
</property>
</spacer>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>11</y>
<width>556</width>
<height>62</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="text">
<string>Target directory:</string>
</property>
</widget>
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="text">
<string>Archive name:</string>
</property>
</widget>
<widget class="FileSelector" row="0" column="1">
<property name="name">
<cstring>gubedArchive</cstring>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@widgetText</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
<string>Select the archive containing Gubed (tar.bz2 format)</string>
</property>
</widget>
<widget class="FileSelector" row="1" column="1">
<property name="name">
<cstring>targetDirectory</cstring>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@widgetText</string>
</stringlist>
</property>
<property name="selectionType">
<enum>Directory</enum>
</property>
<property name="toolTip" stdset="0">
<string>The target directory (example /var/www)</string>
</property>
</widget>
</grid>
</widget>
<widget class="CheckBox">
<property name="name">
<cstring>runServerCheck</cstring>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>79</y>
<width>473</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Run the server after installation has finished</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>RUN_SERVER=false</string>
<string></string>
<string>RUN_SERVER=true</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
<string>If checked the server will be run in the background after the installation has finished</string>
</property>
</widget>
<widget class="CheckBox">
<property name="name">
<cstring>logViewCheck</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<width>340</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>View installation log</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
<string></string>
<string>VIEW_LOG=true</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
<string>Uncheck this if you do not want to see the installation log. The log may provide important information in case of installation failure.</string>
</property>
</widget>
<widget class="CloseButton">
<property name="name">
<cstring>InstallButton</cstring>
</property>
<property name="geometry">
<rect>
<x>349</x>
<y>289</y>
<width>135</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>&Start Installation</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@logViewCheck
@runServerCheck
echo "Archive name: @gubedArchive"
echo "Target directory: @targetDirectory"
mkdir /tmp/gubed-install
cd /tmp/gubed-install
echo "Extracting the archive..." > /tmp/gubed-install-log
tar xfj @gubedArchive >> /tmp/gubed-install-log
dirName=`ls`
cd $dirName
echo "Compiling the server..." >> /tmp/gubed-install-log
cd Server
echo "Running autogen.sh..." >> /tmp/gubed-install-log
./autogen.sh >> /tmp/gubed-install-log
echo "Running configure..." >> /tmp/gubed-install-log
./configure >> /tmp/gubed-install-log
echo "Running make..." >> /tmp/gubed-install-log
make >> /tmp/gubed-install-log
echo "Installing the server..." >> /tmp/gubed-install-log
cd /tmp/gubed-install
cp -r $dirName "@targetDirectory"
if test "$RUN_SERVER" == "true"
then
echo "Running the server..." >> /tmp/gubed-install-log
cd "@targetDirectory"
cd $dirName
cd Server/src
./gbdServer &
fi
if test "$VIEW_LOG" == "true"
then
kwrite /tmp/gubed-install-log &
sleep 10
fi
echo "Cleaning up..."
rm /tmp/gubed-install-log
cd /tmp/gubed-install
find . | xargs rm -f > /dev/null
cd /tmp/gubed-install
cd $dirName
rm -f "docs/Theory of operation" > /dev/null
cd /tmp/gubed-install
find . | xargs rmdir -p > /dev/null
rmdir /tmp/gubed-install > /dev/null
</string>
</stringlist>
</property>
<property name="writeStdout">
<bool>true</bool>
</property>
</widget>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>
|