Removing some of the commented out code from the installer's windows code.
LGPLv3+/MPL
Jordan Ayers
From 37e112521b798c7c443eb4a9b1c0b9a198059196 Mon Sep 17 00:00:00 2001
From: Jordan Ayers <jordan.ayers@gmail.com>
Date: Wed, 10 Nov 2010 21:15:47 -0600
Subject: [PATCH] Perl Installer: Remove commented out code.
---
solenv/bin/modules/installer/windows/admin.pm | 17 -------
solenv/bin/modules/installer/windows/assembly.pm | 8 +---
solenv/bin/modules/installer/windows/component.pm | 5 +--
solenv/bin/modules/installer/windows/directory.pm | 10 ----
solenv/bin/modules/installer/windows/feature.pm | 1 -
solenv/bin/modules/installer/windows/file.pm | 3 -
solenv/bin/modules/installer/windows/font.pm | 1 -
solenv/bin/modules/installer/windows/idtglobal.pm | 29 ------------
solenv/bin/modules/installer/windows/language.pm | 3 +-
solenv/bin/modules/installer/windows/media.pm | 3 -
.../bin/modules/installer/windows/mergemodule.pm | 22 ---------
solenv/bin/modules/installer/windows/msiglobal.pm | 49 --------------------
solenv/bin/modules/installer/windows/msp.pm | 4 --
solenv/bin/modules/installer/windows/property.pm | 3 +-
solenv/bin/modules/installer/windows/shortcut.pm | 5 +-
solenv/bin/modules/installer/windows/sign.pm | 7 ---
solenv/bin/modules/installer/windows/update.pm | 3 +-
17 files changed, 7 insertions(+), 166 deletions(-)
diff --git a/solenv/bin/modules/installer/windows/admin.pm
b/solenv/bin/modules/installer/windows/admin.pm
index 2e30747..c071c21 100644
--- a/solenv/bin/modules/installer/windows/admin.pm
+++ b/solenv/bin/modules/installer/windows/admin.pm
@@ -54,13 +54,6 @@ sub unpack_cabinet_file
# But this wrong expand.exe is typically in the PATH before this expand.exe, to unpack
# cabinet files.
-# if ( $^O =~ /cygwin/i )
-# {
-# $expandfile = $ENV{'SYSTEMROOT'} . "/system32/expand.exe"; # Has to be located in
the systemdirectory
-# $expandfile =~ s/\\/\//;
-# if ( ! -f $expandfile ) { exit_program("ERROR: Did not find file $expandfile in the
Windows system folder!"); }
-# }
-
if ( $^O =~ /cygwin/i )
{
$expandfile = qx(cygpath -u "$ENV{WINDIR}"/System32/expand.exe);
@@ -70,7 +63,6 @@ sub unpack_cabinet_file
my $expandlogfile = $unpackdir . $installer::globals::separator . "expand.log";
# exclude cabinet file
- # my $systemcall = $cabarc . " -o X " . $mergemodulehash->{'cabinetfile'};
my $systemcall = "";
if ( $^O =~ /cygwin/i ) {
@@ -326,7 +318,6 @@ sub analyze_registry_file
my $component = $6;
my %helphash = ();
- # $helphash{'Registry'} = $registry;
$helphash{'Root'} = $root;
$helphash{'Key'} = $key;
$helphash{'Name'} = $name;
@@ -489,13 +480,7 @@ sub copy_files_into_directory_structure
}
if ( $destfile =~ /unopkg\.exe\s*$/ ) { $unopkgfile = $destfile; }
-
- # installer::systemactions::copy_one_file($sourcefile, $destfile);
}
- # else # allowing missing sequence numbers ?
- # {
- # installer::exiter::exit_program("ERROR: No file assigned to sequence $i",
"copy_files_into_directory_structure");
- # }
}
return $unopkgfile;
@@ -805,8 +790,6 @@ sub remove_empty_dirs_in_folder
# try to remove empty directory
my $returnvalue = rmdir $dir;
-
- # if ( $returnvalue ) { print "Successfully removed empty dir $dir\n"; }
}
}
diff --git a/solenv/bin/modules/installer/windows/assembly.pm
b/solenv/bin/modules/installer/windows/assembly.pm
index 686e5b7..1a28690 100644
--- a/solenv/bin/modules/installer/windows/assembly.pm
+++ b/solenv/bin/modules/installer/windows/assembly.pm
@@ -81,7 +81,6 @@ sub get_msiassembly_filemanifest
my $filemanifest = "";
$filemanifest = $onefile->{'uniquename'};
- # $filemanifest = $onefile->{'Name'};
return $filemanifest;
}
@@ -139,8 +138,6 @@ sub get_msiassembly_file
}
# It does not need to exist. For example products that do not contain the libraries.
- # if (! $foundfile ) { installer::exiter::exit_program("ERROR: No unique file name found for
$filename !", "get_selfreg_file"); }
-
if (! $foundfile ) { $onefile = ""; }
return $onefile;
@@ -170,8 +167,6 @@ sub get_msiassembly_file_by_gid
}
# It does not need to exist. For example products that do not contain the libraries.
- # if (! $foundfile ) { installer::exiter::exit_program("ERROR: No unique file name found for
$filename !", "get_selfreg_file"); }
-
if (! $foundfile ) { $onefile = ""; }
return $onefile;
@@ -344,7 +339,6 @@ sub add_assembly_condition_into_component_table
{
# setting the condition
- # $condition = "MsiNetAssemblySupport";
$condition = "DOTNET_SUFFICIENT=1";
$oneline = $component . "\t" . $componentid . "\t" . $directory . "\t" .
$attributes . "\t" . $condition . "\t" . $keypath . "\n";
${$componenttable}[$j] = $oneline;
@@ -368,4 +362,4 @@ sub add_assembly_condition_into_component_table
}
}
-1;
\ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/component.pm
b/solenv/bin/modules/installer/windows/component.pm
index f2a310a..b7ac5f9 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -394,9 +394,6 @@ sub create_component_table
installer::windows::idtglobal::write_idt_header(\@componenttable, "component");
- # collect_layer_conditions();
-
-
# File components
for ( my $i = 0; $i <= $#{$allfilecomponentsref}; $i++ )
@@ -526,4 +523,4 @@ sub set_component_in_environment_table
}
}
-1;
\ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/directory.pm
b/solenv/bin/modules/installer/windows/directory.pm
index c835b1e..5dbad84 100644
--- a/solenv/bin/modules/installer/windows/directory.pm
+++ b/solenv/bin/modules/installer/windows/directory.pm
@@ -235,7 +235,6 @@ sub create_defaultdir_directorynames
$hostname =~ s/\Q$installer::globals::separator\E\s*$//;
get_last_directory_name(\$hostname);
- # installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$hostname); #
making program/classes to classes
my $uniquename = $onedir->{'uniquename'};
my $shortstring;
if (( $installer::globals::updatedatabase ) && (
exists($shortdirnamehashref->{$uniquename}) ))
@@ -310,15 +309,6 @@ sub add_root_directories
{
my ($directorytableref, $allvariableshashref) = @_;
-# my $sourcediraddon = "";
-# if (($installer::globals::addchildprojects) ||
-# ($installer::globals::patch) ||
-# ($installer::globals::languagepack) ||
-# ($allvariableshashref->{'CHANGETARGETDIR'}))
-# {
-# $sourcediraddon = "\:\.";
-# }
-
my $oneline = "";
if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( !
$allvariableshashref->{'DONTUSESTARTMENUFOLDER'} ))
diff --git a/solenv/bin/modules/installer/windows/feature.pm
b/solenv/bin/modules/installer/windows/feature.pm
index 3830dc1..c35f06f 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -399,7 +399,6 @@ sub create_feature_table
$feature{'feature'} = get_feature_gid($onefeature);
$feature{'feature_parent'} = get_feature_parent($onefeature);
- # if ( $onefeature->{'ParentID'} eq "" ) { $feature{'feature_parent'} = ""; } #
Root has no parent
$feature{'Title'} = $onefeature->{'Name'};
$feature{'Description'} = $onefeature->{'Description'};
$feature{'Display'} = get_feature_display($onefeature);
diff --git a/solenv/bin/modules/installer/windows/file.pm
b/solenv/bin/modules/installer/windows/file.pm
index 871db9b..0192c3e 100644
--- a/solenv/bin/modules/installer/windows/file.pm
+++ b/solenv/bin/modules/installer/windows/file.pm
@@ -773,7 +773,6 @@ sub create_files_table
# The filenames must be collected because of uniqueness
# 01-44-~1.DAT, 01-44-~2.DAT, ...
- # my @shortnames = ();
my %shortnames = ();
if ( $installer::globals::updatedatabase ) {
collect_shortnames_from_old_database($uniquefilenamehashref, \%shortnames); }
@@ -798,7 +797,6 @@ sub create_files_table
$onefile->{'componentname'} = $file{'Component_'};
# Collecting all components
- # if (!(installer::existence::exists_in_array($file{'Component_'},
$allfilecomponentsref))) { push(@{$allfilecomponentsref}, $file{'Component_'}); }
if ( ! exists($allfilecomponents{$file{'Component_'}}) ) {
$allfilecomponents{$file{'Component_'}} = 1; }
@@ -880,7 +878,6 @@ sub create_files_table
}
# Collecting all language specific conditions
- # if ( $onefile->{'haslanguagemodule'} )
if ( $onefile->{'ismultilingual'} )
{
if ( $onefile->{'ComponentCondition'} ) { installer::exiter::exit_program("ERROR:
Cannot set language condition. There is already another component condition for file
$onefile->{'gid'}: \"$onefile->{'ComponentCondition'}\" !", "create_files_table"); }
diff --git a/solenv/bin/modules/installer/windows/font.pm
b/solenv/bin/modules/installer/windows/font.pm
index b7ca684..64dbc39 100644
--- a/solenv/bin/modules/installer/windows/font.pm
+++ b/solenv/bin/modules/installer/windows/font.pm
@@ -58,7 +58,6 @@ sub create_font_table
my %font = ();
$font{'File_'} = $onefile->{'uniquename'};
- # $font{'FontTitle'} = $onefile->{'FontName'}; # results in a warning during
validation
$font{'FontTitle'} = "";
my $oneline = $font{'File_'} . "\t" . $font{'FontTitle'} . "\n";
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm
b/solenv/bin/modules/installer/windows/idtglobal.pm
index 3e77be9..6569fd4 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -138,7 +138,6 @@ sub get_next_free_number_with_hash
if (!($dontsave))
{
- # push(@{$shortnamesref}, $newname); # adding the new shortname to the array of
shortnames
$shortnamesref->{$newname} = 1; # adding the new shortname to the array of
shortnames, always uppercase
$saved = 1;
}
@@ -256,7 +255,6 @@ sub make_eight_three_conform_with_hash
my $changed = 0;
my $saved;
- # if (( $inputstring =~ /^\s*(.*?)\.(.*?)\s*$/ ) && ( $pattern eq "file" )) # files
with a dot
if (( $inputstring =~ /^\s*(.*)\.(.*?)\s*$/ ) && ( $pattern eq "file" )) # files with a dot
{
# extension has to be non-greedy, but name is. This is important to find the last dot in
the filename
@@ -612,7 +610,6 @@ sub get_languagefilename
{
my ($idtfilename, $basedir) = @_;
- # $idtfilename =~ s/\.idt/\.ulf/;
$idtfilename =~ s/\.idt/\.mlf/;
my $languagefilename = $basedir . $installer::globals::separator . $idtfilename;
@@ -741,7 +738,6 @@ sub translate_idtfile
my $language_block = get_language_block_from_language_file($oldstring, $languagefile);
my $newstring = get_language_string_from_language_block($language_block, $onelanguage,
$oldstring);
- # if (!( $newstring eq "" )) { ${$idtfile}[$i] =~ s/$oldstring/$newstring/; }
${$idtfile}[$i] =~ s/$oldstring/$newstring/; # always substitute, even if
$newstring eq "" (there are empty strings for control.idt)
}
}
@@ -905,18 +901,12 @@ sub get_rtf_licensetext
for ( my $i = 0; $i <= $#{$licensefile}; $i++ )
{
my $oneline = ${$licensefile}[$i];
- # if ( $oneline =~ /^\s*$/ ) { $oneline = '\par'; } # empty lines
if ( $i == 0 ) { $oneline =~ s/^\W*//; }
$oneline =~ s/\t/ /g; # no tabs allowed, converting to four spaces
$oneline =~ s/\n$//g; # no newline at line end
-# $oneline =~ s/ä/\\\'e4/g; # converting "ä"
-# $oneline =~ s/ö/\\\'f6/g; # converting "ö"
-# $oneline =~ s/ü/\\\'fc/g; # converting "ü"
-# $oneline =~ s/ß/\\\'df/g; # converting "ß"
-
# german replacements
$oneline =~ s/\Ã\/\\\'c4/g; # converting "Ä"
@@ -1129,11 +1119,7 @@ sub add_language_checkboxes_to_database
my $onelanguage = ${$languagesarrayref}[$i];
my $windowslanguage = installer::windows::language::get_windows_language($onelanguage);
- # my $is_english = 0;
- # if ( $windowslanguage eq "1033" ) { $is_english = 1; }
-
my $checkboxattribute = "3";
- # if ( $is_english ) { $checkboxattribute = "1"; } # english is not deselectable
my $count = $i + 1;
my $nextcount = $i + 2;
@@ -1150,7 +1136,6 @@ sub add_language_checkboxes_to_database
my $yvalue = $offset + $i * $multiplier;
my $property = "IS" . $windowslanguage;
- # if ( ! exists($installer::globals::languageproperties{$property}) ) {
installer::exiter::exit_program("ERROR: Could not find property \"$property\" in the list of
language properties!", "add_language_checkboxes_to_database"); }
my $controlnext = "";
if ( $last ) { $controlnext = "Next"; }
@@ -1596,7 +1581,6 @@ sub include_subdirname_into_directory_table
{
my $newuniquename = "sub" . $subdir;
$newdir = $newuniquename;
- # my $newparent = $parent;
my $newparent = "INSTALLLOCATION";
my $newname = $name . "\:" . $subdir;
my $newline =
@@ -2176,9 +2160,6 @@ sub set_positions_in_table
if (( $template_exists ) && ( ! $template_replaced ))
{
- # Giving a precise error message, collecting all unresolved templates
- # my $templatestring = "";
-
for ( my $i = 0; $i <= $#{$sequencetable}; $i++ )
{
if ( ${$sequencetable}[$i] =~ /^\s*([\w\.]+)\t.*\t\s*(POSITIONTEMPLATE_.*?)\s*$/ )
@@ -2187,22 +2168,12 @@ sub set_positions_in_table
my $fulltemplate = $2;
my $template = $fulltemplate;
$template =~ s/POSITIONTEMPLATE_//;
- # my $newstring = $customactionname . " (" . $template . ")";
- # $templatestring = $templatestring . $newstring . ", ";
- # Setting at the end!
$lastposition = $lastposition + 25;
${$sequencetable}[$i] =~ s/$fulltemplate/$lastposition/;
$infoline = "WARNING: Setting position \"$lastposition\" for custom action
\"$customactionname\". Could not find CustomAction \"$template\".\n";
push(@installer::globals::logfileinfo, $infoline);
}
}
- # $templatestring =~ s/,\s*$//;
-
- # $infoline = "Error: Saving table \"$tablename\"\n";
- # push(@installer::globals::logfileinfo, $infoline);
- # print $infoline;
- # installer::files::save_file($tablename, $sequencetable);
- # installer::exiter::exit_program("ERROR: Unresolved positions in CustomActions in scp2:
$templatestring", "set_positions_in_table");
}
}
diff --git a/solenv/bin/modules/installer/windows/language.pm
b/solenv/bin/modules/installer/windows/language.pm
index 093d1c2..f20235a 100644
--- a/solenv/bin/modules/installer/windows/language.pm
+++ b/solenv/bin/modules/installer/windows/language.pm
@@ -60,7 +60,6 @@ sub get_windows_encoding
if ( $installer::globals::msiencoding->{$language} ) { $windowsencoding =
$installer::globals::msiencoding->{$language}; }
- # if ( $windowsencoding eq "" ) { installer::exiter::exit_program("ERROR: Unknown language
$language in function get_windows_encoding", "get_windows_encoding"); }
if ( $windowsencoding eq "" ) { $windowsencoding = "0"; } # setting value, if the language is
not listed in the encodinglist
if ( $windowsencoding eq "0" ) { $windowsencoding = "65001"; } # languages with "0" have
to be available in UTF-8 (65001)
@@ -71,4 +70,4 @@ sub get_windows_encoding
return $windowsencoding;
}
-1;
\ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/media.pm
b/solenv/bin/modules/installer/windows/media.pm
index e8d32b8..efa5157 100644
--- a/solenv/bin/modules/installer/windows/media.pm
+++ b/solenv/bin/modules/installer/windows/media.pm
@@ -351,7 +351,6 @@ sub create_media_table
if ( $allvariables->{'CABFILENUMBER'} ) { $maxcabfilenumber =
$allvariables->{'CABFILENUMBER'}; }
my $allfiles = $#{$filesref} + 1;
my $maxfilenumber = get_maximum_filenumber($allfiles, $maxcabfilenumber);
- # my $maxfilenumber = 1000; # maximum 1000 files in each cabinet file
my $cabfilenumber = 0;
my $cabfull = 0;
my $counter = 0;
@@ -385,7 +384,6 @@ sub create_media_table
$cabfilenumber++;
$media{'DiskId'} = get_media_diskid($cabfilenumber);
- # $media{'LastSequence'} = get_media_lastsequence($onefile);
$media{'LastSequence'} = $i + 1; # This should be correct, also for unsorted
files collectors
$media{'DiskPrompt'} = get_media_diskprompt();
$media{'Cabinet'} = generate_cab_filename_for_some_cabs($allvariables,
$cabfilenumber);
@@ -420,7 +418,6 @@ sub create_media_table
my $maximumfile = $#{$filesref};
$media{'DiskId'} = get_media_diskid($diskid);
- # $media{'LastSequence'} = ${$filesref}[$maximumfile]->{'sequencenumber'}; # sequence
number of the last file
$media{'LastSequence'} = $maximumfile + 1; # This works also for unsorted file collector
$media{'DiskPrompt'} = get_media_diskprompt();
$media{'Cabinet'} = generate_cab_filename($allvariables);
diff --git a/solenv/bin/modules/installer/windows/mergemodule.pm
b/solenv/bin/modules/installer/windows/mergemodule.pm
index 4194164..be95ae8 100755
--- a/solenv/bin/modules/installer/windows/mergemodule.pm
+++ b/solenv/bin/modules/installer/windows/mergemodule.pm
@@ -79,7 +79,6 @@ sub merge_mergemodules_into_msi_database
%installer::globals::mergemodules = ();
my $mergemoduledir = installer::systemactions::create_directories("mergefiles",
$languagestringref);
- # push(@installer::globals::removedirs, $mergemoduledir);
my $mergemodule;
foreach $mergemodule ( @{$mergemodules} )
@@ -144,7 +143,6 @@ sub merge_mergemodules_into_msi_database
}
else
{
- # $systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e File
Component MsiAssembly Directory";
$systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e \*";
}
@@ -1111,23 +1109,6 @@ sub change_file_table
{
if ( ! -d $unpackdir ) { installer::systemactions::create_directory($unpackdir); }
- # Unpack the cab file, so that in can be included into the last office cabinet file.
Attention: cararc.exe from cabsdk required.
- # cabarc.exe -o X <fullcabfilepath>
-
- # my $cabarcfilename = "cabarc.exe";
- # my $cabarcfile =
installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename,
$includepatharrayref, 1);
-
- # if ( ! -f $$cabarcfile )
- # {
- # $cabarcfilename = "CABARC.EXE";
- # $cabarcfile =
installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename,
$includepatharrayref, 1);
- # if ( ! -f $$cabarcfile )
- # {
- # installer::exiter::exit_program("ERROR: cabarc.exe not found !",
"change_file_table");
- # }
- # }
- # my $cabarc = $$cabarcfile;
-
# changing directory
my $from = cwd();
my $to = $mergemodulehash->{'workdir'};
@@ -1154,9 +1135,6 @@ sub change_file_table
my $cabfilename = "MergeModule.CABinet";
- # exclude cabinet file
- # my $systemcall = $cabarc . " -o X " . $mergemodulehash->{'cabinetfile'};
-
my $systemcall = "";
if ( $^O =~ /cygwin/i ) {
my $localunpackdir = qx(cygpath -m "$unpackdir");
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm
b/solenv/bin/modules/installer/windows/msiglobal.pm
index 735c6e5..8e1f906 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -1471,7 +1471,6 @@ sub get_guid_list
# "-c" for uppercase output
- # my $systemcall = "$uuidgen -n$number -c |";
my $systemcall = "$uuidgen -n$number |";
open (UUIDGEN, "$systemcall" ) or die("uuidgen is missing.");
my @uuidlist = <UUIDGEN>;
@@ -1514,7 +1513,6 @@ sub calculate_guid
my $digest = $md5->hexdigest;
$digest = uc($digest);
- # my $id = pack("A32", $digest);
my ($first, $second, $third, $fourth, $fifth) = unpack ('A8 A4 A4 A4 A12', $digest);
$guid = "$first-$second-$third-$fourth-$fifth";
@@ -1588,8 +1586,6 @@ sub set_uuid_into_component_table
my $infoline = "";
my $counter = 0;
- # my $componentfile = installer::files::read_file($installer::globals::componentfilename);
- # my $componenthash = fill_component_hash($componentfile);
for ( my $i = 3; $i <= $#{$componenttable}; $i++ ) # ignoring the first three lines
{
@@ -1599,13 +1595,6 @@ sub set_uuid_into_component_table
my $uuid = "";
- # if ( $componenthash->{$componentname} )
- # {
- # $uuid = $componenthash->{$componentname};
- # }
- # else
- # {
-
if ( exists($installer::globals::calculated_component_guids{$componentname}))
{
$uuid = $installer::globals::calculated_component_guids{$componentname};
@@ -1629,44 +1618,12 @@ sub set_uuid_into_component_table
if ( exists($installer::globals::allcalculated_guids{$uuid}) ) {
installer::exiter::exit_program("ERROR: \"$uuid\" was already created before!",
"set_uuid_into_component_table"); }
$installer::globals::allcalculated_guids{$uuid} = 1;
$installer::globals::calculated_component_guids{$componentname} = $uuid;
-
- # Setting new uuid
- # $componenthash->{$componentname} = $uuid;
-
- # Setting flag
- # $installer::globals::created_new_component_guid = 1; # this is very important!
}
- # }
${$componenttable}[$i] =~ s/COMPONENTGUID/$uuid/;
}
installer::files::save_file($componenttablename, $componenttable);
-
-# if ( $installer::globals::created_new_component_guid )
-# {
-# # create new component file!
-# $componentfile = create_new_component_file($componenthash);
-# installer::worker::sort_array($componentfile);
-#
-# # To avoid conflict the components file cannot be saved at the same place
-# # All important data have to be saved in the directory:
$installer::globals::infodirectory
-# my $localcomponentfilename = $installer::globals::componentfilename;
-#
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$localcomponentfilename);
-# $localcomponentfilename = $installer::globals::infodirectory .
$installer::globals::separator . $localcomponentfilename;
-# installer::files::save_file($localcomponentfilename, $componentfile);
-#
-# # installer::files::save_file($installer::globals::componentfilename,
$componentfile); # version using new file in solver
-#
-# $infoline = "COMPONENTCODES: Created $counter new GUIDs for components ! \n";
-# push( @installer::globals::logfileinfo, $infoline);
-# }
-# else
-# {
-# $infoline = "SUCCESS COMPONENTCODES: All component codes exist! \n";
-# push( @installer::globals::logfileinfo, $infoline);
-# }
-
}
#################################################################
@@ -1782,8 +1739,6 @@ sub execute_packaging
installer::logger::print_message( "... makecab.exe ($callscounter/$allmakecabcalls) ...
\n" );
- # my $returnvalue = system($systemcall);
-
for ( my $n = 1; $n <= $maxmakecabcalls; $n++ )
{
my @ddfoutput = ();
@@ -1811,7 +1766,6 @@ sub execute_packaging
}
push( @installer::globals::logfileinfo, $infoline);
- # for ( my $j = 0; $j <= $#ddfoutput; $j++ ) { push(
@installer::globals::logfileinfo, "$ddfoutput[$j]"); }
for ( my $m = 0; $m <= $#ddfoutput; $m++ )
{
@@ -1828,7 +1782,6 @@ sub execute_packaging
}
else
{
- # installer::logger::print_message( "Success (Try $n): \"$systemcall\"\n" );
$infoline = "Success (Try $n): $systemcall";
push( @installer::globals::logfileinfo, $infoline);
last;
@@ -1931,7 +1884,6 @@ sub set_global_code_variables
$installer::globals::upgradecode =
installer::windows::idtglobal::get_language_string_from_language_block($codeblock, $onelanguage,
"");
}
- # if (( $installer::globals::productcode eq "" ) && ( ! $isopensource )) {
installer::exiter::exit_program("ERROR: ProductCode for language $onelanguage not defined in
$installer::globals::codefilename !", "set_global_code_variables"); }
if ( $installer::globals::upgradecode eq "" ) { installer::exiter::exit_program("ERROR:
UpgradeCode not defined in $installer::globals::codefilename !", "set_global_code_variables"); }
$infoline = "Setting ProductCode to: $installer::globals::productcode \n";
@@ -2254,7 +2206,6 @@ sub read_saved_mappings
installer::exiter::exit_program("ERROR: Duplicate entries in saved mappings!",
"read_saved_mappings");
}
} else {
- # push( @installer::globals::globallogfileinfo, "WARNING: Windows patch shall be prepared,
but PREVIOUS_IDT_DIR is not set!\n" );
installer::exiter::exit_program("ERROR: Windows patch shall be prepared, but environment
variable PREVIOUS_IDT_DIR is not set!", "read_saved_mappings");
}
diff --git a/solenv/bin/modules/installer/windows/msp.pm
b/solenv/bin/modules/installer/windows/msp.pm
index e4e5494..d4a7b90 100644
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ b/solenv/bin/modules/installer/windows/msp.pm
@@ -229,7 +229,6 @@ sub execute_msimsp
$locallogfilename =~ s/\//\\\\/g;
$localmspfilename =~ s/\\/\\\\/g; # path already contains backslash
- # $localmspfilename =~ s/\//\\\\/g;
$localmsimsptemppath = qx{cygpath -w "$localmsimsptemppath"};
$localmsimsptemppath =~ s/\\/\\\\/g;
@@ -1082,10 +1081,7 @@ sub convert_unicode_to_ascii
my $savfilename = $filename . "_before.unicode";
installer::systemactions::copy_one_file($filename, $savfilename);
-# open( IN, "<:utf16", $filename ) || installer::exiter::exit_program("ERROR: Cannot open
file $filename for reading", "convert_unicode_to_ascii");
-# open( IN, "<:para:crlf:uni", $filename ) || installer::exiter::exit_program("ERROR: Cannot
open file $filename for reading", "convert_unicode_to_ascii");
open( IN, "<:encoding(UTF16-LE)", $filename ) || installer::exiter::exit_program("ERROR:
Cannot open file $filename for reading", "convert_unicode_to_ascii");
-# open( IN, "<:encoding(UTF-8)", $filename ) || installer::exiter::exit_program("ERROR:
Cannot open file $filename for reading", "convert_unicode_to_ascii");
while ( $line = <IN> ) {
push @localfile, $line;
}
diff --git a/solenv/bin/modules/installer/windows/property.pm
b/solenv/bin/modules/installer/windows/property.pm
index 56cc8ca..977babd 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -166,8 +166,7 @@ sub get_productname_for_property_table
if ( $installer::globals::languagepack )
{
- # my $langstring = get_language_string(); # Example (English, Deutsch)
- my $langstring = get_english_language_string(); # New: (English, German)
+ my $langstring = get_english_language_string(); # Example: (English, German)
$productname = $name . " " . $version . " Language Pack" . " " . $langstring;
}
diff --git a/solenv/bin/modules/installer/windows/shortcut.pm
b/solenv/bin/modules/installer/windows/shortcut.pm
index 5b82c34..91e6302 100644
--- a/solenv/bin/modules/installer/windows/shortcut.pm
+++ b/solenv/bin/modules/installer/windows/shortcut.pm
@@ -357,10 +357,9 @@ sub get_folderitem_directory
{
my ($shortcut) = @_;
- # my $directory = "$installer::globals::programmenufolder"; # default
my $directory = "$installer::globals::officemenufolder"; # default
- # The value $installer::globals::programmenufolder is not correct for the
+ # The default is not correct for the
# PREDEFINED folders, like PREDEFINED_AUTOSTART
if ( $shortcut->{'FolderID'} eq "PREDEFINED_AUTOSTART" )
@@ -694,4 +693,4 @@ sub create_shortcut_table
}
-1;
\ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/sign.pm
b/solenv/bin/modules/installer/windows/sign.pm
index f23626d..fc27367 100644
--- a/solenv/bin/modules/installer/windows/sign.pm
+++ b/solenv/bin/modules/installer/windows/sign.pm
@@ -243,9 +243,6 @@ sub execute_open_system_call
if( $^O =~ /cygwin/i )
{
- # $comspec =~ s/\\/\\\\/g;
- # $comspec = qx{cygpath -u "$comspec"};
- # $comspec =~ s/\s*$//g;
$comspec = "";
}
@@ -548,7 +545,6 @@ sub cabinet_cosistency_check
my $sourcecabfile = $finalinstalldir . $installer::globals::separator . $onefile;
my $currentpath = cwd();
my $destcabfile = $currentpath . $installer::globals::separator . $onefile;
- # my $destcabfile = $onefile;
if ( $^O =~ /cygwin/i )
{
@@ -614,7 +610,6 @@ sub cabinet_cosistency_check
# Also making a binary diff?
my $difffile = "diff.exe"; # has to be in the path
- # $systemcall = "$difffile $sourcecabfile $destcabfile"; # Test for differences
$systemcall = "$difffile $origfile $newfile";
$infoline = $systemcall . "\n";
$returnvalue = make_systemcall($systemcall, $systemcall);
@@ -1050,8 +1045,6 @@ sub already_certified
if ( $returnvalue ) { $success = 0; }
- # my $success = make_systemcall($systemcall, $systemcall);
-
if ( $success )
{
$is_certified = 1;
diff --git a/solenv/bin/modules/installer/windows/update.pm
b/solenv/bin/modules/installer/windows/update.pm
index da94171..5782463 100644
--- a/solenv/bin/modules/installer/windows/update.pm
+++ b/solenv/bin/modules/installer/windows/update.pm
@@ -334,7 +334,6 @@ sub readdatabase
}
else
{
- # installer::logger::print_message( "... no update process, no database found ...\n" );
$infoline = "\nNo database found in $completelistname. This is no update process!\n\n";
}
push( @installer::globals::logfileinfo, $infoline);
@@ -597,4 +596,4 @@ sub create_database_hashes
}
-1;
\ No newline at end of file
+1;
--
1.7.1
Context
- [Libreoffice] [PATCH] Perl Installer: Remove commented out code. · Jordan Ayers
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.