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.
36 $StartDir = "$ARGV[0]";
37 $OperatingSystem = "$ARGV[1]";
38 $ExePrefix = "$ARGV[2]";
40 print "Check for $OperatingSystem\n";
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") {
54 print "\nERROR: \"$StartDir/bin/$i$ExePrefix\" is missing\n";
60 if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
61 if ($OperatingSystem eq "windows" && ! -e
"$StartDir/bin/climaker.exe") {
63 print "\nERROR: \"$StartDir/bin/climaker.exe\" is missing\n";
68 if ($OperatingSystem eq "macosx") {
69 if (! -e
"$StartDir/bin/addsym-macosx.sh") {
71 print "\nERROR: \"$StartDir/bin/addsym-macosx.sh\" is missing\n";
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") {
102 print "\nERROR: \"$StartDir/docs/$i\" is missing\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";
119 if (! -e
"$StartDir/setsdkenv_windows.template") {
120 print "\nERROR: \"$StartDir/setsdkenv_windows.template\" is missing\n";
123 if (! -e
"$StartDir/cfgWin.js") {
124 print "\nERROR: \"$StartDir/cfgWin.js\" is missing\n";
128 if (! -e
"$StartDir/configure.pl") {
129 print "\nERROR: \"$StartDir/configure.pl\" is missing\n";
132 if (! -e
"$StartDir/config.guess") {
133 print "\nERROR: \"$StartDir/config.guess\" is missing\n";
136 if (! -e
"$StartDir/config.sub") {
137 print "\nERROR: \"$StartDir/config.sub\" is missing\n";
140 if (! -e
"$StartDir/setsdkenv_unix") {
141 print "\nERROR: \"$StartDir/setsdkenv_unix\" is missing\n";
144 if (! -e
"$StartDir/setsdkenv_unix.sh.in") {
145 print "\nERROR: \"$StartDir/setsdkenv_unix.sh.in\" is missing\n";
148 if (! -e
"$StartDir/setsdkenv_unix.csh.in") {
149 print "\nERROR: \"$StartDir/setsdkenv_unix.csh.in\" is missing\n";
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";
162 if (! -e
"$StartDir/settings/std.mk") {
163 print "\nERROR: \"$StartDir/settings/std.mk\" is missing\n";
166 if (! -e
"$StartDir/settings/stdtarget.mk") {
167 print "\nERROR: \"$StartDir/settings/stdtarget.mk\" is missing\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";
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";
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") {
210 print "\nERROR: \"$StartDir/docs/java/ref/com/sun/star/$i\" is missing\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";
229 if (! -d
"$StartDir/docs/common/ref/index-files") {
230 print "\nERROR: \"$StartDir/docs/common/ref/index-files\" is missing\n";
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";
238 my @idl_dirlist = ( "accessibility",
247 "bridge/oleautomation",
252 "configuration/backend",
253 "configuration/backend/xml",
254 "configuration/bootstrap",
258 "datatransfer/clipboard",
331 "text/textfield/docinfo",
354 foreach $i (@idl_dirlist)
356 if (! -d
"$StartDir/docs/common/ref/com/sun/star/$i") {
358 print "\nERROR: \"$StartDir/docs/common/ref/com/sun/star/$i\" is missing\n";