fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / odk / util / check.pl
blobb8f10749ebc06e75cb51f13bb80f5660ab33bc11
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # check - a perl script to check some files and directories if they exists
21 # A first simple check if the SDK was built completely.
24 $return = 0;
26 $SdkDir = "$ARGV[0]";
27 $OperatingSystem = "$ARGV[1]";
28 $ExePrefix = "$ARGV[2]";
30 sub check_file
32 my ($file) = @_;
33 return -e "$SdkDir/$file";
36 sub check_dir
38 my ($dir) = @_;
39 return -d "$SdkDir/$dir";
42 print "Check for $OperatingSystem\n";
44 if (-d "$SdkDir") {
45 # check binaries
46 print "check binaries: ";
47 if (check_dir("bin")) {
48 my @binarylist = ( "idlc","cppumaker","javamaker",
49 "regcompare",
50 "unoapploader", "uno-skeletonmaker" );
51 if ($ENV{SYSTEM_UCPP} eq "") {
52 push @binarylist,"ucpp";
55 foreach $i (@binarylist)
57 if (!check_file("bin/$i$ExePrefix")) {
58 $return++;
59 print "\nERROR: \"bin/$i$ExePrefix\" is missing\n";
60 } else {
61 print "+";
65 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
66 if ($OperatingSystem eq "windows" && !check_file("bin/climaker.exe")) {
67 $return++;
68 print "\nERROR: \"bin/climaker.exe\" is missing\n";
69 } else {
70 print "+";
73 } else {
74 print "\nERROR: \"bin\" is missing\n";
75 $return++;
77 print "\n";
79 # packaging files
80 print "check packaging files: ";
81 if (check_dir("docs")) {
82 my @filelist = ( "install.html",
83 "sdk_styles.css","tools.html",
84 "images/arrow-1.gif", "images/arrow-3.gif",
85 "images/odk-footer-logo.gif",
86 "images/bg_table.png","images/bg_table2.png",
87 "images/bg_table3.png", "images/nav_down.png",
88 "images/nav_home.png","images/nav_left.png",
89 "images/nav_right.png","images/nav_up.png",
90 "images/sdk_head-1.png", "images/sdk_head-2.png",
91 "images/sdk_line-1.gif", "images/sdk_line-2.gif",
92 "images/nada.gif",
93 "images/arrow-2.gif", "images/bluball.gif",
94 "images/ooo-main-app_32.png");
96 foreach $i (@filelist)
98 if (!check_file("docs/$i")) {
99 $return++;
100 print "\nERROR: \"docs/$i\" is missing\n";
101 } else {
102 print "+";
105 } else {
106 print "\nERROR: \"docs\" is missing\n";
107 $return++;
109 print "\n";
111 #check configure files
112 print "check config files: ";
113 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
114 if (!check_file("setsdkenv_windows.bat")) {
115 print "\nERROR: \"setsdkenv_windows.bat\" is missing\n";
116 $return++;
118 if (!check_file("cfgWin.js")) {
119 print "\nERROR: \"cfgWin.js\" is missing\n";
120 $return++;
122 } else {
123 if (!check_file("configure.pl")) {
124 print "\nERROR: \"configure.pl\" is missing\n";
125 $return++;
127 if (!check_file("config.guess")) {
128 print "\nERROR: \"config.guess\" is missing\n";
129 $return++;
131 if (!check_file("config.sub")) {
132 print "\nERROR: \"config.sub\" is missing\n";
133 $return++;
135 if (!check_file("setsdkenv_unix")) {
136 print "\nERROR: \"setsdkenv_unix\" is missing\n";
137 $return++;
139 if (!check_file("setsdkenv_unix.sh.in")) {
140 print "\nERROR: \"setsdkenv_unix.sh.in\" is missing\n";
141 $return++;
144 print "\n";
146 #check setting files
147 print "check setting files: ";
148 if (check_dir("settings")) {
149 if (!check_file("settings/settings.mk")) {
150 print "\nERROR: \"settings/settings.mk\" is missing\n";
151 $return++;
153 if (!check_file("settings/std.mk")) {
154 print "\nERROR: \"settings/std.mk\" is missing\n";
155 $return++;
157 if (!check_file("settings/stdtarget.mk")) {
158 print "\nERROR: \"settings/stdtarget.mk\" is missing\n";
159 $return++;
161 } else {
162 print "\nERROR: \"settings\" is missing\n";
163 $return++;
165 print "\n";
167 #check cpp docu, it is only a first and simple check
168 # improvement required
169 if ($ENV{'DOXYGEN'} ne '') {
170 print "check cpp docu: ";
171 if (check_dir("docs/cpp/ref")) {
172 if (!check_file("docs/cpp/ref/index.html")) {
173 print "\nERROR: \"docs/cpp/ref/index.html\" is missing\n";
174 $return++;
176 } else {
177 print "\nERROR: \"docs/cpp/ref\" is missing\n";
178 $return++;
180 print "\n";
183 #check java docu, it is only a first and simple check
184 # improvement required
185 my $solar_java = $ENV{"ENABLE_JAVA"};
186 my $JDK = $ENV{"JDK"};
187 if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) {
188 print "check java docu: ";
189 if (check_dir("docs/java/ref")) {
190 if (!check_file("docs/java/ref/index.html")) {
191 print "\nERROR: \"docs/java/ref/index.html\" is missing\n";
192 $return++;
195 my @dir_list = ( "lib","lib/uno","lib/uno/helper","lib/uno/helper/class-use",
196 "uno","uno/class-use","comp","comp/helper",
197 "comp/helper/class-use");
199 foreach $i (@dir_list)
201 if (!check_dir("docs/java/ref/com/sun/star/$i")) {
202 $return++;
203 print "\nERROR: \"docs/java/ref/com/sun/star/$i\" is missing\n";
204 } else {
205 print "+";
208 } else {
209 print "\nERROR: \"docs/java/ref\" is missing\n";
210 $return++;
212 print "\n";
215 #check idl docu, it is only a first and simple check
216 # improvement required
217 if ($ENV{'DOXYGEN'} ne '') {
218 print "check idl docu: ";
219 if (check_dir("docs/idl/ref")) {
220 if (!check_file("docs/idl/ref/index.html")) {
221 print "\nERROR: \"docs/idl/ref/index.html\" is missing\n";
222 $return++;
224 if (!check_file("docs/idl/ref/classes.html")) {
225 print "\nERROR: \"docs/idl/ref/classes.html\" is missing\n";
226 $return++;
228 if (!check_file("docs/idl/ref/namespaces.html")) {
229 print "\nERROR: \"docs/idl/ref/namespaces.html\" is missing\n";
230 $return++;
233 my @idl_dirlist = ( "accessibility",
234 "animations",
235 "auth",
236 "awt",
237 "awt/tab",
238 "awt/tree",
239 "awt/grid",
240 "beans",
241 "bridge",
242 "bridge/oleautomation",
243 "chart",
244 "chart2",
245 "chart2/data",
246 "configuration",
247 "configuration/backend",
248 "configuration/backend/xml",
249 "configuration/bootstrap",
250 "connection",
251 "container",
252 "cui",
253 "datatransfer",
254 "datatransfer/clipboard",
255 "datatransfer/dnd",
256 "deployment",
257 "deployment/ui",
258 "document",
259 "drawing",
260 "drawing/framework",
261 "embed",
262 "form",
263 "form/binding",
264 "form/component",
265 "form/control",
266 "form/inspection",
267 "form/runtime",
268 "form/submission",
269 "form/validation",
270 "formula",
271 "frame",
272 "frame/status",
273 "gallery",
274 "geometry",
275 "graphic",
276 "i18n",
277 "image",
278 "inspection",
279 "io",
280 "java",
281 "lang",
282 "ldap",
283 "linguistic2",
284 "loader",
285 "logging",
286 "mail",
287 "media",
288 "mozilla",
289 "packages",
290 "packages/manifest",
291 "packages/zip",
292 "plugin",
293 "presentation",
294 "reflection",
295 "registry",
296 "rendering",
297 "report",
298 "report/inspection",
299 "resource",
300 "scanner",
301 "script",
302 "script/browse",
303 "script/provider",
304 "sdb",
305 "sdb/application",
306 "sdb/tools",
307 "sdbc",
308 "sdbcx",
309 "security",
310 "sheet",
311 "smarttags",
312 "style",
313 "svg",
314 "system",
315 "table",
316 "task",
317 "text",
318 "text/fieldmaster",
319 "text/textfield",
320 "text/textfield/docinfo",
321 "ucb",
322 "ui",
323 "ui/dialogs",
324 "uno",
325 "uri",
326 "util",
327 "view",
328 "xforms",
329 "xml",
330 "xml/crypto",
331 "xml/crypto/sax",
332 "xml/csax",
333 "xml/dom",
334 "xml/dom/events",
335 "xml/dom/views",
336 "xml/input",
337 "xml/sax",
338 "xml/wrapper",
339 "xml/xpath",
340 "xsd" );
342 # Due to MSI limitations have to use SHORT_NAMES on windows so can't check
343 if ($OperatingSystem ne "windows") {
344 foreach $i (@idl_dirlist)
346 $i =~ s/\//_1_1/g;
347 if (!check_file("docs/idl/ref/namespacecom_1_1sun_1_1star_1_1$i.html")) {
348 $return++;
349 print "\nERROR: \"docs/idl/ref/namespacecom_1_1sun_1_1star_1_1$i.html\" is missing\n";
350 } else {
351 print "+";
355 } else {
356 print "\nERROR: \"docs/idl/ref\" is missing\n";
357 $return++;
359 print "\n";
362 } else {
363 print "\nERROR: \"$SdkDir\" is missing\n";
364 $return++;
367 if( $return != 0 )
369 print "ERROR\n";
370 } else {
371 print "OK\n";
373 exit $return;