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 exist
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 = ( "cppumaker","javamaker",
49 "unoidl-read", "unoidl-write",
50 "unoapploader", "uno-skeletonmaker" );
52 foreach $i (@binarylist)
54 if (!check_file
("bin/$i$ExePrefix")) {
56 print "\nERROR: \"bin/$i$ExePrefix\" is missing\n";
62 if ($OperatingSystem eq "windows") {
63 if (!check_file
("bin/climaker.exe")) {
65 print "\nERROR: \"bin/climaker.exe\" is missing\n";
71 print "\nERROR: \"bin\" is missing\n";
77 print "check packaging files: ";
78 if (check_dir
("docs")) {
79 my @filelist = ( "install.html",
80 "sdk_styles.css","tools.html",
81 "images/arrow-1.gif", "images/arrow-3.gif",
82 "images/odk-footer-logo.gif",
83 "images/bg_table.png","images/bg_table2.png",
84 "images/bg_table3.png", "images/nav_down.png",
85 "images/nav_home.png","images/nav_left.png",
86 "images/nav_right.png","images/nav_up.png",
87 "images/sdk_head-1.png", "images/sdk_head-2.png",
88 "images/sdk_line-1.gif", "images/sdk_line-2.gif",
90 "images/arrow-2.gif", "images/bluball.gif",
91 "images/ooo-main-app_32.png");
93 foreach $i (@filelist)
95 if (!check_file
("docs/$i")) {
97 print "\nERROR: \"docs/$i\" is missing\n";
103 print "\nERROR: \"docs\" is missing\n";
108 #check configure files
109 print "check config files: ";
110 if ($OperatingSystem eq "windows") {
111 if (!check_file
("setsdkenv_windows.bat")) {
112 print "\nERROR: \"setsdkenv_windows.bat\" is missing\n";
115 if (!check_file
("cfgWin.js")) {
116 print "\nERROR: \"cfgWin.js\" is missing\n";
120 if (!check_file
("configure.pl")) {
121 print "\nERROR: \"configure.pl\" is missing\n";
124 if (!check_file
("config.guess")) {
125 print "\nERROR: \"config.guess\" is missing\n";
128 if (!check_file
("config.sub")) {
129 print "\nERROR: \"config.sub\" is missing\n";
132 if (!check_file
("setsdkenv_unix")) {
133 print "\nERROR: \"setsdkenv_unix\" is missing\n";
136 if (!check_file
("setsdkenv_unix.sh.in")) {
137 print "\nERROR: \"setsdkenv_unix.sh.in\" is missing\n";
144 print "check setting files: ";
145 if (check_dir
("settings")) {
146 if (!check_file
("settings/settings.mk")) {
147 print "\nERROR: \"settings/settings.mk\" is missing\n";
150 if (!check_file
("settings/std.mk")) {
151 print "\nERROR: \"settings/std.mk\" is missing\n";
154 if (!check_file
("settings/stdtarget.mk")) {
155 print "\nERROR: \"settings/stdtarget.mk\" is missing\n";
159 print "\nERROR: \"settings\" is missing\n";
164 #check cpp docu, it is only a first and simple check
165 # improvement required
166 if ($ENV{'DOXYGEN'} ne '') {
167 print "check cpp docu: ";
168 if (check_dir
("docs/cpp/ref")) {
169 if (!check_file
("docs/cpp/ref/index.html")) {
170 print "\nERROR: \"docs/cpp/ref/index.html\" is missing\n";
174 print "\nERROR: \"docs/cpp/ref\" is missing\n";
180 #check java docu, it is only a first and simple check
181 # improvement required
182 my $solar_java = $ENV{"ENABLE_JAVA"};
183 my $JDK = $ENV{"JDK"};
184 if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) {
185 print "check java docu: ";
186 if (check_dir
("docs/java/ref")) {
187 if (!check_file
("docs/java/ref/index.html")) {
188 print "\nERROR: \"docs/java/ref/index.html\" is missing\n";
192 my @dir_list = ( "lib","lib/uno","lib/uno/helper","lib/uno/helper/class-use",
193 "uno","uno/class-use","comp","comp/helper",
194 "comp/helper/class-use");
196 foreach $i (@dir_list)
198 if (!check_dir
("docs/java/ref/com/sun/star/$i")) {
200 print "\nERROR: \"docs/java/ref/com/sun/star/$i\" is missing\n";
206 print "\nERROR: \"docs/java/ref\" is missing\n";
212 #check idl docu, it is only a first and simple check
213 # improvement required
214 if ($ENV{'DOXYGEN'} ne '') {
215 print "check idl docu: ";
216 if (check_dir
("docs/idl/ref")) {
217 if (!check_file
("docs/idl/ref/index.html")) {
218 print "\nERROR: \"docs/idl/ref/index.html\" is missing\n";
221 if (!check_file
("docs/idl/ref/classes.html")) {
222 print "\nERROR: \"docs/idl/ref/classes.html\" is missing\n";
225 if (!check_file
("docs/idl/ref/namespaces.html")) {
226 print "\nERROR: \"docs/idl/ref/namespaces.html\" is missing\n";
230 my @idl_dirlist = ( "accessibility",
239 "bridge/oleautomation",
244 "configuration/backend",
245 "configuration/backend/xml",
246 "configuration/bootstrap",
251 "datatransfer/clipboard",
317 "text/textfield/docinfo",
339 # Due to MSI limitations have to use SHORT_NAMES on windows so can't check
340 if ($OperatingSystem ne "windows") {
341 foreach $i (@idl_dirlist)
344 if (!check_file
("docs/idl/ref/namespacecom_1_1sun_1_1star_1_1$i.html")) {
346 print "\nERROR: \"docs/idl/ref/namespacecom_1_1sun_1_1star_1_1$i.html\" is missing\n";
353 print "\nERROR: \"docs/idl/ref\" is missing\n";
360 print "\nERROR: \"$SdkDir\" is missing\n";