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",
49 "regcompare","autodoc",
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";
73 if ($OperatingSystem eq "macosx") {
74 if (!check_file
("bin/addsym-macosx.sh")) {
76 print "\nERROR: \"bin/addsym-macosx.sh\" is missing\n";
87 print "check packaging files: ";
88 if (check_dir
("docs")) {
89 my @filelist = ( "install.html",
90 "notsupported.html","sdk_styles.css","tools.html",
91 "images/arrow-1.gif", "images/arrow-3.gif",
92 "images/odk-footer-logo.gif",
93 "images/bg_table.png","images/bg_table2.png",
94 "images/bg_table3.png", "images/nav_down.png",
95 "images/nav_home.png","images/nav_left.png",
96 "images/nav_right.png","images/nav_up.png",
97 "images/sdk_head-1.png", "images/sdk_head-2.png",
98 "images/sdk_line-1.gif", "images/sdk_line-2.gif",
99 "common/ref/idl.css", "images/nada.gif",
100 "images/arrow-2.gif", "images/bluball.gif",
101 "images/ooo-main-app_32.png");
103 foreach $i (@filelist)
105 if (!check_file
("docs/$i")) {
107 print "\nERROR: \"docs/$i\" is missing\n";
117 #check configure files
118 print "check config files: ";
119 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
120 if (!check_file
("setsdkenv_windows.bat")) {
121 print "\nERROR: \"setsdkenv_windows.bat\" is missing\n";
124 if (!check_file
("setsdkenv_windows.template")) {
125 print "\nERROR: \"setsdkenv_windows.template\" is missing\n";
128 if (!check_file
("cfgWin.js")) {
129 print "\nERROR: \"cfgWin.js\" is missing\n";
133 if (!check_file
("configure.pl")) {
134 print "\nERROR: \"configure.pl\" is missing\n";
137 if (!check_file
("config.guess")) {
138 print "\nERROR: \"config.guess\" is missing\n";
141 if (!check_file
("config.sub")) {
142 print "\nERROR: \"config.sub\" is missing\n";
145 if (!check_file
("setsdkenv_unix")) {
146 print "\nERROR: \"setsdkenv_unix\" is missing\n";
149 if (!check_file
("setsdkenv_unix.sh.in")) {
150 print "\nERROR: \"setsdkenv_unix.sh.in\" is missing\n";
157 print "check setting files: ";
158 if (check_dir
("settings")) {
159 if (!check_file
("settings/settings.mk")) {
160 print "\nERROR: \"settings/settings.mk\" is missing\n";
163 if (!check_file
("settings/std.mk")) {
164 print "\nERROR: \"settings/std.mk\" is missing\n";
167 if (!check_file
("settings/stdtarget.mk")) {
168 print "\nERROR: \"settings/stdtarget.mk\" is missing\n";
176 #check cpp docu, it is only a first and simple check
177 # improvement required
178 if ($ENV{'DOXYGEN'} ne '') {
179 print "check cpp docu: ";
180 if (check_dir
("docs/cpp/ref")) {
181 if (!check_file
("docs/cpp/ref/index.html")) {
182 print "\nERROR: \"docs/cpp/ref/index.html\" is missing\n";
191 #check java docu, it is only a first and simple check
192 # improvement required
193 my $solar_java = $ENV{"SOLAR_JAVA"};
194 my $JDK = $ENV{"JDK"};
195 if (defined($solar_java) && $solar_java ne "" && (!defined($JDK) || $JDK ne "gcj")) {
196 print "check java docu: ";
197 if (check_dir
("docs/java/ref")) {
198 if (!check_file
("docs/java/ref/index.html")) {
199 print "\nERROR: \"docs/java/ref/index.html\" is missing\n";
203 my @dir_list = ( "lib","lib/uno","lib/uno/helper","lib/uno/helper/class-use",
204 "uno","uno/class-use","comp","comp/helper",
205 "comp/helper/class-use");
207 foreach $i (@dir_list)
209 if (!check_dir
("docs/java/ref/com/sun/star/$i")) {
211 print "\nERROR: \"docs/java/ref/com/sun/star/$i\" is missing\n";
222 #check idl docu, it is only a first and simple check
223 # improvement required
224 print "check idl docu: ";
225 if (check_dir
("docs/common/ref")) {
226 if (!check_file
("docs/common/ref/module-ix.html")) {
227 print "\nERROR: \"docs/common/ref/module-ix.html\" is missing\n";
230 if (!check_dir
("docs/common/ref/index-files")) {
231 print "\nERROR: \"docs/common/ref/index-files\" is missing\n";
234 if (!check_file
("docs/common/ref/index-files/index-10.html")) {
235 print "\nERROR: \"docs/common/ref/index-files/index-10.html\" is missing\n";
239 my @idl_dirlist = ( "accessibility",
248 "bridge/oleautomation",
253 "configuration/backend",
254 "configuration/backend/xml",
255 "configuration/bootstrap",
260 "datatransfer/clipboard",
326 "text/textfield/docinfo",
348 foreach $i (@idl_dirlist)
350 if (!check_dir
("docs/common/ref/com/sun/star/$i")) {
352 print "\nERROR: \"docs/common/ref/com/sun/star/$i\" is missing\n";