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.
27 $OperatingSystem = "$ARGV[1]";
28 $ExePrefix = "$ARGV[2]";
33 return -e
"$SdkDir/$file";
39 return -d
"$SdkDir/$dir";
42 print "Check for $OperatingSystem\n";
46 print "check binaries: ";
47 if (check_dir
("bin")) {
48 my @binarylist = ( "idlc","cppumaker","javamaker",
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")) {
59 print "\nERROR: \"bin/$i$ExePrefix\" is missing\n";
65 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
66 if ($OperatingSystem eq "windows" && !check_file
("bin/climaker.exe")) {
68 print "\nERROR: \"bin/climaker.exe\" is missing\n";
74 print "\nERROR: \"bin\" is missing\n";
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",
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")) {
100 print "\nERROR: \"docs/$i\" is missing\n";
106 print "\nERROR: \"docs\" is missing\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";
118 if (!check_file
("cfgWin.js")) {
119 print "\nERROR: \"cfgWin.js\" is missing\n";
123 if (!check_file
("configure.pl")) {
124 print "\nERROR: \"configure.pl\" is missing\n";
127 if (!check_file
("config.guess")) {
128 print "\nERROR: \"config.guess\" is missing\n";
131 if (!check_file
("config.sub")) {
132 print "\nERROR: \"config.sub\" is missing\n";
135 if (!check_file
("setsdkenv_unix")) {
136 print "\nERROR: \"setsdkenv_unix\" is missing\n";
139 if (!check_file
("setsdkenv_unix.sh.in")) {
140 print "\nERROR: \"setsdkenv_unix.sh.in\" is missing\n";
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";
153 if (!check_file
("settings/std.mk")) {
154 print "\nERROR: \"settings/std.mk\" is missing\n";
157 if (!check_file
("settings/stdtarget.mk")) {
158 print "\nERROR: \"settings/stdtarget.mk\" is missing\n";
162 print "\nERROR: \"settings\" is missing\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";
177 print "\nERROR: \"docs/cpp/ref\" is missing\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";
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")) {
203 print "\nERROR: \"docs/java/ref/com/sun/star/$i\" is missing\n";
209 print "\nERROR: \"docs/java/ref\" is missing\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";
224 if (!check_file
("docs/idl/ref/classes.html")) {
225 print "\nERROR: \"docs/idl/ref/classes.html\" is missing\n";
228 if (!check_file
("docs/idl/ref/namespaces.html")) {
229 print "\nERROR: \"docs/idl/ref/namespaces.html\" is missing\n";
233 my @idl_dirlist = ( "accessibility",
242 "bridge/oleautomation",
247 "configuration/backend",
248 "configuration/backend/xml",
249 "configuration/bootstrap",
254 "datatransfer/clipboard",
320 "text/textfield/docinfo",
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)
347 if (!check_file
("docs/idl/ref/namespacecom_1_1sun_1_1star_1_1$i.html")) {
349 print "\nERROR: \"docs/idl/ref/namespacecom_1_1sun_1_1star_1_1$i.html\" is missing\n";
356 print "\nERROR: \"docs/idl/ref\" is missing\n";
363 print "\nERROR: \"$SdkDir\" is missing\n";