Bump for 3.6-28
[LibreOffice.git] / odk / util / check.pl
blob7811635067e1cb0f9db24908c68b9b54a3866cfd
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
29 # check - a perl script to check some files and directories if they exists
30 # A first simple check if the SDK was built completely.
32 #use IO::File;
34 $return = 0;
36 $StartDir = "$ARGV[0]";
37 $OperatingSystem = "$ARGV[1]";
38 $ExePrefix = "$ARGV[2]";
40 print "Check for $OperatingSystem\n";
42 if (-d "$StartDir") {
43 # check binaries
44 print "check binaries: ";
45 if (-d "$StartDir/bin") {
46 my @binarylist = ( "idlc","idlcpp","cppumaker","javamaker",
47 "regcompare","autodoc",
48 "unoapploader", "uno-skeletonmaker" );
50 foreach $i (@binarylist)
52 if (! -e "$StartDir/bin/$i$ExePrefix") {
53 $return++;
54 print "\nERROR: \"$StartDir/bin/$i$ExePrefix\" is missing\n";
55 } else {
56 print "+";
60 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
61 if ($OperatingSystem eq "windows" && ! -e "$StartDir/bin/climaker.exe") {
62 $return++;
63 print "\nERROR: \"$StartDir/bin/climaker.exe\" is missing\n";
64 } else {
65 print "+";
68 if ($OperatingSystem eq "macosx") {
69 if (! -e "$StartDir/bin/addsym-macosx.sh") {
70 $return++;
71 print "\nERROR: \"$StartDir/bin/addsym-macosx.sh\" is missing\n";
72 } else {
73 print "+";
76 } else {
77 $return++;
79 print "\n";
81 # packaging files
82 print "check packaging files: ";
83 if (-d "$StartDir/docs") {
84 my @filelist = ( "install.html",
85 "notsupported.html","sdk_styles.css","tools.html",
86 "images/arrow-1.gif", "images/arrow-3.gif",
87 "images/odk-footer-logo.gif",
88 "images/bg_table.png","images/bg_table2.png",
89 "images/bg_table3.png", "images/nav_down.png",
90 "images/nav_home.png","images/nav_left.png",
91 "images/nav_right.png","images/nav_up.png",
92 "images/sdk_head-1.png", "images/sdk_head-2.png",
93 "images/sdk_line-1.gif", "images/sdk_line-2.gif",
94 "common/ref/idl.css", "images/nada.gif",
95 "images/arrow-2.gif", "images/bluball.gif",
96 "images/orc-main-app_32.png", "images/ooo-main-app_32.png");
98 foreach $i (@filelist)
100 if (! -e "$StartDir/docs/$i") {
101 $return++;
102 print "\nERROR: \"$StartDir/docs/$i\" is missing\n";
103 } else {
104 print "+";
107 } else {
108 $return++;
110 print "\n";
112 #check configure files
113 print "check config files: ";
114 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
115 if (! -e "$StartDir/setsdkenv_windows.bat") {
116 print "\nERROR: \"$StartDir/setsdkenv_windows.bat\" is missing\n";
117 $return++;
119 if (! -e "$StartDir/setsdkenv_windows.template") {
120 print "\nERROR: \"$StartDir/setsdkenv_windows.template\" is missing\n";
121 $return++;
123 if (! -e "$StartDir/cfgWin.js") {
124 print "\nERROR: \"$StartDir/cfgWin.js\" is missing\n";
125 $return++;
127 } else {
128 if (! -e "$StartDir/configure.pl") {
129 print "\nERROR: \"$StartDir/configure.pl\" is missing\n";
130 $return++;
132 if (! -e "$StartDir/config.guess") {
133 print "\nERROR: \"$StartDir/config.guess\" is missing\n";
134 $return++;
136 if (! -e "$StartDir/config.sub") {
137 print "\nERROR: \"$StartDir/config.sub\" is missing\n";
138 $return++;
140 if (! -e "$StartDir/setsdkenv_unix") {
141 print "\nERROR: \"$StartDir/setsdkenv_unix\" is missing\n";
142 $return++;
144 if (! -e "$StartDir/setsdkenv_unix.sh.in") {
145 print "\nERROR: \"$StartDir/setsdkenv_unix.sh.in\" is missing\n";
146 $return++;
148 if (! -e "$StartDir/setsdkenv_unix.csh.in") {
149 print "\nERROR: \"$StartDir/setsdkenv_unix.csh.in\" is missing\n";
150 $return++;
153 print "\n";
155 #check setting files
156 print "check setting files: ";
157 if (-d "$StartDir/settings") {
158 if (! -e "$StartDir/settings/settings.mk") {
159 print "\nERROR: \"$StartDir/settings/settings.mk\" is missing\n";
160 $return++;
162 if (! -e "$StartDir/settings/std.mk") {
163 print "\nERROR: \"$StartDir/settings/std.mk\" is missing\n";
164 $return++;
166 if (! -e "$StartDir/settings/stdtarget.mk") {
167 print "\nERROR: \"$StartDir/settings/stdtarget.mk\" is missing\n";
168 $return++;
170 } else {
171 $return++;
173 print "\n";
175 #check cpp docu, it is only a first and simple check
176 # improvement required
177 if ($ENV{'DOXYGEN'} ne '') {
178 print "check cpp docu: ";
179 if (-d "$StartDir/docs/cpp/ref") {
180 if (! -e "$StartDir/docs/cpp/ref/index.html") {
181 print "\nERROR: \"$StartDir/docs/cpp/ref/index.html\" is missing\n";
182 $return++;
184 } else {
185 $return++;
187 print "\n";
190 #check java docu, it is only a first and simple check
191 # improvement required
192 my $solar_java = $ENV{"SOLAR_JAVA"};
193 my $JDK = $ENV{"JDK"};
194 if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) {
195 print "check java docu: ";
196 if (-d "$StartDir/docs/java/ref") {
197 if (! -e "$StartDir/docs/java/ref/index.html") {
198 print "\nERROR: \"$StartDir/docs/java/ref/index.html\" is missing\n";
199 $return++;
202 my @dir_list = ( "lib","lib/uno","lib/uno/helper","lib/uno/helper/class-use",
203 "uno","uno/class-use","comp","comp/helper",
204 "comp/helper/class-use");
206 foreach $i (@dir_list)
208 if (! -d "$StartDir/docs/java/ref/com/sun/star/$i") {
209 $return++;
210 print "\nERROR: \"$StartDir/docs/java/ref/com/sun/star/$i\" is missing\n";
211 } else {
212 print "+";
215 } else {
216 $return++;
218 print "\n";
221 #check idl docu, it is only a first and simple check
222 # improvement required
223 print "check idl docu: ";
224 if (-d "$StartDir/docs/common/ref") {
225 if (! -e "$StartDir/docs/common/ref/module-ix.html") {
226 print "\nERROR: \"$StartDir/docs/common/ref/module-ix.html\" is missing\n";
227 $return++;
229 if (! -d "$StartDir/docs/common/ref/index-files") {
230 print "\nERROR: \"$StartDir/docs/common/ref/index-files\" is missing\n";
231 $return++;
233 if (! -e "$StartDir/docs/common/ref/index-files/index-10.html") {
234 print "\nERROR: \"$StartDir/docs/common/ref/index-files/index-10.html\" is missing\n";
235 $return++;
238 my @idl_dirlist = ( "accessibility",
239 "animations",
240 "auth",
241 "awt",
242 "awt/tab",
243 "awt/tree",
244 "awt/grid",
245 "beans",
246 "bridge",
247 "bridge/oleautomation",
248 "chart",
249 "chart2",
250 "chart2/data",
251 "configuration",
252 "configuration/backend",
253 "configuration/backend/xml",
254 "configuration/bootstrap",
255 "connection",
256 "container",
257 "datatransfer",
258 "datatransfer/clipboard",
259 "datatransfer/dnd",
260 "deployment",
261 "deployment/ui",
262 "document",
263 "drawing",
264 "drawing/framework",
265 "embed",
266 "form",
267 "form/binding",
268 "form/component",
269 "form/control",
270 "form/inspection",
271 "form/runtime",
272 "form/submission",
273 "form/validation",
274 "formula",
275 "frame",
276 "frame/status",
277 "gallery",
278 "geometry",
279 "graphic",
280 "i18n",
281 "image",
282 "inspection",
283 "installation",
284 "io",
285 "java",
286 "lang",
287 "ldap",
288 "linguistic2",
289 "loader",
290 "logging",
291 "mail",
292 "media",
293 "mozilla",
294 "packages",
295 "packages/manifest",
296 "packages/zip",
297 "plugin",
298 "presentation",
299 "reflection",
300 "registry",
301 "rendering",
302 "report",
303 "report/inspection",
304 "resource",
305 "scanner",
306 "script",
307 "script/browse",
308 "script/provider",
309 "sdb",
310 "sdb/application",
311 "sdb/tools",
312 "sdbc",
313 "sdbcx",
314 "security",
315 "setup",
316 "sheet",
317 "smarttags",
318 "style",
319 "svg",
320 "sync",
321 "sync2",
322 "system",
323 "table",
324 "task",
325 "test",
326 "test/bridge",
327 "test/performance",
328 "text",
329 "text/fieldmaster",
330 "text/textfield",
331 "text/textfield/docinfo",
332 "ucb",
333 "ui",
334 "ui/dialogs",
335 "uno",
336 "uri",
337 "util",
338 "util/logging",
339 "view",
340 "xforms",
341 "xml",
342 "xml/crypto",
343 "xml/crypto/sax",
344 "xml/csax",
345 "xml/dom",
346 "xml/dom/events",
347 "xml/dom/views",
348 "xml/input",
349 "xml/sax",
350 "xml/wrapper",
351 "xml/xpath",
352 "xsd" );
354 foreach $i (@idl_dirlist)
356 if (! -d "$StartDir/docs/common/ref/com/sun/star/$i") {
357 $return++;
358 print "\nERROR: \"$StartDir/docs/common/ref/com/sun/star/$i\" is missing\n";
359 } else {
360 print "+";
363 } else {
364 $return++;
366 print "\n";
368 } else {
369 $return++;
372 if( $return != 0 )
374 print "ERROR\n";
375 unlink "$ARGV[3]";
376 } else {
377 print "OK\n";
379 exit $return;