diff options
Diffstat (limited to 'app-office/openoffice-bin/files/2.0.4_rc2/ooo-wrapper2')
-rwxr-xr-x | app-office/openoffice-bin/files/2.0.4_rc2/ooo-wrapper2 | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/app-office/openoffice-bin/files/2.0.4_rc2/ooo-wrapper2 b/app-office/openoffice-bin/files/2.0.4_rc2/ooo-wrapper2 deleted file mode 100755 index 5f4e4bae055d..000000000000 --- a/app-office/openoffice-bin/files/2.0.4_rc2/ooo-wrapper2 +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/perl -w -#***************************************************************************** -# -# ooffice - Wrapper script for OpenOffice.org -# -# Based on the Mandrake work. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2, as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -#***************************************************************************** - -use strict; -use IO::Handle; -use Fcntl ':flock'; - -my $Debug = $ENV{OOO_DEBUG}; - -# Define the vendor of this particular OOo package -my $VendorName = 'Gentoo'; -# Define system installation directory -# Autoconf totally sucks for @libdir@ type substitution -my $SystemInstallDir = 'INSTDIR'; -# Suffix for parallel installable versioning -my $BinSuffix = '2'; -# ooo-build version -my $OOO_BUILDVERSION = 'PV'; - -#============================================================================= -# Main -#============================================================================= - -# Parse command line arguments -my @ooo_argv; -my $session_quickstart; -my $widgets_set; -while ($ARGV[0]) { - $_ = shift; - if (m/^--session-quickstart/) { - $session_quickstart = 1; - } elsif (m/^--widgets-set/) { - $widgets_set = shift; - (defined $widgets_set) || die "Error: The option --widgets-set requires a value\n" . - "For example: --widgets-set gtk\n"; - } elsif (m/^--version/) { - print "This is OpenOffice.org $OOO_BUILDVERSION\n"; - exit 0; - } else { - push @ooo_argv, $_; - } -} - -if (!@ooo_argv) { - my $arg; - if ($0 =~ m/\/oo(calc|draw|impress|math|web|writer|base)$BinSuffix$/) { - $arg = "-$1"; - } elsif ($0 =~ m/\/oofromtemplate$BinSuffix$/) { - $arg = "slot:5500"; - } - - if ($arg) { - push @ooo_argv, "$arg"; - $Debug && print "Append arg: $arg\n"; - } -} else { - $Debug && print "Ignoring type - since have filenames\n"; -} - -if (defined $widgets_set) { - $ENV{SAL_USE_VCLPLUGIN} = $widgets_set; -} - -# overcome ghastly up-stream evilness -$ENV{SAL_NOEXPANDFPICKER}='TRUE'; - -if ($session_quickstart) { - $Debug && print "Execute quickstarter\n"; - push @ooo_argv, '-quickstart'; -} - -# FIXME: the following two fixes should be done by OOo itself -# create the user config directory with safe rights 700 if it we find -# the right path and the directory does not exist -if (open BOOTSTRAPRC, "$SystemInstallDir/program/bootstraprc") { - while (my $line = <BOOTSTRAPRC>) { - chomp $line; - if (($line =~ m/^\s*UserInstallation\s*=\s*([^\s]*)\s*$/) && ($1)) { - my $userConfDir=$1; - $userConfDir =~ s|\$SYSUSERCONFIG|$ENV{HOME}|; - $userConfDir =~ s|file://||; - mkdir ($userConfDir,0700) unless (-d $userConfDir); - last; - } - } - close BOOTSTRAPRC; -} -# touch ~/.recently-used with safe rights 700 if it does not exist -if (! -f "$ENV{HOME}/.recently-used") { - open (RECENTLY_USED, ">$ENV{HOME}/.recently-used") && - close RECENTLY_USED && - chmod 0600, "$ENV{HOME}/.recently-used"; -} - -if (!(-f '/proc/version')) { - print STDERR "\n\n --- Warning - OO.o will not work without a mounted /proc filesystem --- \n\n\n"; -} - -# Clear PYTHONPATH, otherwise Python scripting does not work -delete $ENV{'PYTHONPATH'}; - -# And here we go. -exec "$SystemInstallDir/program/soffice", @ooo_argv |