Lines Matching refs:main
31 $main::hostname= $ARGV[0];
32 $main::sdkpath= $ARGV[1];
33 $main::OO_SDK_NAME= $ARGV[2];
35 $main::OO_MAJORVERSION=$main::OO_SDK_NAME;
36 $main::OO_MINORVERSION=$main::OO_SDK_NAME;
37 $main::OO_MAJORVERSION =~ s#[^\d]+(\d).(\d).+#$1#go;
38 $main::OO_MINORVERSION =~ s#[^\d]+(\d).(\d).+#$2#go;
40 $main::OO_SDK_CONFIG_HOME= "$ENV{HOME}/$main::OO_SDK_NAME";
42 $main::operatingSystem = `$main::sdkpath/config.guess | cut -d"-" -f3,4`;
43 chomp ($main::operatingSystem);
45 $main::OO_SDK_HOME = $main::sdkpath;
46 $main::OO_SDK_HOME_SUGGESTION = $main::sdkpath;
48 $main::OFFICE_HOME = "";
52 $main::OO_SDK_MAKE_HOME = "";
53 $main::makeName = "make";
54 if ( $main::operatingSystem =~ m/solaris/ ||
55 $main::operatingSystem =~ m/freebsd/ )
57 $main::makeName = "gmake";
59 $main::OO_SDK_MAKE_HOME_SUGGESTION = searchprog($main::makeName);
60 $main::makeVersion = "3.79.1";
61 $main::correctVersion = 0;
63 $main::OO_SDK_ZIP_HOME = "";
64 $main::OO_SDK_ZIP_HOME_SUGGESTION = searchprog("zip");
65 $main::zipVersion = "2.3";
67 $main::OO_SDK_CAT_HOME = "";
68 $main::OO_SDK_CAT_HOME_SUGGESTION = searchprog("cat");
72 $main::OO_SDK_SED_HOME = "";
73 $main::OO_SDK_SED_HOME_SUGGESTION = searchprog("sed");
77 $main::OO_SDK_CPP_HOME = "";
78 $main::cppName = "gcc";
79 $main::cppVersion = "4.0.1";
80 if ( $main::operatingSystem =~ m/solaris/ )
82 $main::cppName = "CC";
83 $main::cppVersion = "5.2";
85 if ( $main::operatingSystem =~ m/darwin/ )
87 $main::cppName = "clang";
88 $main::cppVersion = "4.2";
90 $main::OO_SDK_CC_55_OR_HIGHER = "";
91 if ( $main::operatingSystem =~ m/darwin/ )
94 $main::OO_SDK_CPP_HOME_SUGGESTION = substr($clangpath, 0, rindex($clangpath, "/"));
96 $main::OO_SDK_CPP_HOME_SUGGESTION = searchprog($main::cppName);
99 $main::OO_SDK_JAVA_HOME = "";
100 $main::OO_SDK_JAVA_BIN_DIR = "bin";
101 if ( $main::operatingSystem =~ m/darwin/ )
103 $main::OO_SDK_JAVA_BIN_DIR="Commands";
105 $main::OO_SDK_JAVA_HOME_SUGGESTION = searchprog("javac");
106 $main::javaVersion = "1.5.0_01";
108 $main::OO_SDK_BOOST_HOME_SUGGESTION = "";
109 $main::boostVersion = "1.48.0";
110 $main::skipBoostDir = 0;
112 $main::SDK_AUTO_DEPLOYMENT = "";
113 $main::SDK_AUTO_DEPLOYMENT_SUGGESTION = "YES";
115 $main::OO_SDK_OUTPUT_DIR_SUGGESTION = "$ENV{HOME}";
116 $main::OO_SDK_OUTPUT_DIR = "";
117 $main::skipOutputDir = 0;
119 $main::return = 0;
121 if ( $main::operatingSystem =~ m/darwin/ )
127 print " Used SDK = $main::OO_SDK_HOME\n\n";
129 $main::OFFICE_HOME_SUGGESTION = searchMacOffice();
130 while ( (! -d "$main::OFFICE_HOME" ) ||
131 ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/Contents/MacOS")) )
133 print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: ";
134 $main::OFFICE_HOME = readStdIn();
135 chop($main::OFFICE_HOME);
136 if ( $main::OFFICE_HOME eq "" )
138 $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION;
141 if ( ! -d "$main::OFFICE_HOME" )
143 $main::OFFICE_HOME = "";
151 $main::OFFICE_HOME_SUGGESTION = searchoffice();
153 if ( $main::OFFICE_HOME_SUGGESTION eq "" ) {
155 $main::OFFICE_HOME_SUGGESTION = searchprog("soffice");
158 if ( ! $main::OFFICE_HOME_SUGGESTION eq "" )
160 my $tmpOffice = readlink "$main::OFFICE_HOME_SUGGESTION/soffice";
164 $tmpOffice = "$main::OFFICE_HOME_SUGGESTION/soffice";
170 $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset);
176 $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset);
179 $main::OFFICE_HOME_SUGGESTION = "";
184 while ( (! -d "$main::OFFICE_HOME" ) ||
185 ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/program")) )
187 print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: ";
188 $main::OFFICE_HOME = readStdIn();
189 chop($main::OFFICE_HOME);
190 if ( $main::OFFICE_HOME eq "" )
192 $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION;
195 if ( ! -d "$main::OFFICE_HOME" )
197 $main::OFFICE_HOME = "";
202 if ( (! -d "$main::OFFICE_HOME/program") && (-e "$main::OFFICE_HOME/soffice") )
209 $main::OFFICE_HOME = "";
213 $main::OFFICE_HOME = $soserver;
222 while ( (!$main::correctVersion) &&
223 ((! -d "$main::OO_SDK_MAKE_HOME" ) ||
224 ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName"))) )
226 …print " Enter GNU make ($main::makeVersion or higher) tools directory [$main::OO_SDK_MAKE_HOME_SUG…
227 $main::OO_SDK_MAKE_HOME = readStdIn();
228 chop($main::OO_SDK_MAKE_HOME);
229 if ( $main::OO_SDK_MAKE_HOME eq "" )
231 $main::OO_SDK_MAKE_HOME = $main::OO_SDK_MAKE_HOME_SUGGESTION;
233 if ( (! -d "$main::OO_SDK_MAKE_HOME") ||
234 ((-d "$main::OO_SDK_MAKE_HOME") && (! -e "$main::OO_SDK_MAKE_HOME/$main::makeName")) )
236 $main::OO_SDK_MAKE_HOME = "";
241 my $testVersion = `$OO_SDK_MAKE_HOME/$main::makeName --version`;
245 print " GNU make version $main::makeVersion can be obtained at ftp://ftp.gnu.org/gnu/make/\n";
252 …$main::correctVersion = testVersion($main::makeVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/$ma…
253 if ( !$main::correctVersion )
255 print " The '$main::makeName' command found at '$main::OO_SDK_MAKE_HOME' has a wrong version\n";
256 $main::OO_SDK_MAKE_HOME = "";
263 $main::correctVersion = 0;
264 while ( (!$main::correctVersion) &&
265 ((! -d "$main::OO_SDK_ZIP_HOME" ) ||
266 ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip"))) )
268 …print " Enter zip ($main::zipVersion or higher) tool directory [$main::OO_SDK_ZIP_HOME_SUGGESTION]…
269 $main::OO_SDK_ZIP_HOME = readStdIn();
270 chop($main::OO_SDK_ZIP_HOME);
271 if ( $main::OO_SDK_ZIP_HOME eq "" )
273 $main::OO_SDK_ZIP_HOME = $main::OO_SDK_ZIP_HOME_SUGGESTION;
275 if ( (! -d "$main::OO_SDK_ZIP_HOME") ||
276 ((-d "$main::OO_SDK_ZIP_HOME") && (! -e "$main::OO_SDK_ZIP_HOME/zip")) )
278 $main::OO_SDK_ZIP_HOME = "";
288 print " zip version $main::zipVersion can be obtained at ftp://www.info-zip.org/\n";
295 …$main::correctVersion = testVersion($main::zipVersion, $testVersion, "$main::OO_SDK_MAKE_HOME/zip"…
296 if ( !$main::correctVersion )
298 print " The 'zip' command found at '$main::OO_SDK_ZIP_HOME' has a wrong version\n";
299 $main::OO_SDK_ZIP_HOME = "";
306 $main::correctVersion = 0;
307 while ( (!$main::correctVersion) &&
308 ((! -d "$main::OO_SDK_CAT_HOME" ) ||
309 ((-d "$main::OO_SDK_CAT_HOME") && (! -e "$main::OO_SDK_CAT_HOME/cat"))) )
311 print " Enter cat tool directory [$main::OO_SDK_CAT_HOME_SUGGESTION]: ";
312 $main::OO_SDK_CAT_HOME = readStdIn();
313 chop($main::OO_SDK_CAT_HOME);
314 if ( $main::OO_SDK_CAT_HOME eq "" )
316 $main::OO_SDK_CAT_HOME = $main::OO_SDK_CAT_HOME_SUGGESTION;
318 if ( (! -d "$main::OO_SDK_CAT_HOME") ||
319 ((-d "$main::OO_SDK_CAT_HOME") && (! -e "$main::OO_SDK_CAT_HOME/cat")) )
321 $main::OO_SDK_CAT_HOME = "";
330 $main::correctVersion = 0;
331 while ( (!$main::correctVersion) &&
332 ((! -d "$main::OO_SDK_SED_HOME" ) ||
333 ((-d "$main::OO_SDK_SED_HOME") && (! -e "$main::OO_SDK_SED_HOME/sed"))) )
335 print " Enter sed tool directory [$main::OO_SDK_SED_HOME_SUGGESTION]: ";
336 $main::OO_SDK_SED_HOME = readStdIn();
337 chop($main::OO_SDK_SED_HOME);
338 if ( $main::OO_SDK_SED_HOME eq "" )
340 $main::OO_SDK_SED_HOME = $main::OO_SDK_SED_HOME_SUGGESTION;
342 if ( (! -d "$main::OO_SDK_SED_HOME") ||
343 ((-d "$main::OO_SDK_SED_HOME") && (! -e "$main::OO_SDK_SED_HOME/sed")) )
345 $main::OO_SDK_SED_HOME = "";
354 $main::correctVersion = 0;
355 while ( (!$main::correctVersion) &&
356 ((! -d "$main::OO_SDK_CPP_HOME" ) ||
357 ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cpp"))) )
365 if ( $main::operatingSystem =~ m/darwin/ )
368 $main::OO_SDK_CPP_HOME = $main::OO_SDK_CPP_HOME_SUGGESTION;
369 print " Used clang compiler: $main::OO_SDK_CPP_HOME\n";
373 print " where the compiler is located (optional) [$main::OO_SDK_CPP_HOME_SUGGESTION]: ";
375 $main::OO_SDK_CPP_HOME = readStdIn();
376 chop($main::OO_SDK_CPP_HOME);
377 if ( $main::OO_SDK_CPP_HOME eq "" )
379 $main::OO_SDK_CPP_HOME = $main::OO_SDK_CPP_HOME_SUGGESTION;
383 if ( (!$main::operatingSystem =~ m/darwin/) && (! $main::OO_SDK_CPP_HOME eq "") )
385 if ( (! -d "$main::OO_SDK_CPP_HOME") ||
386 ((-d "$main::OO_SDK_CPP_HOME") && (! -e "$main::OO_SDK_CPP_HOME/$main::cppName")) )
388 print " Error: Could not find directory '$main::OO_SDK_CPP_HOME'.\n";
391 $main::correctVersion = 1;
393 $main::OO_SDK_CPP_HOME = "";
397 if ( $main::cppName eq "gcc" )
399 my $testVersion = `$OO_SDK_CPP_HOME/$main::cppName -dumpversion`;
402 print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a ";
404 print " directory.\nA GNU compiler version $main::cppVersion can be obtained at ";
408 …$main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main…
409 if ( !$main::correctVersion )
411 print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n";
414 $main::correctVersion = 1;
417 $main::OO_SDK_CPP_HOME = "";
423 open(FILE, "$OO_SDK_CPP_HOME/$main::cppName -V 2>&1 |");
428 print " The '$main::cppName' command found at $main::OO_SDK_CPP_HOME/$main::cppName is not a ";
436 …$main::correctVersion = testVersion($main::cppVersion, $testVersion, "$main::OO_SDK_CPP_HOME/$main…
437 if ( !$main::correctVersion )
439 print " The '$main::cppName' command found at '$main::OO_SDK_CPP_HOME' has a wrong version\n";
442 $main::correctVersion = 1;
445 $main::OO_SDK_CPP_HOME = "";
447 …$main::correctVersion = testVersion("5.5", $testVersion, "$main::OO_SDK_CPP_HOME/$main::cppName", …
448 if ( $main::correctVersion ) {
449 $main::OO_SDK_CC_55_OR_HIGHER = $testVersion;
458 $main::correctVersion = 1;
464 $main::correctVersion = 0;
467 $main::offset = rindex($main::OO_SDK_JAVA_HOME_SUGGESTION, "/$main::OO_SDK_JAVA_BIN_DIR");
468 if ( $main::offset != -1 )
470 $main::OO_SDK_JAVA_HOME_SUGGESTION = substr($main::OO_SDK_JAVA_HOME_SUGGESTION, 0, $main::offset);
473 while ( (!$main::correctVersion) &&
474 ((! -d "$main::OO_SDK_JAVA_HOME" ) ||
475 …((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac…
477 ….5, recommendation is 1.6 or higher) installation directory (optional) [$main::OO_SDK_JAVA_HOME_S…
478 $main::OO_SDK_JAVA_HOME = readStdIn();
479 chop($main::OO_SDK_JAVA_HOME);
480 if ( $main::OO_SDK_JAVA_HOME eq "" )
482 $main::OO_SDK_JAVA_HOME = $main::OO_SDK_JAVA_HOME_SUGGESTION;
484 if ( ! $main::OO_SDK_JAVA_HOME eq "" )
486 if ( (! -d "$main::OO_SDK_JAVA_HOME") ||
487 …((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac…
489 …print " Error: Could not find directory '$main::OO_SDK_JAVA_HOME' or '$main::OO_SDK_JAVA_HOME/$mai…
492 $main::correctVersion = 1;
494 $main::OO_SDK_JAVA_HOME = "";
498 …my $testVersion = `$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/java -version 2>&1 | egrep "…
501 …$main::correctVersion = testVersion($main::javaVersion, $testVersion, "$main::OO_SDK_JAVA_HOME/$ma…
502 if ( !$main::correctVersion )
506 $main::correctVersion = 1;
508 $main::OO_SDK_JAVA_HOME = "";
514 $main::correctVersion = 1;
519 while ( (!$main::skipBoostDir) &&
520 ((! -d "$main::OO_SDK_BOOST_HOME" ) ||
521 …((-d "$main::OO_SDK_BOOST_HOME") && (! -e "$main::OO_SDK_BOOST_HOME/boost/tr1/unordered_map.hpp"))…
524 print " Enter boost directory [$main::OO_SDK_BOOST_HOME_SUGGESTION]: ";
525 $main::OO_SDK_BOOST_HOME = readStdIn();
526 chop($main::OO_SDK_BOOST_HOME);
527 if ( $main::OO_SDK_BOOST_HOME eq "" )
529 $main::OO_SDK_BOOST_HOME = $main::OO_SDK_BOOST_HOME_SUGGESTION;
531 if ( (! -d "$main::OO_SDK_BOOST_HOME") ||
532 …((-d "$main::OO_SDK_BOOST_HOME") && (! -e "$main::OO_SDK_BOOST_HOME/boost/tr1/unordered_map.hpp"))…
537 $main::skipBoostDir = 1;
539 $main::OO_SDK_BOOST_HOME = "";
543 $main::skipBoostDir = 1;
548 while ( (!$main::skipOutputDir) &&
549 (! -d "$main::OO_SDK_OUTPUT_DIR") )
552 …print " Enter an existent directory if you prefer a different output directory (optional) [$main::…
554 $main::OO_SDK_OUTPUT_DIR = readStdIn();
556 chop($main::OO_SDK_OUTPUT_DIR);
557 if ( $main::OO_SDK_OUTPUT_DIR eq "" )
559 $main::OO_SDK_OUTPUT_DIR = $main::OO_SDK_OUTPUT_DIR_SUGGESTION;
561 if ( ! $main::OO_SDK_OUTPUT_DIR eq "" )
563 if ( ! -d "$main::OO_SDK_OUTPUT_DIR" )
565 print " Error: Could not find directory '$main::OO_SDK_OUTPUT_DIR'.\n";
568 $main::skipOutputDir = 1;
570 $main::OO_SDK_OUTPUT_DIR = "";
575 $main::skipOutputDir = 1;
580 while ( $main::SDK_AUTO_DEPLOYMENT eq "" ||
581 ((! $main::SDK_AUTO_DEPLOYMENT eq "YES") &&
582 (! $main::SDK_AUTO_DEPLOYMENT eq "NO")) )
584 …print " Automatic deployment of UNO components (YES/NO) [$main::SDK_AUTO_DEPLOYMENT_SUGGESTION]: ";
585 $main::SDK_AUTO_DEPLOYMENT = uc <STDIN>;
586 chop($main::SDK_AUTO_DEPLOYMENT);
587 if ( $main::SDK_AUTO_DEPLOYMENT eq "" )
589 $main::SDK_AUTO_DEPLOYMENT = "YES";
594 chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh";
602 print " * \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh\"\n";
663 if ( $main::operatingSystem =~ m/darwin/ ) {
666 if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" )
668 return "$progDir/$main::OO_SDK_JAVA_BIN_DIR";
672 if ( $main::operatingSystem =~ m/solaris/ ) {
674 if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" )
676 return "$progDir/$main::OO_SDK_JAVA_BIN_DIR";
681 if ( $_search eq "gmake" && $main::operatingSystem =~ m/solaris/ ) {
719 my $offset = rindex($main::sdkpath, "/openoffice");
720 my $tmpOffice = substr($main::sdkpath, 0, $offset);
721 my $officepath = "$tmpOffice/openoffice$main::OO_MAJORVERSION";
787 if ( ! -d "$main::OO_SDK_CONFIG_HOME/$main::hostname" )
789 system("mkdir -p $main::OO_SDK_CONFIG_HOME/$main::hostname");
792 …open ( FILEIN, "$main::sdkpath/$inputFile" ) || die "\nERROR: could not open '$main::sdkpath/$inpu…
793 …n ( FILEOUT, ">$main::OO_SDK_CONFIG_HOME/$main::hostname/$outputFile" ) || die "\nERROR: could not…
797 $_ =~ s#\@OO_SDK_NAME\@#$main::OO_SDK_NAME#go;
798 $_ =~ s#\@OO_SDK_HOME\@#$main::OO_SDK_HOME#go;
799 $_ =~ s#\@OFFICE_HOME\@#$main::OFFICE_HOME#go;
800 $_ =~ s#\@OO_SDK_MAKE_HOME\@#$main::OO_SDK_MAKE_HOME#go;
801 $_ =~ s#\@OO_SDK_ZIP_HOME\@#$main::OO_SDK_ZIP_HOME#go;
802 $_ =~ s#\@OO_SDK_CAT_HOME\@#$main::OO_SDK_CAT_HOME#go;
803 $_ =~ s#\@OO_SDK_SED_HOME\@#$main::OO_SDK_SED_HOME#go;
804 $_ =~ s#\@OO_SDK_CPP_HOME\@#$main::OO_SDK_CPP_HOME#go;
805 $_ =~ s#\@OO_SDK_CC_55_OR_HIGHER\@#$main::OO_SDK_CC_55_OR_HIGHER#go;
806 $_ =~ s#\@OO_SDK_JAVA_HOME\@#$main::OO_SDK_JAVA_HOME#go;
807 $_ =~ s#\@OO_SDK_BOOST_HOME\@#$main::OO_SDK_BOOST_HOME#go;
808 $_ =~ s#\@SDK_AUTO_DEPLOYMENT\@#$main::SDK_AUTO_DEPLOYMENT#go;
809 $_ =~ s#\@OO_SDK_OUTPUT_DIR\@#$main::OO_SDK_OUTPUT_DIR#go;