[Libreoffice-commits] .: solenv/bin
Andras Timar
timar at kemper.freedesktop.org
Fri Dec 9 00:54:36 PST 2011
solenv/bin/make_installer.pl | 12 --
solenv/bin/modules/installer/control.pm | 16 ---
solenv/bin/modules/installer/globals.pm | 2
solenv/bin/modules/installer/upx.pm | 156 --------------------------------
4 files changed, 186 deletions(-)
New commits:
commit d9eff9df1681169d25ab29fbad49ad39cc3e9519
Author: Andras Timar <atimar at suse.com>
Date: Fri Dec 9 09:52:53 2011 +0100
remove upx exepacker support
it was not used and anti-malware programs are allergic to exepackers
anyway...
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index e427cd5..4142561 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -61,7 +61,6 @@ use installer::simplepackage;
use installer::sorter;
use installer::strip;
use installer::substfilenamefiles;
-use installer::upx;
use installer::systemactions;
use installer::windows::assembly;
use installer::windows::binary;
@@ -1203,17 +1202,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16c.log", $filesinproductlanguageresolvedarrayref); }
}
- ###########################################
- # Using upx, to decrease file size
- # Currently only for Windows.
- ###########################################
-
- if ( $allvariableshashref->{'UPXPRODUCT'} )
- {
- installer::upx::upx_on_libraries($filesinproductlanguageresolvedarrayref, $languagestringref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16d.log", $filesinproductlanguageresolvedarrayref); }
- }
-
###########################################################
# Simple package projects can now start to create the
# installation structure by creating Directories, Files
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm
index 07dcbee..0234b7c 100644
--- a/solenv/bin/modules/installer/control.pm
+++ b/solenv/bin/modules/installer/control.pm
@@ -157,22 +157,6 @@ sub check_system_path
$installer::globals::epm_path = $$fileref;
}
}
-
- # checking, if upx can be found in path
-
- if ( $installer::globals::iswindowsbuild ) { $installer::globals::upxfile = "upx.exe"; }
- else { $installer::globals::upxfile = "upx"; }
-
- my $upxfilename = $installer::globals::upxfile;
- my $upxfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$upxfilename, $patharrayref , 0);
-
- if (!( $$upxfileref eq "" ))
- {
- $installer::globals::upx_in_path = 1;
- $installer::globals::upxfile = $$upxfileref;
- installer::logger::print_message( "\tFound: $$upxfileref\n" );
- }
-
}
######################################################################
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 9913967..49f13e6 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -199,8 +199,6 @@ BEGIN
$epm_in_path = 0;
$epm_path = "";
$epmoutpath = "";
- $upx_in_path = 0;
- $upxfile = "";
$simple = 0;
$simpledefaultuserdir = "\$ORIGIN/..";
$call_epm = 1;
diff --git a/solenv/bin/modules/installer/upx.pm b/solenv/bin/modules/installer/upx.pm
deleted file mode 100644
index 7bfb14f..0000000
--- a/solenv/bin/modules/installer/upx.pm
+++ /dev/null
@@ -1,156 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org 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 Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-package installer::upx;
-
-use installer::converter;
-use installer::existence;
-use installer::globals;
-use installer::logger;
-use installer::pathanalyzer;
-use installer::scriptitems;
-use installer::systemactions;
-
-#####################################################################
-# Checking whether a file has to be stripped
-#####################################################################
-
-sub is_upx_candidate
-{
- my ( $filename, $onefile ) = @_;
-
- my $useupx = 0;
-
- if (( $filename =~ /\.so\s*$/ ) ||
- ( $filename =~ /\.dll\s*$/ ) ||
- ( $filename =~ /\.exe\s*$/ ) ||
- ( $filename =~ /\.bin\s*$/ ))
- {
- my $styles = "";
- if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
- if ( ! ( $styles =~ /\bDONT_UPX\b/ )) { $useupx = 1; }
- }
-
- return $useupx;
-}
-
-#####################################################################
-# Checking whether a file has to be stripped
-#####################################################################
-
-sub do_upx
-{
- my ( $filename ) = @_;
-
- my $compression = "9";
- my $systemcall = $installer::globals::upxfile . " -" . $compression . " " . $filename;
-
- my $returnvalue = system($systemcall);
-
- my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- if ($returnvalue)
- {
- $infoline = "WARNING: Could not successfully upx $filename! Using original file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- else
- {
- $infoline = "SUCCESS: upx $filename!\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- return $returnvalue;
-}
-
-#####################################################################
-# Using upx to decrease file size
-#####################################################################
-
-sub upx_on_libraries
-{
- my ( $filelist, $languagestringref) = @_;
-
- installer::logger::include_header_into_logfile("UPX'ing files:");
- my $infoline = "";
-
- if ( ! $installer::globals::upx_in_path )
- {
- $infoline = "\n\nWarning: This is an UPX product, but upx was not found in PATH!\n\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- else
- {
- $infoline = "Using upx: $installer::globals::upxfile\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- my $upxdirbase = installer::systemactions::create_directories("upx", $languagestringref);
-
- if (! installer::existence::exists_in_array($upxdirbase, \@installer::globals::removedirs))
- {
- push(@installer::globals::removedirs, $upxdirbase);
- }
-
- for ( my $i = 0; $i <= $#{$filelist}; $i++ )
- {
- my $sourcefilename = ${$filelist}[$i]->{'sourcepath'};
-
- if ( is_upx_candidate($sourcefilename, ${$filelist}[$i]) )
- {
- my $shortfilename = $sourcefilename;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$shortfilename);
-
- $infoline = "\nUpx: $shortfilename";
- push( @installer::globals::logfileinfo, $infoline);
-
- # copy file into directory for stripped libraries
- my $onelanguage = ${$filelist}[$i]->{'specificlanguage'};
-
- # files without language into directory "00"
- if ($onelanguage eq "") { $onelanguage = "00"; }
-
- my $upxdir = $upxdirbase . $installer::globals::separator . $onelanguage;
- installer::systemactions::create_directory($upxdir); # creating language specific subdirectories
-
- my $destfilename = $upxdir . $installer::globals::separator . $shortfilename;
- installer::systemactions::copy_one_file($sourcefilename, $destfilename);
-
- # change sourcepath in files collector
- ${$filelist}[$i]->{'sourcepath'} = $destfilename;
-
- # do upx on file
- my $return = do_upx($destfilename);
-
- # Using original file, if upx was not successful (no reason for error)
- if ( $return ) { ${$filelist}[$i]->{'sourcepath'} = $sourcefilename; }
- }
- }
- }
-}
-
-1;
More information about the Libreoffice-commits
mailing list