update dev300-m58
[ooovba.git] / odk / util / check.pl
blobf302b4649fd385815e6e0f656ad3d7076aa11972
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: check.pl,v $
11 # $Revision: 1.26.8.1 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
33 # check - a perl script to check some files and directories if they exists
34 # A first simple check if the SDK was built completely.
36 #use IO::File;
38 $return = 0;
40 $StartDir = "$ARGV[0]";
41 $OperatingSystem = "$ARGV[1]";
42 $ExePrefix = "$ARGV[2]";
44 print "Check for $OperatingSystem\n";
46 if (-d "$StartDir") {
47 # check binaries
48 print "check binaries: ";
49 if (-d "$StartDir/bin") {
50 my @binarylist = ( "idlc","idlcpp","cppumaker","javamaker",
51 "regcompare","autodoc",
52 "unoapploader", "uno-skeletonmaker" );
54 foreach $i (@binarylist)
56 if (! -e "$StartDir/bin/$i$ExePrefix") {
57 $return++;
58 print "\nERROR: \"$StartDir/bin/$i$ExePrefix\" is missing\n";
59 } else {
60 print "+";
64 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
65 if ($OperatingSystem eq "windows" && ! -e "$StartDir/bin/climaker.exe") {
66 $return++;
67 print "\nERROR: \"$StartDir/bin/climaker.exe\" is missing\n";
68 } else {
69 print "+";
72 if ($OperatingSystem eq "macosx") {
73 if (! -e "$StartDir/bin/addsym-macosx.sh") {
74 $return++;
75 print "\nERROR: \"$StartDir/bin/addsym-macosx.sh\" is missing\n";
76 } else {
77 print "+";
80 } else {
81 $return++;
83 print "\n";
85 # packaging files
86 print "check packaging files: ";
87 if (-d "$StartDir/docs") {
88 my @filelist = ( "install.html",
89 "notsupported.html","sdk_styles.css","tools.html",
90 "images/arrow-1.gif", "images/arrow-3.gif",
91 "images/bg_table.gif","images/bg_table2.gif",
92 "images/bg_table3.gif", "images/nav_down.png",
93 "images/nav_home.png","images/nav_left.png",
94 "images/nav_right.png","images/nav_up.png",
95 "images/sdk_head-1.gif", "images/sdk_head-2.gif",
96 "images/sdk_head-3.gif", "images/sdk_line-1.gif",
97 "images/sdk_line-2.gif", "common/ref/idl.css",
98 "images/nada.gif","images/arrow-2.gif",
99 "images/bluball.gif","images/so-main-app_32.png",
100 "images/ooo-main-app_32.png");
102 foreach $i (@filelist)
104 if (! -e "$StartDir/docs/$i") {
105 $return++;
106 print "\nERROR: \"$StartDir/docs/$i\" is missing\n";
107 } else {
108 print "+";
111 } else {
112 $return++;
114 print "\n";
116 #check configure files
117 print "check config files: ";
118 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
119 if (! -e "$StartDir/setsdkenv_windows.bat") {
120 print "\nERROR: \"$StartDir/setsdkenv_windows.bat\" is missing\n";
121 $return++;
123 if (! -e "$StartDir/setsdkenv_windows.template") {
124 print "\nERROR: \"$StartDir/setsdkenv_windows.template\" is missing\n";
125 $return++;
127 if (! -e "$StartDir/cfgWin.js") {
128 print "\nERROR: \"$StartDir/cfgWin.js\" is missing\n";
129 $return++;
131 } else {
132 if (! -e "$StartDir/configure.pl") {
133 print "\nERROR: \"$StartDir/configure.pl\" is missing\n";
134 $return++;
136 if (! -e "$StartDir/config.guess") {
137 print "\nERROR: \"$StartDir/config.guess\" is missing\n";
138 $return++;
140 if (! -e "$StartDir/config.sub") {
141 print "\nERROR: \"$StartDir/config.sub\" is missing\n";
142 $return++;
144 if (! -e "$StartDir/setsdkenv_unix") {
145 print "\nERROR: \"$StartDir/setsdkenv_unix\" is missing\n";
146 $return++;
148 if (! -e "$StartDir/setsdkenv_unix.sh.in") {
149 print "\nERROR: \"$StartDir/setsdkenv_unix.sh.in\" is missing\n";
150 $return++;
152 if (! -e "$StartDir/setsdkenv_unix.csh.in") {
153 print "\nERROR: \"$StartDir/setsdkenv_unix.csh.in\" is missing\n";
154 $return++;
157 print "\n";
159 #check setting files
160 print "check setting files: ";
161 if (-d "$StartDir/settings") {
162 if (! -e "$StartDir/settings/settings.mk") {
163 print "\nERROR: \"$StartDir/settings/settings.mk\" is missing\n";
164 $return++;
166 if (! -e "$StartDir/settings/std.mk") {
167 print "\nERROR: \"$StartDir/settings/std.mk\" is missing\n";
168 $return++;
170 if (! -e "$StartDir/settings/stdtarget.mk") {
171 print "\nERROR: \"$StartDir/settings/stdtarget.mk\" is missing\n";
172 $return++;
174 } else {
175 $return++;
177 print "\n";
179 #check cpp docu, it is only a first and simple check
180 # improvement required
181 print "check cpp docu: ";
182 if (-d "$StartDir/docs/cpp/ref") {
183 if (! -e "$StartDir/docs/cpp/ref/index.html") {
184 print "\nERROR: \"$StartDir/docs/cpp/ref/index.html\" is missing\n";
185 $return++;
187 if (! -d "$StartDir/docs/cpp/ref/index-files") {
188 print "\nERROR: \"$StartDir/docs/cpp/ref/index-files\" is missing\n";
189 $return++;
191 if (! -e "$StartDir/docs/cpp/ref/index-files/index-10.html") {
192 print "\nERROR: \"$StartDir/docs/cpp/ref/index-files/index-10.html\" is missing\n";
193 $return++;
196 my @dir_list = ( "com","com/sun","com/sun/star","com/sun/star/uno",
197 "com/sun/star/uno/Any","com/sun/star/uno/Type",
198 "com/sun/star/uno/Array","com/sun/star/uno/WeakReferenceHelper",
199 "com/sun/star/uno/Reference","com/sun/star/uno/WeakReference",
200 "com/sun/star/uno/Environment","com/sun/star/uno/Sequence",
201 "com/sun/star/uno/BaseReference","com/sun/star/uno/Mapping",
202 "com/sun/star/uno/ContextLayer","com/sun/star/uno/TypeDescription",
203 "osl","osl/File","osl/Pipe","osl/FileStatus","osl/FileBase",
204 "osl/Guard","osl/Mutex","osl/VolumeInfo","osl/GetGlobalMutex",
205 "osl/Security","osl/Profile","osl/DatagramSocket","osl/SocketAddr",
206 "osl/StreamPipe","osl/ResettableGuard","osl/AcceptorSocket",
207 "osl/ClearableGuard","osl/VolumeDevice","rtl","rtl/Uri","rtl/math",
208 "rtl/OUStringHash","rtl/MalformedUriException","rtl/OUStringBuffer",
209 "rtl/OUString","rtl/Reference","rtl/ByteSequence","rtl/OLocale",
210 "rtl/Logfile","rtl/OString","rtl/IReference","rtl/OStringBuffer",
211 "rtl/OStringHash","_typelib_CompoundTypeDescription","cppu",
212 "cppu/ContextEntry_Init","cppu/ImplInheritanceHelper10",
213 "cppu/ImplInheritanceHelper11","cppu/ImplInheritanceHelper12",
214 "cppu/WeakAggImplHelper1","cppu/WeakAggImplHelper2",
215 "cppu/WeakAggImplHelper3","cppu/WeakAggImplHelper4",
216 "cppu/WeakAggImplHelper5","cppu/WeakAggImplHelper6",
217 "cppu/WeakAggImplHelper7","cppu/WeakAggImplHelper8",
218 "cppu/WeakAggImplHelper9",
219 "cppu/OMultiTypeInterfaceContainerHelperInt32","cppu/AccessControl",
220 "cppu/OPropertyArrayHelper","cppu/ImplHelper1","cppu/ImplHelper2",
221 "cppu/ImplHelper3","cppu/ImplHelper4","cppu/ImplHelper5",
222 "cppu/ImplHelper6","cppu/ImplHelper7","cppu/ImplHelper8",
223 "cppu/ImplHelper9","cppu/WeakComponentImplHelper10",
224 "cppu/WeakComponentImplHelper11","cppu/WeakComponentImplHelper12",
225 "cppu/UnoUrl","cppu/WeakComponentImplHelper1",
226 "cppu/WeakComponentImplHelper2","cppu/WeakComponentImplHelper3",
227 "cppu/WeakComponentImplHelper4","cppu/WeakComponentImplHelper5",
228 "cppu/WeakComponentImplHelper6","cppu/WeakComponentImplHelper7",
229 "cppu/WeakComponentImplHelper8","cppu/WeakComponentImplHelper9",
230 "cppu/OInterfaceIteratorHelper",
231 "cppu/OMultiTypeInterfaceContainerHelper","cppu/UnoUrlDescriptor",
232 "cppu/IPropertyArrayHelper","cppu/OBroadcastHelperVar",
233 "cppu/OComponentHelper","cppu/OWeakAggObject",
234 "cppu/ImplementationEntry","cppu/WeakImplHelper10",
235 "cppu/WeakImplHelper11","cppu/WeakImplHelper12",
236 "cppu/OPropertySetHelper","cppu/ImplHelper10","cppu/ImplHelper11",
237 "cppu/ImplHelper12","cppu/WeakAggImplHelper10",
238 "cppu/WeakAggImplHelper11","cppu/WeakAggImplHelper12",
239 "cppu/ImplInheritanceHelper1","cppu/ImplInheritanceHelper2",
240 "cppu/ImplInheritanceHelper3","cppu/ImplInheritanceHelper4",
241 "cppu/ImplInheritanceHelper5","cppu/ImplInheritanceHelper6",
242 "cppu/ImplInheritanceHelper7","cppu/ImplInheritanceHelper8",
243 "cppu/ImplInheritanceHelper9","cppu/OTypeCollection",
244 "cppu/WeakAggComponentImplHelper10",
245 "cppu/WeakAggComponentImplHelper11",
246 "cppu/WeakAggComponentImplHelper12",
247 "cppu/WeakAggComponentImplHelper1",
248 "cppu/WeakAggComponentImplHelper2",
249 "cppu/WeakAggComponentImplHelper3",
250 "cppu/WeakAggComponentImplHelper4",
251 "cppu/WeakAggComponentImplHelper5",
252 "cppu/WeakAggComponentImplHelper6",
253 "cppu/WeakAggComponentImplHelper7",
254 "cppu/WeakAggComponentImplHelper8",
255 "cppu/WeakAggComponentImplHelper9",
256 "cppu/OMultiTypeInterfaceContainerHelperVar",
257 "cppu/OInterfaceContainerHelper","cppu/OImplementationId",
258 "cppu/AggImplInheritanceHelper1","cppu/AggImplInheritanceHelper2",
259 "cppu/AggImplInheritanceHelper3","cppu/AggImplInheritanceHelper4",
260 "cppu/AggImplInheritanceHelper5","cppu/AggImplInheritanceHelper6",
261 "cppu/AggImplInheritanceHelper7","cppu/AggImplInheritanceHelper8",
262 "cppu/AggImplInheritanceHelper9","cppu/AggImplInheritanceHelper10",
263 "cppu/AggImplInheritanceHelper11","cppu/AggImplInheritanceHelper12",
264 "cppu/WeakImplHelper1","cppu/WeakImplHelper2","cppu/WeakImplHelper3",
265 "cppu/WeakImplHelper4","cppu/WeakImplHelper5","cppu/WeakImplHelper6",
266 "cppu/WeakImplHelper7","cppu/WeakImplHelper8","cppu/WeakImplHelper9",
267 "cppu/OWeakObject","__store_FindData","_rtl_StandardModuleCount",
268 "RTUik","RTConstValue","_typelib_TypeDescriptionReference",
269 "_typelib_InterfaceMethodTypeDescription","store","RegistryKey",
270 "_typelib_Union_Init","_sal_Sequence","_typelib_Parameter_Init",
271 "_typelib_TypeDescription","_uno_Environment",
272 "_typelib_InterfaceAttributeTypeDescription","uno_Context",
273 "_rtl_ModuleCount","_uno_ExtEnvironment",
274 "_typelib_IndirectTypeDescription","remote_DisposingListener",
275 "remote_Interface","Registry_Api","_oslFileStatus",
276 "_typelib_InterfaceMemberTypeDescription","RegistryValueList",
277 "RegistryTypeWriter_Api","_rtl_TextEncodingInfo",
278 "namespace_anonymous_1","remote_Connection",
279 "_oslVolumeInfo","_uno_Interface",
280 "_typelib_InterfaceTypeDescription","_uno_Mapping","Registry",
281 "RegistryTypeReader_Api","remote_Context","_typelib_Uik",
282 "remote_InstanceProvider","_typelib_ArrayTypeDescription",
283 "RegistryKeyArray","RegistryTypeReader","RegistryKeyNames",
284 "RTConstValueUnion","_typelib_UnionTypeDescription","_uno_Any",
285 "RegistryTypeWriter","_rtl_Locale","_typelib_CompoundMember_Init",
286 "_typelib_EnumTypeDescription","_typelib_MethodParameter");
288 foreach $i (@dir_list)
290 if (! -d "$StartDir/docs/cpp/ref/names/$i") {
291 $return++;
292 print "\nERROR: \"$StartDir/docs/cpp/ref/names/$i\" is missing\n";
293 } else {
294 print "+";
297 } else {
298 $return++;
300 print "\n";
302 #check java docu, it is only a first and simple check
303 # improvement required
304 my $solar_java = $ENV{"SOLAR_JAVA"};
305 my $JDK = $ENV{"JDK"};
306 if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) {
307 print "check java docu: ";
308 if (-d "$StartDir/docs/java/ref") {
309 if (! -e "$StartDir/docs/java/ref/index.html") {
310 print "\nERROR: \"$StartDir/docs/java/ref/index.html\" is missing\n";
311 $return++;
314 my @dir_list = ( "lib","lib/uno","lib/uno/helper","lib/uno/helper/class-use",
315 "uno","uno/class-use","comp","comp/helper",
316 "comp/helper/class-use");
318 foreach $i (@dir_list)
320 if (! -d "$StartDir/docs/java/ref/com/sun/star/$i") {
321 $return++;
322 print "\nERROR: \"$StartDir/docs/java/ref/com/sun/star/$i\" is missing\n";
323 } else {
324 print "+";
327 } else {
328 $return++;
330 print "\n";
333 #check idl docu, it is only a first and simple check
334 # improvement required
335 print "check idl docu: ";
336 if (-d "$StartDir/docs/common/ref") {
337 if (! -e "$StartDir/docs/common/ref/module-ix.html") {
338 print "\nERROR: \"$StartDir/docs/common/ref/module-ix.html\" is missing\n";
339 $return++;
341 if (! -d "$StartDir/docs/common/ref/index-files") {
342 print "\nERROR: \"$StartDir/docs/common/ref/index-files\" is missing\n";
343 $return++;
345 if (! -e "$StartDir/docs/common/ref/index-files/index-10.html") {
346 print "\nERROR: \"$StartDir/docs/common/ref/index-files/index-10.html\" is missing\n";
347 $return++;
350 my @idl_dirlist = ( "accessibility",
351 "animations",
352 "auth",
353 "awt",
354 "awt/tree",
355 "beans",
356 "bridge",
357 "bridge/oleautomation",
358 "chart",
359 "chart2",
360 "chart2/data",
361 "configuration",
362 "configuration/backend",
363 "configuration/backend/xml",
364 "configuration/bootstrap",
365 "connection",
366 "container",
367 "datatransfer",
368 "datatransfer/clipboard",
369 "datatransfer/dnd",
370 "deployment",
371 "deployment/ui",
372 "document",
373 "drawing",
374 "drawing/framework",
375 "embed",
376 "form",
377 "form/binding",
378 "form/component",
379 "form/control",
380 "form/inspection",
381 "form/runtime",
382 "form/submission",
383 "form/validation",
384 "formula",
385 "frame",
386 "frame/status",
387 "gallery",
388 "geometry",
389 "graphic",
390 "i18n",
391 "image",
392 "inspection",
393 "installation",
394 "io",
395 "java",
396 "lang",
397 "ldap",
398 "linguistic2",
399 "loader",
400 "logging",
401 "mail",
402 "media",
403 "mozilla",
404 "packages",
405 "packages/manifest",
406 "packages/zip",
407 "plugin",
408 "presentation",
409 "reflection",
410 "registry",
411 "rendering",
412 "report",
413 "report/inspection",
414 "resource",
415 "scanner",
416 "script",
417 "script/browse",
418 "script/provider",
419 "sdb",
420 "sdb/application",
421 "sdb/tools",
422 "sdbc",
423 "sdbcx",
424 "security",
425 "setup",
426 "sheet",
427 "smarttags",
428 "style",
429 "svg",
430 "sync",
431 "sync2",
432 "system",
433 "table",
434 "task",
435 "test",
436 "test/bridge",
437 "test/performance",
438 "text",
439 "text/fieldmaster",
440 "text/textfield",
441 "text/textfield/docinfo",
442 "ucb",
443 "ui",
444 "ui/dialogs",
445 "uno",
446 "uri",
447 "util",
448 "util/logging",
449 "view",
450 "xforms",
451 "xml",
452 "xml/crypto",
453 "xml/crypto/sax",
454 "xml/csax",
455 "xml/dom",
456 "xml/dom/events",
457 "xml/dom/views",
458 "xml/input",
459 "xml/sax",
460 "xml/wrapper",
461 "xml/xpath",
462 "xsd" );
464 foreach $i (@idl_dirlist)
466 if (! -d "$StartDir/docs/common/ref/com/sun/star/$i") {
467 $return++;
468 print "\nERROR: \"$StartDir/docs/common/ref/com/sun/star/$i\" is missing\n";
469 } else {
470 print "+";
473 } else {
474 $return++;
476 print "\n";
478 } else {
479 $return++;
482 if( $return != 0 )
484 print "ERROR\n";
485 unlink "$ARGV[3]";
486 } else {
487 print "OK\n";
489 exit $return;