1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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.
40 $StartDir = "$ARGV[0]";
41 $OperatingSystem = "$ARGV[1]";
42 $ExePrefix = "$ARGV[2]";
44 print "Check for $OperatingSystem\n";
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") {
58 print "\nERROR: \"$StartDir/bin/$i$ExePrefix\" is missing\n";
64 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
65 if ($OperatingSystem eq "windows" && ! -e
"$StartDir/bin/climaker.exe") {
67 print "\nERROR: \"$StartDir/bin/climaker.exe\" is missing\n";
72 if ($OperatingSystem eq "macosx") {
73 if (! -e
"$StartDir/bin/addsym-macosx.sh") {
75 print "\nERROR: \"$StartDir/bin/addsym-macosx.sh\" is missing\n";
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") {
106 print "\nERROR: \"$StartDir/docs/$i\" is missing\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";
123 if (! -e
"$StartDir/setsdkenv_windows.template") {
124 print "\nERROR: \"$StartDir/setsdkenv_windows.template\" is missing\n";
127 if (! -e
"$StartDir/cfgWin.js") {
128 print "\nERROR: \"$StartDir/cfgWin.js\" is missing\n";
132 if (! -e
"$StartDir/configure.pl") {
133 print "\nERROR: \"$StartDir/configure.pl\" is missing\n";
136 if (! -e
"$StartDir/config.guess") {
137 print "\nERROR: \"$StartDir/config.guess\" is missing\n";
140 if (! -e
"$StartDir/config.sub") {
141 print "\nERROR: \"$StartDir/config.sub\" is missing\n";
144 if (! -e
"$StartDir/setsdkenv_unix") {
145 print "\nERROR: \"$StartDir/setsdkenv_unix\" is missing\n";
148 if (! -e
"$StartDir/setsdkenv_unix.sh.in") {
149 print "\nERROR: \"$StartDir/setsdkenv_unix.sh.in\" is missing\n";
152 if (! -e
"$StartDir/setsdkenv_unix.csh.in") {
153 print "\nERROR: \"$StartDir/setsdkenv_unix.csh.in\" is missing\n";
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";
166 if (! -e
"$StartDir/settings/std.mk") {
167 print "\nERROR: \"$StartDir/settings/std.mk\" is missing\n";
170 if (! -e
"$StartDir/settings/stdtarget.mk") {
171 print "\nERROR: \"$StartDir/settings/stdtarget.mk\" is missing\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";
187 if (! -d
"$StartDir/docs/cpp/ref/index-files") {
188 print "\nERROR: \"$StartDir/docs/cpp/ref/index-files\" is missing\n";
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";
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") {
292 print "\nERROR: \"$StartDir/docs/cpp/ref/names/$i\" is missing\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";
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") {
322 print "\nERROR: \"$StartDir/docs/java/ref/com/sun/star/$i\" is missing\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";
341 if (! -d
"$StartDir/docs/common/ref/index-files") {
342 print "\nERROR: \"$StartDir/docs/common/ref/index-files\" is missing\n";
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";
350 my @idl_dirlist = ( "accessibility",
357 "bridge/oleautomation",
362 "configuration/backend",
363 "configuration/backend/xml",
364 "configuration/bootstrap",
368 "datatransfer/clipboard",
441 "text/textfield/docinfo",
464 foreach $i (@idl_dirlist)
466 if (! -d
"$StartDir/docs/common/ref/com/sun/star/$i") {
468 print "\nERROR: \"$StartDir/docs/common/ref/com/sun/star/$i\" is missing\n";