diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-16 23:17:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-16 23:17:27 +0200 |
commit | b346371f7b5cb9476a41f377ce1b914de8ac077e (patch) | |
tree | c7c4f3c72c0a09ed356d328dee1f0758e559cade /odk | |
parent | urelibs is part of the stable extension interface on Mac OS X (diff) | |
download | core-b346371f7b5cb9476a41f377ce1b914de8ac077e.tar.gz core-b346371f7b5cb9476a41f377ce1b914de8ac077e.zip |
Remove unused OFFICE_OR_URE[_SUGGESTION] variables
Change-Id: Ifc90af4e536f860eb4bea5420a5e233471c4b291
Diffstat (limited to 'odk')
-rwxr-xr-x | odk/config/configure.pl | 194 |
1 files changed, 81 insertions, 113 deletions
diff --git a/odk/config/configure.pl b/odk/config/configure.pl index f86a4f04995b..19f8f2112156 100755 --- a/odk/config/configure.pl +++ b/odk/config/configure.pl @@ -41,9 +41,6 @@ $main::OO_SDK_HOME = $main::sdkpath; #$main::OO_SDK_HOME = ""; $main::OO_SDK_HOME_SUGGESTION = $main::sdkpath; -$main::OFFICE_OR_URE = "Office"; -$main::OFFICE_OR_URE_SUGGESTION = "Office"; - $main::OFFICE_HOME = ""; $main::OO_SDK_URE_HOME = `cd $main::sdkpath/../ure-link && pwd`; @@ -97,133 +94,111 @@ $main::skipOutputDir = 0; $main::return = 0; -if ( $main::OFFICE_OR_URE eq "Office" ) +if ( $main::operatingSystem =~ m/darwin/ ) { - if ( $main::operatingSystem =~ m/darwin/ ) - { # used for a SDK as part of the office installation # $main::OFFICE_HOME = `cd $main::sdkpath/../../.. && pwd`; # chomp($main::OFFICE_HOME); # print " Used Office = $main::OFFICE_HOME\n"; - print " Used SDK = $main::OO_SDK_HOME\n\n"; + print " Used SDK = $main::OO_SDK_HOME\n\n"; - $main::OFFICE_HOME_SUGGESTION = searchMacOffice(); - while ( (! -d "$main::OFFICE_HOME" ) || - ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/Contents/MacOS")) ) + $main::OFFICE_HOME_SUGGESTION = searchMacOffice(); + while ( (! -d "$main::OFFICE_HOME" ) || + ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/Contents/MacOS")) ) + { + print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; + $main::OFFICE_HOME = readStdIn(); + chop($main::OFFICE_HOME); + if ( $main::OFFICE_HOME eq "" ) { - print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; - $main::OFFICE_HOME = readStdIn(); - chop($main::OFFICE_HOME); - if ( $main::OFFICE_HOME eq "" ) - { - $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; - } + $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; + } - if ( ! -d "$main::OFFICE_HOME" ) - { - $main::OFFICE_HOME = ""; - print " Error: An office installation is required, please specify the path to a valid installation.\n"; - } + if ( ! -d "$main::OFFICE_HOME" ) + { + $main::OFFICE_HOME = ""; + print " Error: An office installation is required, please specify the path to a valid installation.\n"; + } - # check more details - if ( -d "$main::OFFICE_HOME/Contents/ure-link" ) { - $main::OO_SDK_URE_HOME = "$main::OFFICE_HOME/Contents/ure-link"; - } else { - $main::OFFICE_HOME = ""; - $main::OO_SDK_URE_HOME = ""; - print " Error: no URE found in office installation, please specify the path to a valid installation.\n"; - } + # check more details + if ( -d "$main::OFFICE_HOME/Contents/ure-link" ) { + $main::OO_SDK_URE_HOME = "$main::OFFICE_HOME/Contents/ure-link"; + } else { + $main::OFFICE_HOME = ""; + $main::OO_SDK_URE_HOME = ""; + print " Error: no URE found in office installation, please specify the path to a valid installation.\n"; } - } else + } +} else +{ + $main::OFFICE_HOME_SUGGESTION = searchoffice(); + + if ( $main::OFFICE_HOME_SUGGESTION eq "" ) { + # prepare Office path + $main::OFFICE_HOME_SUGGESTION = searchprog("soffice"); + } + + if ( ! $main::OFFICE_HOME_SUGGESTION eq "" ) { - $main::OFFICE_HOME_SUGGESTION = searchoffice(); + my $tmpOffice = readlink "$main::OFFICE_HOME_SUGGESTION/soffice"; - if ( $main::OFFICE_HOME_SUGGESTION eq "" ) { - # prepare Office path - $main::OFFICE_HOME_SUGGESTION = searchprog("soffice"); + if ( $tmpOffice eq "" ) + { + $tmpOffice = "$main::OFFICE_HOME_SUGGESTION/soffice"; } - if ( ! $main::OFFICE_HOME_SUGGESTION eq "" ) + my $offset = rindex($tmpOffice, "/program/soffice"); + if ( $offset != -1 ) { - my $tmpOffice = readlink "$main::OFFICE_HOME_SUGGESTION/soffice"; - - if ( $tmpOffice eq "" ) - { - $tmpOffice = "$main::OFFICE_HOME_SUGGESTION/soffice"; - } - - my $offset = rindex($tmpOffice, "/program/soffice"); + $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset); + } else + { + $offset = rindex($tmpOffice, "/soffice"); if ( $offset != -1 ) { $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset); } else { - $offset = rindex($tmpOffice, "/soffice"); - if ( $offset != -1 ) - { - $main::OFFICE_HOME_SUGGESTION = substr($tmpOffice, 0, $offset); - } else - { - $main::OFFICE_HOME_SUGGESTION = ""; - } + $main::OFFICE_HOME_SUGGESTION = ""; } } + } - while ( (! -d "$main::OFFICE_HOME" ) || - ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/program")) ) + while ( (! -d "$main::OFFICE_HOME" ) || + ((-d "$main::OFFICE_HOME") && (! -d "$main::OFFICE_HOME/program")) ) + { + print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; + $main::OFFICE_HOME = readStdIn(); + chop($main::OFFICE_HOME); + if ( $main::OFFICE_HOME eq "" ) { - print " Enter the Office installation directory [$main::OFFICE_HOME_SUGGESTION]: "; - $main::OFFICE_HOME = readStdIn(); - chop($main::OFFICE_HOME); - if ( $main::OFFICE_HOME eq "" ) - { - $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; - } + $main::OFFICE_HOME = $main::OFFICE_HOME_SUGGESTION; + } - if ( ! -d "$main::OFFICE_HOME" ) - { - $main::OFFICE_HOME = ""; - print " Error: An office installation is required, please specify the path to a valid installation.\n"; - } else + if ( ! -d "$main::OFFICE_HOME" ) + { + $main::OFFICE_HOME = ""; + print " Error: An office installation is required, please specify the path to a valid installation.\n"; + } else + { + # special work for a network installation, no prgram directory but a link to the soffice binary + if ( (! -d "$main::OFFICE_HOME/program") && (-e "$main::OFFICE_HOME/soffice") ) { - # special work for a network installation, no prgram directory but a link to the soffice binary - if ( (! -d "$main::OFFICE_HOME/program") && (-e "$main::OFFICE_HOME/soffice") ) - { - my $soserver = `ls -l $OFFICE_HOME_SUGGESTION/soffice | sed -n 's/.* -> //p'`; - $soserver= substr($soserver, 0, rindex($soserver, "program") - 1); + my $soserver = `ls -l $OFFICE_HOME_SUGGESTION/soffice | sed -n 's/.* -> //p'`; + $soserver= substr($soserver, 0, rindex($soserver, "program") - 1); - if ( ! -d $soserver ) - { - $main::OFFICE_HOME = ""; - print " Error: An office installation is required, please specify the path to a valid installation.\n"; - } else - { - $main::OFFICE_HOME = $soserver; - } + if ( ! -d $soserver ) + { + $main::OFFICE_HOME = ""; + print " Error: An office installation is required, please specify the path to a valid installation.\n"; + } else + { + $main::OFFICE_HOME = $soserver; } } } } } -else -{ - # prepare URE path - $main::OO_SDK_URE_HOME_SUGGESTION = "/opt/openoffice.org/ure"; - $main::OO_SDK_URE_HOME_SUGGESTION = "" unless - -e "$main::OO_SDK_URE_HOME_SUGGESTION/bin/uno"; - for (;;) - { - print " Enter the URE installation directory", - " [$main::OO_SDK_URE_HOME_SUGGESTION]: "; - $main::OO_SDK_URE_HOME = readStdIn(); - chop $main::OO_SDK_URE_HOME; - $main::OO_SDK_URE_HOME = $main::OO_SDK_URE_HOME_SUGGESTION if - $main::OO_SDK_URE_HOME eq "" && - $main::OO_SDK_URE_HOME_SUGGESTION ne ""; - last if -e "$main::OO_SDK_URE_HOME/bin/uno"; - print " Error: A valid URE installation is required.\n"; - } -} # prepare GNU make path while ( (!$main::correctVersion) && @@ -513,25 +488,18 @@ while ( (!$main::skipOutputDir) && } # prepare auto deployment -if ( $main::OFFICE_OR_URE eq "Office" ) +while ( $main::SDK_AUTO_DEPLOYMENT eq "" || + ((! $main::SDK_AUTO_DEPLOYMENT eq "YES") && + (! $main::SDK_AUTO_DEPLOYMENT eq "NO")) ) { - while ( $main::SDK_AUTO_DEPLOYMENT eq "" || - ((! $main::SDK_AUTO_DEPLOYMENT eq "YES") && - (! $main::SDK_AUTO_DEPLOYMENT eq "NO")) ) + print " Automatic deployment of UNO components (YES/NO) [$main::SDK_AUTO_DEPLOYMENT_SUGGESTION]: "; + $main::SDK_AUTO_DEPLOYMENT = uc <STDIN>; + chop($main::SDK_AUTO_DEPLOYMENT); + if ( $main::SDK_AUTO_DEPLOYMENT eq "" ) { - print " Automatic deployment of UNO components (YES/NO) [$main::SDK_AUTO_DEPLOYMENT_SUGGESTION]: "; - $main::SDK_AUTO_DEPLOYMENT = uc <STDIN>; - chop($main::SDK_AUTO_DEPLOYMENT); - if ( $main::SDK_AUTO_DEPLOYMENT eq "" ) - { - $main::SDK_AUTO_DEPLOYMENT = "YES"; - } + $main::SDK_AUTO_DEPLOYMENT = "YES"; } } -else -{ - $main::SDK_AUTO_DEPLOYMENT = "NO"; -} prepareScriptFile("setsdkenv_unix.sh.in", "setsdkenv_unix.sh"); chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh"; |