You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2021/05/21 18:57:46 UTC

[openoffice] branch AOO41X updated: Re-enable adapted texts for NSIS installer.

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
     new 3c0d14c  Re-enable adapted texts for NSIS installer.
3c0d14c is described below

commit 3c0d14cb62bf956bd654028d32598f68071d2c69
Author: mseidel <ms...@apache.org>
AuthorDate: Fri May 21 20:56:47 2021 +0200

    Re-enable adapted texts for NSIS installer.
    
    This fixes https://bz.apache.org/ooo/show_bug.cgi?id=127628
---
 main/solenv/bin/modules/installer/download.pm | 740 +++++++++++++-------------
 1 file changed, 372 insertions(+), 368 deletions(-)

diff --git a/main/solenv/bin/modules/installer/download.pm b/main/solenv/bin/modules/installer/download.pm
index 64fb417..13ac54b 100644
--- a/main/solenv/bin/modules/installer/download.pm
+++ b/main/solenv/bin/modules/installer/download.pm
@@ -1,5 +1,5 @@
 #**************************************************************
-#  
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
 #  distributed with this work for additional information
@@ -7,16 +7,16 @@
 #  to you under the Apache License, Version 2.0 (the
 #  "License"); you may not use this file except in compliance
 #  with the License.  You may obtain a copy of the License at
-#  
+#
 #    http://www.apache.org/licenses/LICENSE-2.0
-#  
+#
 #  Unless required by applicable law or agreed to in writing,
 #  software distributed under the License is distributed on an
 #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 #  KIND, either express or implied.  See the License for the
 #  specific language governing permissions and limitations
 #  under the License.
-#  
+#
 #**************************************************************
 
 
@@ -34,7 +34,7 @@ use installer::systemactions;
 
 use strict;
 
-BEGIN { # This is needed so that cygwin's perl evaluates ACLs
+BEGIN { # This is needed so that Cygwin's perl evaluates ACLs
 	# (needed for correctly evaluating the -x test.)
 	if( $^O =~ /cygwin/i ) {
 		require filetest; import filetest "access";
@@ -42,19 +42,19 @@ BEGIN { # This is needed so that cygwin's perl evaluates ACLs
 }
 
 ##################################################################
-# Including the lowercase product name into the script template 
+# Including the lowercase product name into the script template
 ##################################################################
 
 sub put_productname_into_script
 {
 	my ($scriptfile, $variableshashref) = @_;
-	
+
 	my $productname = $variableshashref->{'PRODUCTNAME'};
 	$productname = lc($productname);
 	$productname =~ s/\.//g;	# openoffice.org -> openofficeorg
 	$productname =~ s/\s*//g;
 
-    $installer::logger::Lang->printf("Adding productname %s into download shell script\n", $productname);
+	$installer::logger::Lang->printf("Adding productname %s into download shell script\n", $productname);
 
 	for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
 	{
@@ -63,25 +63,25 @@ sub put_productname_into_script
 }
 
 #########################################################
-# Including the linenumber into the script template 
+# Including the linenumber into the script template
 #########################################################
 
 sub put_linenumber_into_script
 {
 	my ( $scriptfile ) = @_;
-	
-	my $linenumber =  $#{$scriptfile} + 2;
 
-    $installer::logger::Lang->printf("Adding linenumber %d into download shell script\n", $linenumber);
+	my $linenumber = $#{$scriptfile} + 2;
+
+	$installer::logger::Lang->printf("Adding linenumber %d into download shell script\n", $linenumber);
 
 	for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
 	{
 		${$scriptfile}[$i] =~ s/LINENUMBERPLACEHOLDER/$linenumber/;
-	}	
+	}
 }
 
 #########################################################
-# Determining the name of the new scriptfile 
+# Determining the name of the new scriptfile
 #########################################################
 
 sub determine_scriptfile_name
@@ -92,35 +92,35 @@ sub determine_scriptfile_name
 	$filename = $filename . $installer::globals::downloadfileextension;
 	$installer::globals::downloadfilename = $filename;
 
-    $installer::logger::Lang->printf("Setting download shell script file name to %s\n", $filename);
+	$installer::logger::Lang->printf("Setting download shell script file name to %s\n", $filename);
 
 	return $filename;
 }
 
 #########################################################
-# Saving the script file in the installation directory 
+# Saving the script file in the installation directory
 #########################################################
 
 sub save_script_file
 {
 	my ($directory, $newscriptfilename, $scriptfile) = @_;
-	
+
 	$newscriptfilename = $directory . $installer::globals::separator . $newscriptfilename;
 	installer::files::save_file($newscriptfilename, $scriptfile);
 
-    $installer::logger::Lang->printf("Saving script file %s\n", $newscriptfilename);
+	$installer::logger::Lang->printf("Saving script file %s\n", $newscriptfilename);
 
 	if ( ! $installer::globals::iswindowsbuild )
 	{
 		my $localcall = "chmod 775 $newscriptfilename \>\/dev\/null 2\>\&1";
 		system($localcall);
 	}
-	
+
 	return $newscriptfilename;
 }
 
 #########################################################
-# Including checksum and size into script file 
+# Including checksum and size into script file
 #########################################################
 
 sub put_checksum_and_size_into_script
@@ -129,30 +129,30 @@ sub put_checksum_and_size_into_script
 
 	my $checksum = "";
 	my $size = "";
-	
-	if  ( $sumout =~ /^\s*(\d+)\s+(\d+)\s*$/ )
+
+	if ( $sumout =~ /^\s*(\d+)\s+(\d+)\s*$/ )
 	{
 		$checksum = $1;
-		$size = $2;		
+		$size = $2;
 	}
 	else
 	{
 		installer::exiter::exit_program("ERROR: Incorrect return value from /usr/bin/sum: $sumout", "put_checksum_and_size_into_script");
 	}
 
-    $installer::logger::Lang->printf(
-        "Adding checksum %s and size %s into download shell script\n", $checksum, $size);
+	$installer::logger::Lang->printf(
+		"Adding checksum %s and size %s into download shell script\n", $checksum, $size);
 
 	for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
 	{
 		${$scriptfile}[$i] =~ s/CHECKSUMPLACEHOLDER/$checksum/;
 		${$scriptfile}[$i] =~ s/DISCSPACEPLACEHOLDER/$size/;
 	}
-	
+
 }
 
 #########################################################
-# Calling md5sum 
+# Calling md5sum
 #########################################################
 
 sub call_md5sum
@@ -160,11 +160,11 @@ sub call_md5sum
 	my ($filename) = @_;
 
 	my $md5sumfile = "/usr/bin/md5sum";
-	
+
 	if ( ! -f $md5sumfile ) { installer::exiter::exit_program("ERROR: No file /usr/bin/md5sum", "call_md5sum"); }
-	
+
 	my $systemcall = "$md5sumfile $filename |";
-	
+
 	my $md5sumoutput = "";
 
 	open (SUM, "$systemcall");
@@ -173,31 +173,31 @@ sub call_md5sum
 
 	my $returnvalue = $?;	# $? contains the return value of the systemcall
 
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-		
+	$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+
 	if ($returnvalue)
 	{
-        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
+		$installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 	}
 	else
 	{
-        $installer::logger::Lang->print("Success: Executed \"%s\" successfully!\n", $systemcall);
+		$installer::logger::Lang->print("Success: Executed \"%s\" successfully!\n", $systemcall);
 	}
-	
-	return $md5sumoutput;		
+
+	return $md5sumoutput;
 }
 
 #########################################################
-# Calling md5sum 
+# Calling md5sum
 #########################################################
 
 sub get_md5sum
 {
 	my ($md5sumoutput) = @_;
-	
+
 	my $md5sum;
-	
-	if  ( $md5sumoutput =~ /^\s*(\w+?)\s+/ )
+
+	if ( $md5sumoutput =~ /^\s*(\w+?)\s+/ )
 	{
 		$md5sum = $1;
 	}
@@ -206,13 +206,13 @@ sub get_md5sum
 		installer::exiter::exit_program("ERROR: Incorrect return value from /usr/bin/md5sum: $md5sumoutput", "get_md5sum");
 	}
 
-    $installer::logger::Lang->printf("Setting md5sum: %s\n", $md5sum);
+	$installer::logger::Lang->printf("Setting md5sum: %s\n", $md5sum);
 
 	return $md5sum;
 }
 
 #########################################################
-# Determining checksum and size of tar file 
+# Determining checksum and size of tar file
 #########################################################
 
 sub call_sum
@@ -220,7 +220,7 @@ sub call_sum
 	my ($filename, $getuidlibrary) = @_;
 
 	my $systemcall = "/usr/bin/sum $filename |";
-	
+
 	my $sumoutput = "";
 
 	open (SUM, "$systemcall");
@@ -229,29 +229,29 @@ sub call_sum
 
 	my $returnvalue = $?;	# $? contains the return value of the systemcall
 
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-		
+	$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+
 	if ($returnvalue)
 	{
-        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
+		$installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 	}
 	else
 	{
-        $installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
+		$installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
 	}
-	
+
 	$sumoutput =~ s/\s+$filename\s$//;
-	return $sumoutput;	
+	return $sumoutput;
 }
 
 #########################################################
-# Searching for the getuid.so in the solver 
+# Searching for the getuid.so in the solver
 #########################################################
 
 sub get_path_for_library
 {
 	my ($includepatharrayref) = @_;
-	
+
 	my $getuidlibraryname = "getuid.so";
 
 	my $getuidlibraryref = "";
@@ -266,12 +266,12 @@ sub get_path_for_library
 	}
 
 	if ($$getuidlibraryref eq "") { installer::exiter::exit_program("ERROR: Could not find $getuidlibraryname!", "get_path_for_library"); }
-	
+
 	return $$getuidlibraryref;
 }
 
 #########################################################
-# Include the tar file into the script 
+# Include the tar file into the script
 #########################################################
 
 sub include_tar_into_script
@@ -281,21 +281,21 @@ sub include_tar_into_script
 	my $systemcall = "cat $temporary_tarfile >> $scriptfile && rm $temporary_tarfile";
 	my $returnvalue = system($systemcall);
 
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-		
+	$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+
 	if ($returnvalue)
 	{
-        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
+		$installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 	}
 	else
 	{
-        $installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
+		$installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
 	}
 	return $returnvalue;
 }
 
 #########################################################
-# Create a tar file from the binary package 
+# Create a tar file from the binary package
 #########################################################
 
 sub tar_package
@@ -311,20 +311,20 @@ sub tar_package
 	}
 
 	my $systemcall = "cd $installdir; $ldpreloadstring tar -cf - * > $tarfilename";
-	
+
 	my $returnvalue = system($systemcall);
 
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-		
+	$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+
 	if ($returnvalue)
 	{
-        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
+		$installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 	}
 	else
 	{
-        $installer::logger::Lang->printf("Success: Executed \"\" successfully!\n", $systemcall);
+		$installer::logger::Lang->printf("Success: Executed \"\" successfully!\n", $systemcall);
 	}
-	
+
 	my $localcall = "chmod 775 $tarfilename \>\/dev\/null 2\>\&1";
 	$returnvalue = system($localcall);
 
@@ -351,24 +351,24 @@ sub create_tar_gz_file_from_package
 		my $systemcall = "cd $installdir; rm $onefile";
 		my $returnvalue = system($systemcall);
 
-        $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-		
+		$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+
 		if ($returnvalue)
 		{
-            $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
+			$installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 		}
 		else
 		{
-            $installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
+			$installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
 		}
 	}
 
 	$alldirs = installer::systemactions::get_all_directories($installdir);
-	my $packagename = ${$alldirs}[0]; # only taking the first Solaris package			
-	if ( $packagename eq "" ) { installer::exiter::exit_program("ERROR: Could not find package in directory $installdir!", "determine_packagename"); } 
+	my $packagename = ${$alldirs}[0]; # only taking the first Solaris package
+	if ( $packagename eq "" ) { installer::exiter::exit_program("ERROR: Could not find package in directory $installdir!", "determine_packagename"); }
 
 	installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$packagename);
-	
+
 	$installer::globals::downloadfileextension = ".tar.gz";
 	my $targzname = $packagename . $installer::globals::downloadfileextension;
 	$installer::globals::downloadfilename = $targzname;
@@ -382,19 +382,19 @@ sub create_tar_gz_file_from_package
 	}
 
 	my $systemcall = "cd $installdir; $ldpreloadstring tar -cf - $packagename | gzip > $targzname";
-    $installer::logger::Info->printf("... %s ...\n", $systemcall);
+	$installer::logger::Info->printf("... %s ...\n", $systemcall);
 
 	my $returnvalue = system($systemcall);
 
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-		
+	$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+
 	if ($returnvalue)
 	{
-        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
+		$installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 	}
 	else
 	{
-        $installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
+		$installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
 	}
 }
 
@@ -405,10 +405,10 @@ sub create_tar_gz_file_from_package
 sub get_installation_type
 {
 	my $type = "";
-	
+
 	if ( $installer::globals::languagepack ) { $type = "langpack"; }
 	else { $type = "install"; }
-	
+
 	return $type;
 }
 
@@ -430,11 +430,11 @@ sub get_downloadname_language
 
 	# en-US is default language and can be removed therefore
 	# for one-language installation sets
-	
+
 	# if ( $languages =~ /^\s*en-US\s*$/ )
 	# {
 	#	$languages = "";
-	# }	
+	# }
 
 	if ( length ($languages) > $installer::globals::max_lang_length )
 	{
@@ -450,44 +450,44 @@ sub get_downloadname_language
 
 sub get_downloadname_productname
 {
-    my ($allvariables) = @_;
-
-    my $start;
-
-    if ( $allvariables->{'AOODOWNLOADNAMEPREFIX'} )
-    {
-        $start = $allvariables->{'AOODOWNLOADNAMEPREFIX'};
-    }
-    else
-    {
-        $start = "Apache_OpenOffice";
-        if ( $allvariables->{'PRODUCTNAME'} eq "OpenOffice" ) 
-        {
-            if ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )
-            {
-                $start .= "-SDK"; 
-            }
-        }
-
-        if ( $allvariables->{'PRODUCTNAME'} eq "AOO-Developer-Build" ) 
-        {
-            if ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )
-            {
-                $start .= "-Dev-SDK"; 
-            }
-            else
-            {
-                $start .= "-Dev";
-            }
-        }
-
-        if ( $allvariables->{'PRODUCTNAME'} eq "URE" )
-        {
-            $start .= "-URE";
-        }
-    }
-
-    return $start;
+	my ($allvariables) = @_;
+
+	my $start;
+
+	if ( $allvariables->{'AOODOWNLOADNAMEPREFIX'} )
+	{
+		$start = $allvariables->{'AOODOWNLOADNAMEPREFIX'};
+	}
+	else
+	{
+		$start = "Apache_OpenOffice";
+		if ( $allvariables->{'PRODUCTNAME'} eq "OpenOffice" )
+		{
+			if ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )
+			{
+				$start .= "-SDK";
+			}
+		}
+
+		if ( $allvariables->{'PRODUCTNAME'} eq "AOO-Developer-Build" )
+		{
+			if ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )
+			{
+				$start .= "-Dev-SDK";
+			}
+			else
+			{
+				$start .= "-Dev";
+			}
+		}
+
+		if ( $allvariables->{'PRODUCTNAME'} eq "URE" )
+		{
+			$start .= "-URE";
+		}
+	}
+
+	return $start;
 }
 
 #########################################################
@@ -497,31 +497,31 @@ sub get_downloadname_productname
 sub get_download_version
 {
 	my ($allvariables) = @_;
-	
+
 	my $version = "";
-	
+
 	my $devproduct = 0;
 	if (( $allvariables->{'DEVELOPMENTPRODUCT'} ) && ( $allvariables->{'DEVELOPMENTPRODUCT'} == 1 )) { $devproduct = 1; }
-	
+
 	my $cwsproduct = 0;
 	# the environment variable CWS_WORK_STAMP is set only in CWS
 	if ( $ENV{'CWS_WORK_STAMP'} ) { $cwsproduct = 1; }
 
-	if (( $cwsproduct ) || ( $devproduct ))  # use "DEV300m75"
+	if (( $cwsproduct ) || ( $devproduct )) # use "DEV300m75"
 	{
 		my $source = uc($installer::globals::build); # DEV300
 		my $localminor = "";
 		if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; }
 		else { $localminor = $installer::globals::lastminor; }
-		$version = $source . $localminor; 
+		$version = $source . $localminor;
 	}
-	else  # use 3.2.0rc1
+	else # use 3.2.0rc1
 	{
 		$version = $allvariables->{'PRODUCTVERSION'};
 		if (( $allvariables->{'ABOUTBOXPRODUCTVERSION'} ) && ( $allvariables->{'ABOUTBOXPRODUCTVERSION'} ne "" )) { $version = $allvariables->{'ABOUTBOXPRODUCTVERSION'}; }
-		if (( $allvariables->{'SHORT_PRODUCTEXTENSION'} ) && ( $allvariables->{'SHORT_PRODUCTEXTENSION'} ne "" )) { $version = $version . $allvariables->{'SHORT_PRODUCTEXTENSION'}; }	
+		if (( $allvariables->{'SHORT_PRODUCTEXTENSION'} ) && ( $allvariables->{'SHORT_PRODUCTEXTENSION'} ne "" )) { $version = $version . $allvariables->{'SHORT_PRODUCTEXTENSION'}; }
 	}
-	
+
 	return $version;
 }
 
@@ -537,13 +537,13 @@ sub set_date_string
 
 	my $devproduct = 0;
 	if (( $allvariables->{'DEVELOPMENTPRODUCT'} ) && ( $allvariables->{'DEVELOPMENTPRODUCT'} == 1 )) { $devproduct = 1; }
-	
+
 	my $cwsproduct = 0;
 	# the environment variable CWS_WORK_STAMP is set only in CWS
 	if ( $ENV{'CWS_WORK_STAMP'} ) { $cwsproduct = 1; }
 
 	my $releasebuild = 1;
-	if (( $allvariables->{'SHORT_PRODUCTEXTENSION'} ) && ( $allvariables->{'SHORT_PRODUCTEXTENSION'} ne "" )) { $releasebuild = 0; }	
+	if (( $allvariables->{'SHORT_PRODUCTEXTENSION'} ) && ( $allvariables->{'SHORT_PRODUCTEXTENSION'} ne "" )) { $releasebuild = 0; }
 
 	if (( ! $devproduct ) && ( ! $cwsproduct ) && ( ! $releasebuild ))
 	{
@@ -552,9 +552,9 @@ sub set_date_string
 		my $day = $timearray[3];
 		my $month = $timearray[4] + 1;
 		my $year = $timearray[5] + 1900;
-	
-		if ( $month < 10 ) { $month = "0" . $month; } 
-		if ( $day < 10 ) { $day = "0" . $day; } 
+
+		if ( $month < 10 ) { $month = "0" . $month; }
+		if ( $day < 10 ) { $day = "0" . $day; }
 
 		$datestring = $year . $month . $day;
 	}
@@ -569,7 +569,7 @@ sub set_date_string
 sub get_download_platformname
 {
 	my $platformname = "";
-	
+
 	if ( $installer::globals::islinuxbuild )
 	{
 		$platformname = "Linux";
@@ -584,7 +584,7 @@ sub get_download_platformname
 	}
 	elsif ( $installer::globals::isfreebsdbuild )
 	{
-		$platformname = "FreeBSD";		
+		$platformname = "FreeBSD";
 	}
 	elsif ( $installer::globals::ismacbuild )
 	{
@@ -593,9 +593,9 @@ sub get_download_platformname
 	else
 	{
 		# $platformname = $installer::globals::packageformat;
-		$platformname = $installer::globals::compiler;		
+		$platformname = $installer::globals::compiler;
 	}
-	
+
 	return $platformname;
 }
 
@@ -606,7 +606,7 @@ sub get_download_platformname
 sub get_download_architecture
 {
 	my $arch = "";
-	
+
 	if(( $installer::globals::compiler =~ /^unxlngi/ )
 	|| ( $installer::globals::compiler =~ /^unxmac.i/ )
 	|| ( $installer::globals::issolarisx86build )
@@ -628,8 +628,8 @@ sub get_download_architecture
 	{
 		$arch = "PPC";
 	}
-	
-	return $arch;	
+
+	return $arch;
 }
 
 #########################################################
@@ -639,9 +639,9 @@ sub get_download_architecture
 sub get_install_type
 {
 	my ($allvariables) = @_;
-	
+
 	my $type = "";
-	
+
 	if ( $installer::globals::languagepack )
 	{
 		$type = "langpack";
@@ -650,15 +650,15 @@ sub get_install_type
 		{
 			$type = $type . "-rpm";
 		}
-		
+
 		if ( $installer::globals::islinuxdebbuild )
 		{
 			$type = $type . "-deb";
 		}
-		
+
 		if ( $installer::globals::packageformat eq "archive" )
 		{
-			$type = $type . "-arc";			
+			$type = $type . "-arc";
 		}
 	}
 	else
@@ -669,15 +669,15 @@ sub get_install_type
 		{
 			$type = $type . "-rpm";
 		}
-		
+
 		if ( $installer::globals::islinuxdebbuild )
 		{
 			$type = $type . "-deb";
 		}
-		
+
 		if ( $installer::globals::packageformat eq "archive" )
 		{
-			$type = $type . "-arc";			
+			$type = $type . "-arc";
 		}
 
 		if (( $allvariables->{'WITHJREPRODUCT'} ) && ( $allvariables->{'WITHJREPRODUCT'} == 1 ))
@@ -686,7 +686,7 @@ sub get_install_type
 		}
 
 	}
-	
+
 	return $type;
 }
 
@@ -699,9 +699,9 @@ sub get_downloadname_addon
 	my $addon = "";
 
 	if ( $installer::globals::islinuxdebbuild ) { $addon = $addon . "_deb"; }
-	
+
 	if ( $installer::globals::product =~ /_wJRE\s*$/ ) { $addon = "_wJRE"; }
-	
+
 	return $addon;
 }
 
@@ -713,13 +713,13 @@ sub get_downloadname_addon
 sub get_versionstring
 {
 	my ( $versionfile ) = @_;
-	
+
 	my $versionstring = "";
 
 	for ( my $i = 0; $i <= $#{$versionfile}; $i++ )
 	{
 		my $oneline = ${$versionfile}[$i];
-		
+
 		if ( $oneline =~ /^\s*\#/ ) { next; } # comment line
 		if ( $oneline =~ /^\s*\"\s*(.*?)\s*\"\s*$/ )
 		{
@@ -727,7 +727,7 @@ sub get_versionstring
 			last;
 		}
 	}
-	
+
 	return $versionstring;
 }
 
@@ -742,21 +742,21 @@ sub get_current_version
 	my $versionstring = "";
 	my $filename = "version.info";
 	# $filename = $installer::globals::ooouploaddir . $installer::globals::separator . $filename;
-	
+
 	if ( -f $filename )
 	{
-        $installer::logger::Lang->printf("File %s exists. Trying to find current version.\n", $filename);
+		$installer::logger::Lang->printf("File %s exists. Trying to find current version.\n", $filename);
 		my $versionfile = installer::files::read_file($filename);
 		$versionstring = get_versionstring($versionfile);
-        $installer::logger::Lang->printf("Setting version string: %s\n", $versionstring);
+		$installer::logger::Lang->printf("Setting version string: %s\n", $versionstring);
 	}
 	else
 	{
-        $installer::logger::Lang->printf("File %s does not exist. No version setting in download file name.\n", $filename);
+		$installer::logger::Lang->printf("File %s does not exist. No version setting in download file name.\n", $filename);
 	}
 
 	$installer::globals::oooversionstring = $versionstring;
-	
+
 	return $versionstring;
 }
 
@@ -771,7 +771,7 @@ sub get_current_version
 sub set_download_filename
 {
 	my ($languagestringref, $allvariables) = @_;
-	
+
 	my $start = get_downloadname_productname($allvariables);
 	my $versionstring = get_download_version($allvariables);
 	my $date = set_date_string($allvariables);
@@ -779,16 +779,16 @@ sub set_download_filename
 	my $architecture = get_download_architecture();
 	my $type = get_install_type($allvariables);
 	my $language = get_downloadname_language($languagestringref);
-	
+
 	# Setting the extension happens automatically
 
-	my $filename = $start . "_" . $versionstring . "_" . $date . "_" . $platform . "_" . $architecture . "_" . $type . "_" . $language; 
-	
+	my $filename = $start . "_" . $versionstring . "_" . $date . "_" . $platform . "_" . $architecture . "_" . $type . "_" . $language;
+
 	$filename =~ s/\_\_/\_/g;	# necessary, if $versionstring or $platform or $language are empty
 	$filename =~ s/\_\s*$//;	# necessary, if $language and $addon are empty
-	
+
 	$installer::globals::ooodownloadfilename = $filename;
-	
+
 	return $filename;
 }
 
@@ -818,20 +818,20 @@ sub create_tar_gz_file_from_directory
 	my $targzname = $downloaddir . $installer::globals::separator . $installer::globals::downloadfilename;
 
 	my $systemcall = "cd $changedir; $ldpreloadstring tar -cf - $packdir | gzip > $targzname";
-	
+
 	my $returnvalue = system($systemcall);
 
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
-		
+	$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+
 	if ($returnvalue)
 	{
-        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
+		$installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 	}
 	else
 	{
-        $installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
+		$installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
 	}
-	
+
 	return $targzname;
 }
 
@@ -866,12 +866,12 @@ sub resolve_variables_in_downloadname
 	elsif ( $installer::globals::compiler =~ /unxmac.i/ ) { $os = "macosi"; }
 	elsif ( $installer::globals::compiler =~ /unxmac.x/ ) { $os = "macosx"; }
 	elsif ( $installer::globals::compiler =~ /unxmacxp/ ) { $os = "macosp"; }
-	else { $os = ""; }	
+	else { $os = ""; }
 	$downloadname =~ s/\{os\}/$os/;
 
 	my $languages = $$languagestringref;
 	$downloadname =~ s/\{languages\}/$languages/;
-	
+
 	$downloadname =~ s/\-\-\-/\-/g;
 	$downloadname =~ s/\-\-/\-/g;
 	$downloadname =~ s/\-\s*$//;
@@ -880,14 +880,14 @@ sub resolve_variables_in_downloadname
 }
 
 ##################################################################
-# Windows: Replacing one placeholder with the specified value 
+# Windows: Replacing one placeholder with the specified value
 ##################################################################
 
 sub replace_one_variable
 {
 	my ($templatefile, $placeholder, $value) = @_;
 
-    $installer::logger::Lang->printf("Replacing %s by %s in nsi file\n", $placeholder, $value);
+	$installer::logger::Lang->printf("Replacing %s by %s in nsi file\n", $placeholder, $value);
 
 	for ( my $i = 0; $i <= $#{$templatefile}; $i++ )
 	{
@@ -903,28 +903,28 @@ sub replace_one_variable
 sub convert_to_unicode
 {
 	my ($string) = @_;
-	
+
 	my $unicodestring = "";
-	
+
 	my $stringlength = length($string);
-	
+
 	for ( my $i = 0; $i < $stringlength; $i++ )
 	{
 		$unicodestring = $unicodestring . substr($string, $i, 1);
 		$unicodestring = $unicodestring . chr(0);
-	}	
+	}
 
 	return $unicodestring;
 }
 
 ##################################################################
-# Windows: Including the product name into nsi template 
+# Windows: Including the product name into nsi template
 ##################################################################
 
 sub put_windows_productname_into_template
 {
 	my ($templatefile, $variableshashref) = @_;
-	
+
 	my $productname = $variableshashref->{'PRODUCTNAME'};
 	$productname =~ s/\.//g;	# OpenOffice.org -> OpenOfficeorg
 
@@ -932,13 +932,13 @@ sub put_windows_productname_into_template
 }
 
 ##################################################################
-# Windows: Including the path to the banner.bmp into nsi template 
+# Windows: Including the path to the banner.bmp into nsi template
 ##################################################################
 
 sub put_banner_bmp_into_template
 {
 	my ($templatefile, $includepatharrayref, $allvariables) = @_;
-	
+
 	# my $filename = "downloadbanner.bmp";
 	if ( ! $allvariables->{'DOWNLOADBANNER'} ) { installer::exiter::exit_program("ERROR: DOWNLOADBANNER not defined in product definition!", "put_banner_bmp_into_template"); }
 	my $filename = $allvariables->{'DOWNLOADBANNER'};
@@ -947,7 +947,7 @@ sub put_banner_bmp_into_template
 
 	if ( $installer::globals::include_pathes_read )
 	{
-		$completefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 0);		
+		$completefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 0);
 	}
 	else
 	{
@@ -962,7 +962,7 @@ sub put_banner_bmp_into_template
 }
 
 ##################################################################
-# Windows: Including the path to the welcome.bmp into nsi template 
+# Windows: Including the path to the welcome.bmp into nsi template
 ##################################################################
 
 sub put_welcome_bmp_into_template
@@ -992,7 +992,7 @@ sub put_welcome_bmp_into_template
 }
 
 ##################################################################
-# Windows: Including the path to the setup.ico into nsi template 
+# Windows: Including the path to the setup.ico into nsi template
 ##################################################################
 
 sub put_setup_ico_into_template
@@ -1022,88 +1022,88 @@ sub put_setup_ico_into_template
 }
 
 ##################################################################
-# Windows: Including the publisher into nsi template 
+# Windows: Including the publisher into nsi template
 ##################################################################
 
 sub put_publisher_into_template ($$)
 {
-    my ($templatefile, $variables) = @_;
-	
-    my $publisher = $variables->{'OOOVENDOR'};
-    $publisher = "" unless defined $publisher;
+	my ($templatefile, $variables) = @_;
+
+	my $publisher = $variables->{'OOOVENDOR'};
+	$publisher = "" unless defined $publisher;
 
-    replace_one_variable($templatefile, "PUBLISHERPLACEHOLDER", $publisher);
+	replace_one_variable($templatefile, "PUBLISHERPLACEHOLDER", $publisher);
 }
 
 ##################################################################
-# Windows: Including the web site into nsi template 
+# Windows: Including the web site into nsi template
 ##################################################################
 
 sub put_website_into_template ($$)
 {
-    my ($templatefile, $variables) = @_;
+	my ($templatefile, $variables) = @_;
 
-    my $website = $variables->{'STARTCENTER_INFO_URL'};
-    $website = "" unless defined $website;
+	my $website = $variables->{'STARTCENTER_INFO_URL'};
+	$website = "" unless defined $website;
 
-    replace_one_variable($templatefile, "WEBSITEPLACEHOLDER", $website);
+	replace_one_variable($templatefile, "WEBSITEPLACEHOLDER", $website);
 }
 
 ##################################################################
-# Windows: Including the Java file name into nsi template 
+# Windows: Including the Java file name into nsi template
 ##################################################################
 
 sub put_javafilename_into_template
 {
 	my ($templatefile, $variableshashref) = @_;
-	
+
 	my $javaversion = "";
-	
+
 	if ( $variableshashref->{'WINDOWSJAVAFILENAME'} ) { $javaversion = $variableshashref->{'WINDOWSJAVAFILENAME'}; }
-	
+
 	replace_one_variable($templatefile, "WINDOWSJAVAFILENAMEPLACEHOLDER", $javaversion);
 }
 
 ##################################################################
-# Windows: Including the product version into nsi template 
+# Windows: Including the product version into nsi template
 ##################################################################
 
 sub put_windows_productversion_into_template
 {
 	my ($templatefile, $variableshashref) = @_;
-	
+
 	my $productversion = $variableshashref->{'PRODUCTVERSION'};
-	
+
 	replace_one_variable($templatefile, "PRODUCTVERSIONPLACEHOLDER", $productversion);
 }
 
 ##################################################################
-# Windows: Including the product version into nsi template 
+# Windows: Including the product version into nsi template
 ##################################################################
 
 sub put_windows_productpath_into_template
 {
 	my ($templatefile, $variableshashref, $languagestringref, $localnsisdir) = @_;
-	
+
 	my $productpath = $variableshashref->{'PROPERTYTABLEPRODUCTNAME'};
-	
+
 	my $locallangs = $$languagestringref;
 	$locallangs =~ s/_/ /g;
 	if (length($locallangs) > $installer::globals::max_lang_length) { $locallangs = "multi lingual"; }
 
-	if ( ! $installer::globals::languagepack ) { $productpath = $productpath . " (" . $locallangs . ")"; } 		
+	if ( ! $installer::globals::languagepack ) { $productpath = $productpath . " (" . $locallangs . ")"; }
 
 	replace_one_variable($templatefile, "PRODUCTPATHPLACEHOLDER", $productpath);
 }
 
 ##################################################################
-# Windows: Including download file name into nsi template 
+# Windows: Including download file name into nsi template
 ##################################################################
 
 sub put_outputfilename_into_template
 {
 	my ($templatefile, $downloadname) = @_;
-	
+
 	$installer::globals::downloadfileextension = ".exe";
 	$downloadname = $downloadname . $installer::globals::downloadfileextension;
 	$installer::globals::downloadfilename = $downloadname;
@@ -1112,7 +1112,7 @@ sub put_outputfilename_into_template
 }
 
 ##################################################################
-# Windows: Generating the file list in nsi file format 
+# Windows: Generating the file list in nsi file format
 ##################################################################
 
 sub get_file_list
@@ -1123,11 +1123,11 @@ sub get_file_list
 
 	my $alldirs = installer::systemactions::get_all_directories($basedir);
 	unshift(@{$alldirs}, $basedir);	# $basedir is the first directory in $alldirs
-	
+
 	for ( my $i = 0; $i <= $#{$alldirs}; $i++ )
 	{
 		my $onedir = ${$alldirs}[$i];
-		
+
 		# Syntax:
 		# SetOutPath "$INSTDIR"
 
@@ -1135,20 +1135,20 @@ sub get_file_list
 		$relativedir =~ s/\Q$basedir\E//;
 
 		my $oneline = " " . "SetOutPath" . " " . "\"\$INSTDIR" . $relativedir . "\"" . "\n";
-				
+
 		if ( $^O =~ /cygwin/i ) {
 			$oneline =~ s/\//\\/g;
 		}
 		push(@filelist, $oneline);
-		
+
 		# Collecting all files in the specific directory
-		
+
 		my $files = installer::systemactions::get_all_files_from_one_directory($onedir);
-		
+
 		for ( my $j = 0; $j <= $#{$files}; $j++ )
 		{
 			my $onefile = ${$files}[$j];
-		
+
 			my $fileline = "  " . "File" . " " . "\"" . $onefile . "\"" . "\n";
 
 			if ( $^O =~ /cygwin/i ) {
@@ -1162,13 +1162,13 @@ sub get_file_list
 }
 
 ##################################################################
-# Windows: Including list of all files into nsi template 
+# Windows: Including list of all files into nsi template
 ##################################################################
 
 sub put_filelist_into_template
 {
 	my ($templatefile, $installationdir) = @_;
-	
+
 	my $filelist = get_file_list($installationdir);
 
 	my $filestring = "";
@@ -1177,23 +1177,23 @@ sub put_filelist_into_template
 	{
 		$filestring = $filestring . ${$filelist}[$i];
 	}
-	
+
 	$filestring =~ s/\s*$//;
-	
+
 	replace_one_variable($templatefile, "ALLFILESPLACEHOLDER", $filestring);
 }
 
 ##################################################################
-# Windows: NSIS uses specific language names 
+# Windows: NSIS uses specific language names
 ##################################################################
 
 sub nsis_language_converter
 {
 	my ($language) = @_;
-	
+
 	my $nsislanguage = "";
 
-	# Assign language used by NSIS. 
+	# Assign language used by NSIS.
 	# The files "$nsislanguage.nsh" and "$nsislanguage.nlf"
 	# are needed in the NSIS environment.
 	# Directory: <NSIS-Dir>/Contrib/Language files
@@ -1255,8 +1255,8 @@ sub nsis_language_converter
 	elsif ( $language eq "vi" ) { $nsislanguage = "Vietnamese"; }
 	elsif ( $language eq "cy" ) { $nsislanguage = "Welsh"; }
 	else
-    {
-        $installer::logger::Lang->printf("NSIS language_converter : Could not find nsis language for %s!\n", $language);
+	{
+		$installer::logger::Lang->printf("NSIS language_converter : Could not find nsis language for %s!\n", $language);
 		$nsislanguage = "English";
 	}
 
@@ -1264,7 +1264,7 @@ sub nsis_language_converter
 }
 
 ##################################################################
-# Windows: Including list of all languages into nsi template 
+# Windows: Including list of all languages into nsi template
 ##################################################################
 
 sub put_language_list_into_template
@@ -1273,7 +1273,7 @@ sub put_language_list_into_template
 
 	my $alllangstring = "";
 	my %nsislangs;
- 
+
 	for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ )
 	{
 		my $onelanguage = ${$languagesarrayref}[$i];
@@ -1291,25 +1291,25 @@ sub put_language_list_into_template
 		}
 		else
 		{
-			$alllangstring = $alllangstring . $langstring;			
+			$alllangstring = $alllangstring . $langstring;
 		}
 	}
 
 	$alllangstring =~ s/\s*$//;
-	
+
 	replace_one_variable($templatefile, "ALLLANGUAGESPLACEHOLDER", $alllangstring);
 }
 
 ##################################################################
-# Windows: Collecting all identifier from mlf file 
+# Windows: Collecting all identifier from mlf file
 ##################################################################
 
 sub get_identifier
 {
 	my ( $mlffile ) = @_;
-	
+
 	my @identifier = ();
-	
+
 	for ( my $i = 0; $i <= $#{$mlffile}; $i++ )
 	{
 		my $oneline = ${$mlffile}[$i];
@@ -1336,24 +1336,24 @@ sub get_language_block_from_language_file
 	my @language_block = ();
 
 	for ( my $i = 0; $i <= $#{$languagefile}; $i++ )
-	{		
+	{
 		if ( ${$languagefile}[$i] =~ /^\s*\[\s*$searchstring\s*\]\s*$/ )
 		{
 			my $counter = $i;
 
 			push(@language_block, ${$languagefile}[$counter]);
 			$counter++;
-			
+
 			while (( $counter <= $#{$languagefile} ) && (!( ${$languagefile}[$counter] =~ /^\s*\[/ )))
 			{
 				push(@language_block, ${$languagefile}[$counter]);
 				$counter++;
 			}
-			
+
 			last;
 		}
-	}	
-	
+	}
+
 	return \@language_block;
 }
 
@@ -1365,7 +1365,7 @@ sub get_language_block_from_language_file
 sub get_language_string_from_language_block
 {
 	my ($language_block, $language) = @_;
-	
+
 	my $newstring = "";
 
 	for ( my $i = 0; $i <= $#{$language_block}; $i++ )
@@ -1374,15 +1374,15 @@ sub get_language_string_from_language_block
 		{
 			$newstring = $1;
 			last;
-		}	
-	}	
-	
+		}
+	}
+
 	if ( $newstring eq "" )
 	{
-		$language = "en-US"; 	# defaulting to english	
+		$language = "en-US"; 	# defaulting to English
 
 		for ( my $i = 0; $i <= $#{$language_block}; $i++ )
-		{		
+		{
 			if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
 			{
 				$newstring = $1;
@@ -1390,12 +1390,12 @@ sub get_language_string_from_language_block
 			}
 		}
 	}
-	
+
 	return $newstring;
 }
 
 ##################################################################
-# Windows: Replacing strings in NSIS nsh file 
+# Windows: Replacing strings in NSIS nsh file
 # nsh file syntax:
 # !define MUI_TEXT_DIRECTORY_TITLE "Zielverzeichnis auswählen"
 ##################################################################
@@ -1405,25 +1405,29 @@ sub replace_identifier_in_nshfile
 	my ( $nshfile, $identifier, $newstring, $nshfilename, $onelanguage ) = @_;
 
 	for ( my $i = 0; $i <= $#{$nshfile}; $i++ )
+
+	$newstring =~ s/\\r/\$\\r/g; # \r -> $\r in modern nsis versions
+	$newstring =~ s/\\n/\$\\n/g; # \n -> $\n in modern nsis versions
+
 	{
 		if ( ${$nshfile}[$i] =~ /\s+\Q$identifier\E\s+\"(.+)\"\s*$/ )
 		{
 			my $oldstring = $1;
 			${$nshfile}[$i] =~ s/\Q$oldstring\E/$newstring/;
-            $installer::logger::Lang->printf("NSIS replacement in %s (%s):  \-\> %s\n",
-                $nshfilename,
-                $onelanguage,
-                $oldstring,
-                $newstring);
+			$installer::logger::Lang->printf("NSIS replacement in %s (%s): \-\> %s\n",
+				$nshfilename,
+				$onelanguage,
+				$oldstring,
+				$newstring);
 		}
 	}
 }
 
 ##################################################################
-# Windows: Replacing strings in NSIS nlf file 
+# Windows: Replacing strings in NSIS nlf file
 # nlf file syntax (2 lines):
 # # ^DirSubText
-# Zielverzeichnis 
+# Zielverzeichnis
 ##################################################################
 
 sub replace_identifier_in_nlffile
@@ -1438,17 +1442,17 @@ sub replace_identifier_in_nlffile
 			my $oldstring = ${$nlffile}[$next];
 			${$nlffile}[$next] = $newstring . "\n";
 			$oldstring =~ s/\s*$//;
-            $installer::logger::Lang->printf("NSIS replacement in %s (%s): %s \-\> %s\n",
-                $nlffilename,
-                $onelanguage,
-                $oldstring,
-                $newstring);
+			$installer::logger::Lang->printf("NSIS replacement in %s (%s): %s \-\> %s\n",
+				$nlffilename,
+				$onelanguage,
+				$oldstring,
+				$newstring);
 		}
-	}	
+	}
 }
 
 ##################################################################
-# Windows: Translating the NSIS nsh and nlf file 
+# Windows: Translating the NSIS nsh and nlf file
 ##################################################################
 
 sub translate_nsh_nlf_file
@@ -1457,24 +1461,24 @@ sub translate_nsh_nlf_file
 
 	# Analyzing the mlf file, collecting all Identifier
 	my $allidentifier = get_identifier($mlffile);
-	
+
 	$onelanguage = "en-US" if ( $nsislanguage eq "English" && $onelanguage ne "en-US");
 	for ( my $i = 0; $i <= $#{$allidentifier}; $i++ )
 	{
 		my $identifier = ${$allidentifier}[$i];
 		my $language_block = get_language_block_from_language_file($identifier, $mlffile);
 		my $newstring = get_language_string_from_language_block($language_block, $onelanguage);
-		
+
 		# removing mask
 		$newstring =~ s/\\\'/\'/g;
-		
+
 		replace_identifier_in_nshfile($nshfile, $identifier, $newstring, $nshfilename, $onelanguage);
-		replace_identifier_in_nlffile($nlffile, $identifier, $newstring, $nlffilename, $onelanguage);		
+		replace_identifier_in_nlffile($nlffile, $identifier, $newstring, $nlffilename, $onelanguage);
 	}
 }
 
 ##################################################################
-# Converting utf 16 file to utf 8 
+# Converting utf 16 file to utf 8
 ##################################################################
 
 sub convert_utf16_to_utf8
@@ -1490,7 +1494,7 @@ sub convert_utf16_to_utf8
 #	open( IN, "<:para:crlf:uni", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_utf16_to_utf8");
 	open( IN, "<:encoding(UTF16-LE)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_utf16_to_utf8");
 	while ( my $line = <IN> )
-    {
+	{
 		push @localfile, $line;
 	}
 	close( IN );
@@ -1498,7 +1502,7 @@ sub convert_utf16_to_utf8
 	if ( open( OUT, ">:utf8", $filename ) )
 	{
 		print OUT @localfile;
-		close(OUT);	
+		close(OUT);
 	}
 
 	$savfilename = $filename . "_before.utf8";
@@ -1506,12 +1510,12 @@ sub convert_utf16_to_utf8
 }
 
 ##################################################################
-# Converting utf 8 file to utf 16 
+# Converting utf 8 file to utf 16
 ##################################################################
 
 sub convert_utf8_to_utf16
 {
-	my ( $filename ) = @_; 
+	my ( $filename ) = @_;
 
 	my @localfile = ();
 
@@ -1519,8 +1523,8 @@ sub convert_utf8_to_utf16
 	installer::systemactions::copy_one_file($filename, $savfilename);
 
 	open( IN, "<:utf8", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_utf8_to_utf16");
-	while (my  $line = <IN>)
-    {
+	while (my $line = <IN>)
+	{
 		push @localfile, $line;
 	}
 	close( IN );
@@ -1528,7 +1532,7 @@ sub convert_utf8_to_utf16
 	if ( open( OUT, ">:raw:encoding(UTF16-LE):crlf:utf8", $filename ) )
 	{
 		print OUT @localfile;
-		close(OUT);	
+		close(OUT);
 	}
 
 	$savfilename = $filename . "_after.utf16";
@@ -1536,12 +1540,12 @@ sub convert_utf8_to_utf16
 }
 
 ##################################################################
-# Converting text string to utf 16 
+# Converting text string to utf 16
 ##################################################################
 
 sub convert_textstring_to_utf16
 {
-	my ( $textstring, $localnsisdir, $shortfilename ) = @_; 
+	my ( $textstring, $localnsisdir, $shortfilename ) = @_;
 
 	my $filename = $localnsisdir . $installer::globals::separator . $shortfilename;
 	my @filecontent = ();
@@ -1556,13 +1560,13 @@ sub convert_textstring_to_utf16
 }
 
 ##################################################################
-# Windows: Copying NSIS language files to local nsis directory 
+# Windows: Copying NSIS language files to local nsis directory
 ##################################################################
 
 sub copy_and_translate_nsis_language_files
 {
 	my ($nsispath, $localnsisdir, $languagesarrayref, $allvariables) = @_;
-	
+
 	my $nlffilepath = $nsispath . $installer::globals::separator . "Contrib" . $installer::globals::separator . "Language\ files" . $installer::globals::separator;
 	my $nshfilepath = $nsispath . $installer::globals::separator . "Contrib" . $installer::globals::separator . "Modern\ UI" . $installer::globals::separator . "Language files" . $installer::globals::separator;
 
@@ -1577,7 +1581,7 @@ sub copy_and_translate_nsis_language_files
 		my $nlffilename = $localnsisdir . $installer::globals::separator . $nsislanguage . "_pack.nlf";
 		if ( $^O =~ /cygwin/i ) { $nlffilename =~ s/\//\\/g; }
 		installer::systemactions::copy_one_file($sourcepath, $nlffilename);
-		
+
 		# Copying the nsh file
 		# In newer nsis versions, the nsh file is located next to the nlf file
 		$sourcepath = $nshfilepath . $nsislanguage . "\.nsh";
@@ -1592,32 +1596,32 @@ sub copy_and_translate_nsis_language_files
 		}
 		my $nshfilename = $localnsisdir . $installer::globals::separator . $nsislanguage . "_pack.nsh";
 		if ( $^O =~ /cygwin/i ) { $nshfilename =~ s/\//\\/g; }
-		installer::systemactions::copy_one_file($sourcepath, $nshfilename);		
+		installer::systemactions::copy_one_file($sourcepath, $nshfilename);
 
 		# Changing the macro name in nsh file: MUI_LANGUAGEFILE_BEGIN -> MUI_LANGUAGEFILE_PACK_BEGIN
-        convert_utf16_to_utf8($nshfilename);
-        convert_utf16_to_utf8($nlffilename);
-        my $nshfile = installer::files::read_file($nshfilename);
+		#convert_utf16_to_utf8($nshfilename);
+		#convert_utf16_to_utf8($nlffilename);
+		my $nshfile = installer::files::read_file($nshfilename);
 		replace_one_variable($nshfile, "MUI_LANGUAGEFILE_BEGIN", "MUI_LANGUAGEFILE_PACK_BEGIN");
 
 		# find the ulf file for translation
 		my $mlffile = get_translation_file($allvariables);
-		
+
 		# Translate the files
 		my $nlffile = installer::files::read_file($nlffilename);
 		translate_nsh_nlf_file($nshfile, $nlffile, $mlffile, $onelanguage, $nshfilename, $nlffilename, $nsislanguage);
-		
+
 		installer::files::save_file($nshfilename, $nshfile);
 		installer::files::save_file($nlffilename, $nlffile);
 
-        convert_utf8_to_utf16($nshfilename);
-        convert_utf8_to_utf16($nlffilename);
+		#convert_utf8_to_utf16($nshfilename);
+		#convert_utf8_to_utf16($nlffilename);
 	}
 
 }
 
 ##################################################################
-# Windows: Including the nsis path into the nsi template 
+# Windows: Including the nsis path into the nsi template
 ##################################################################
 
 sub put_nsis_path_into_template
@@ -1628,7 +1632,7 @@ sub put_nsis_path_into_template
 }
 
 ##################################################################
-# Windows: Including the output path into the nsi template 
+# Windows: Including the output path into the nsi template
 ##################################################################
 
 sub put_output_path_into_template
@@ -1641,7 +1645,7 @@ sub put_output_path_into_template
 }
 
 ##################################################################
-# Windows: Finding the path to the nsis SDK 
+# Windows: Finding the path to the nsis SDK
 ##################################################################
 
 sub get_path_to_nsis_sdk
@@ -1649,38 +1653,38 @@ sub get_path_to_nsis_sdk
 	my $nsispath = "";
 
 	if ( $ENV{'NSIS_PATH'} )
-    {
+	{
 		$nsispath = $ENV{'NSIS_PATH'};
 	}
 	if ( $nsispath eq "" )
 	{
-        $installer::logger::Info->print("... no Environment variable \"NSIS_PATH\"!\n");
+		$installer::logger::Info->print("... no Environment variable \"NSIS_PATH\"!\n");
 	}
-    elsif ( ! -d $nsispath )
+	elsif ( ! -d $nsispath )
 	{
 		installer::exiter::exit_program("ERROR: NSIS path $nsispath does not exist!", "get_path_to_nsis_sdk");
 	}
-	
+
 	return $nsispath;
 }
 
 ##################################################################
-# Windows: Executing NSIS to create the installation set 
+# Windows: Executing NSIS to create the installation set
 ##################################################################
 
 sub call_nsis
 {
 	my ( $nsispath, $nsifile ) = @_;
-	
+
 	my $makensisexe = $nsispath . $installer::globals::separator . "makensis.exe";
 
-    $installer::logger::Info->printf("... starting %s ... \n", $makensisexe);
+	$installer::logger::Info->printf("... starting %s ... \n", $makensisexe);
 
 	if( $^O =~ /cygwin/i ) { $nsifile =~ s/\\/\//g;	}
 
 	my $systemcall = "$makensisexe $nsifile |";
 
-    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
+	$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
 
 	my @nsisoutput = ();
 
@@ -1692,17 +1696,17 @@ sub call_nsis
 
 	if ($returnvalue)
 	{
-        $installer::logger::Lang->printf("ERROR: %s !\n", $systemcall);
+		$installer::logger::Lang->printf("ERROR: %s !\n", $systemcall);
 	}
 	else
 	{
-        $installer::logger::Lang->printf("Success: %s\n", $systemcall);
-	}		
+		$installer::logger::Lang->printf("Success: %s\n", $systemcall);
+	}
 
 	foreach my $line (@nsisoutput)
-    {
-        $installer::logger::Lang->print($line);
-    }
+	{
+		$installer::logger::Lang->print($line);
+	}
 }
 
 #################################################################################
@@ -1712,11 +1716,11 @@ sub call_nsis
 sub replace_one_variable_in_translationfile
 {
 	my ($translationfile, $variable, $searchstring) = @_;
-	
+
 	for ( my $i = 0; $i <= $#{$translationfile}; $i++ )
 	{
 		${$translationfile}[$i] =~ s/\%$searchstring/$variable/g;
-	}	
+	}
 }
 
 #################################################################################
@@ -1750,13 +1754,13 @@ sub get_translation_file
 	my $translationfile = installer::files::read_file($translationfilename);
 	replace_variables($translationfile, $allvariableshashref);
 
-    $installer::logger::Lang->printf("Reading translation file: %s\n", $translationfilename);
-	
+	$installer::logger::Lang->printf("Reading translation file: %s\n", $translationfilename);
+
 	return $translationfile;
 }
 
 ####################################################
-# Removing english, if it was added before
+# Removing English, if it was added before
 ####################################################
 
 sub remove_english_for_nsis_installer
@@ -1766,7 +1770,7 @@ sub remove_english_for_nsis_installer
 	# $$languagestringref =~ s/en-US_//;
 	# shift(@{$languagesarrayref});
 
-	@{$languagesarrayref} = ("en-US");	# only english for NSIS installer!
+	@{$languagesarrayref} = ("en-US");	# only English for NSIS installer!
 }
 
 ####################################################
@@ -1776,21 +1780,21 @@ sub remove_english_for_nsis_installer
 sub create_link_tree
 {
 	my ($sourcedownloadfile, $destfilename, $versionstring) = @_;
-	
+
 	if ( ! $installer::globals::ooouploaddir ) { installer::exiter::exit_program("ERROR: Directory for AOO upload not defined!", "create_link_tree"); }
 	my $versiondir = $installer::globals::ooouploaddir . $installer::globals::separator . $versionstring;
-    $installer::logger::Lang->printf("Directory for the link: %s\n", $versiondir);
-	
+	$installer::logger::Lang->printf("Directory for the link: %s\n", $versiondir);
+
 	if ( ! -d $versiondir ) { installer::systemactions::create_directory_structure($versiondir); }
-	
-	# inside directory $versiondir all links have to be created	
+
+	# inside directory $versiondir all links have to be created
 	my $linkdestination = $versiondir . $installer::globals::separator . $destfilename;
 
 	# If there is an older version of this file (link), it has to be removed
 	if ( -f $linkdestination ) { unlink($linkdestination); }
 
-    $installer::logger::Lang->printf("Creating hard link from %s to %s\n", $sourcedownloadfile, $linkdestination);
-	installer::systemactions::hardlink_one_file($sourcedownloadfile, $linkdestination);	
+	$installer::logger::Lang->printf("Creating hard link from %s to %s\n", $sourcedownloadfile, $linkdestination);
+	installer::systemactions::hardlink_one_file($sourcedownloadfile, $linkdestination);
 }
 
 #######################################################
@@ -1801,7 +1805,7 @@ sub create_link_tree
 sub is_supported_platform
 {
 	my $is_supported = 0;
-	
+
 	if (( $installer::globals::islinuxrpmbuild ) ||
 		( $installer::globals::issolarissparcbuild ) ||
 		( $installer::globals::issolarisx86build ) ||
@@ -1820,20 +1824,20 @@ sub is_supported_platform
 sub create_download_sets
 {
 	my ($installationdir, $includepatharrayref, $allvariableshashref, $downloadname, $languagestringref, $languagesarrayref) = @_;
-	
-    $installer::logger::Info->print("\n");
-    $installer::logger::Info->print("******************************************\n");
-    $installer::logger::Info->print("... creating download installation set ...\n", 1);
-    $installer::logger::Info->print("******************************************\n");
+
+	$installer::logger::Info->print("\n");
+	$installer::logger::Info->print("******************************************\n");
+	$installer::logger::Info->print("... creating download installation set ...\n", 1);
+	$installer::logger::Info->print("******************************************\n");
 
 	installer::logger::include_header_into_logfile("Creating download installation sets:");
 
-	# special handling for installation sets, to which english was added automatically
+	# special handling for installation sets, to which English was added automatically
 	if ( $installer::globals::added_english ) { remove_english_for_nsis_installer($languagestringref, $languagesarrayref); }
 
 	my $firstdir = $installationdir;
 	installer::pathanalyzer::get_path_from_fullqualifiedname(\$firstdir);
-	
+
 	my $lastdir = $installationdir;
 	installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$lastdir);
 
@@ -1843,9 +1847,9 @@ sub create_download_sets
 	# removing existing directory "_native_packed_inprogress" and "_native_packed_witherror" and "_native_packed"
 
 	my $downloaddir = $firstdir . $lastdir;
-	
+
 	if ( -d $downloaddir ) { installer::systemactions::remove_complete_directory($downloaddir); }
-	
+
 	my $olddir = $downloaddir;
 	$olddir =~ s/_inprogress/_witherror/;
 	if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); }
@@ -1855,21 +1859,21 @@ sub create_download_sets
 	if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); }
 
 	# creating the new directory
-	
+
 	installer::systemactions::create_directory($downloaddir);
 
 	$installer::globals::saveinstalldir = $downloaddir;
 
 	# evaluating the name of the download file
 
-	if ( $allvariableshashref->{'AOODOWNLOADNAME'} ) 
-    { 
-        $downloadname = set_download_filename($languagestringref, $allvariableshashref); 
-    }
-	else 
-    { 
-        $downloadname = resolve_variables_in_downloadname($allvariableshashref, $downloadname, $languagestringref); 
-    }
+	if ( $allvariableshashref->{'AOODOWNLOADNAME'} )
+	{
+		$downloadname = set_download_filename($languagestringref, $allvariableshashref);
+	}
+	else
+	{
+		$downloadname = resolve_variables_in_downloadname($allvariableshashref, $downloadname, $languagestringref);
+	}
 
 	if ( ! $installer::globals::iswindowsbuild )	# Unix specific part
 	{
@@ -1901,8 +1905,8 @@ sub create_download_sets
 			if ($$scriptref eq "") { installer::exiter::exit_program("ERROR: Could not find script file $scriptfilename!", "create_download_sets"); }
 			my $scriptfile = installer::files::read_file($$scriptref);
 
-            $installer::logger::Lang->printf("Found  script file %s: %s \n", $scriptfilename, $$scriptref);
-	
+			$installer::logger::Lang->printf("Found script file %s: %s \n", $scriptfilename, $$scriptref);
+
 			# add product name into script template
 			put_productname_into_script($scriptfile, $allvariableshashref);
 
@@ -1911,22 +1915,22 @@ sub create_download_sets
 
 			# create tar file
 			my $temporary_tarfile_name = $downloaddir . $installer::globals::separator . 'installset.tar';
-			my $size = tar_package($installationdir, $temporary_tarfile_name, $getuidlibrary); 
-			installer::exiter::exit_program("ERROR: Could not create tar file $temporary_tarfile_name!", "create_download_sets") unless $size; 
+			my $size = tar_package($installationdir, $temporary_tarfile_name, $getuidlibrary);
+			installer::exiter::exit_program("ERROR: Could not create tar file $temporary_tarfile_name!", "create_download_sets") unless $size;
 
 			# calling sum to determine checksum and size of the tar file
 			my $sumout = call_sum($temporary_tarfile_name);
-	
+
 			# writing checksum and size into scriptfile
 			put_checksum_and_size_into_script($scriptfile, $sumout);
-	
+
 			# saving the script file
 			my $newscriptfilename = determine_scriptfile_name($downloadname);
 			$newscriptfilename = save_script_file($downloaddir, $newscriptfilename, $scriptfile);
 
-            $installer::logger::Info->printf("... including installation set into %s ... \n", $newscriptfilename);
-            # Append tar file to script
-			include_tar_into_script($newscriptfilename, $temporary_tarfile_name); 
+			$installer::logger::Info->printf("... including installation set into %s ... \n", $newscriptfilename);
+			# Append tar file to script
+			include_tar_into_script($newscriptfilename, $temporary_tarfile_name);
 		}
 	}
 	else	# Windows specific part
@@ -1940,15 +1944,15 @@ sub create_download_sets
 		if ( $nsispath eq "" ) {
 			# If nsis is not found just skip the rest of this function
 			# and do not create the NSIS file.
-            $installer::logger::Lang->print("\n");
-            $installer::logger::Lang->printf("No NSIS SDK found. Skipping the generation of NSIS file.\n");
-            $installer::logger::Info->print("... no NSIS SDK found. Skipping the generation of NSIS file ... \n");
+			$installer::logger::Lang->print("\n");
+			$installer::logger::Lang->printf("No NSIS SDK found. Skipping the generation of NSIS file.\n");
+			$installer::logger::Info->print("... no NSIS SDK found. Skipping the generation of NSIS file ... \n");
 			return $downloaddir;
 		}
 
 		# copy language files into nsis directory and translate them
 		copy_and_translate_nsis_language_files($nsispath, $localnsisdir, $languagesarrayref, $allvariableshashref);
-		
+
 		# find and read the nsi file template
 		my $templatefilename = "downloadtemplate.nsi";
 
@@ -1981,15 +1985,15 @@ sub create_download_sets
 		put_language_list_into_template($templatefile, $languagesarrayref);
 		put_nsis_path_into_template($templatefile, $localnsisdir);
 		put_output_path_into_template($templatefile, $downloaddir);
-	
+
 		my $nsifilename = save_script_file($localnsisdir, $templatefilename, $templatefile);
 
-        $installer::logger::Info->printf("... created NSIS file %s ... \n", $nsifilename);
-		
+		$installer::logger::Info->printf("... created NSIS file %s ... \n", $nsifilename);
+
 		# starting the NSIS SDK to create the download file
-		call_nsis($nsispath, $nsifilename);		
+		call_nsis($nsispath, $nsifilename);
 	}
-	
+
 	return $downloaddir;
 }
 
@@ -2001,10 +2005,10 @@ sub create_download_link_tree
 {
 	my ($downloaddir, $languagestringref, $allvariableshashref) = @_;
 
-    $installer::logger::Info->print("\n");
-    $installer::logger::Info->print("******************************************\n"); # 
-    $installer::logger::Info->print("... creating download hard link ...\n");
-    $installer::logger::Info->print("******************************************\n");
+	$installer::logger::Info->print("\n");
+	$installer::logger::Info->print("******************************************\n"); #
+	$installer::logger::Info->print("... creating download hard link ...\n");
+	$installer::logger::Info->print("******************************************\n");
 
 	installer::logger::include_header_into_logfile("Creating download hard link:");
 	$installer::logger::Lang->print("\n");
@@ -2014,14 +2018,14 @@ sub create_download_link_tree
 	{
 		my $versionstring = "";
 		# Already defined $installer::globals::oooversionstring and $installer::globals::ooodownloadfilename ?
-		
+
 		if ( ! $installer::globals::oooversionstring ) { $versionstring = get_current_version(); }
-		else { $versionstring = $installer::globals::oooversionstring; } 
-		
-		# Is $versionstring empty? If yes, there is nothing to do now. 
+		else { $versionstring = $installer::globals::oooversionstring; }
+
+		# Is $versionstring empty? If yes, there is nothing to do now.
+
+		$installer::logger::Lang->printf("Version string is set to: %s\n", $versionstring);
 
-        $installer::logger::Lang->printf("Version string is set to: %s\n", $versionstring);
-		
 		if ( $versionstring )
 		{
 			# Now the downloadfilename has to be set (if not already done)
@@ -2033,26 +2037,26 @@ sub create_download_link_tree
 			{
 				$destdownloadfilename = $destdownloadfilename . $installer::globals::downloadfileextension;
 
-                $installer::logger::Lang->printf("Setting destination download file name: %s\n", $destdownloadfilename);
+				$installer::logger::Lang->printf("Setting destination download file name: %s\n", $destdownloadfilename);
 
 				my $sourcedownloadfile = $downloaddir . $installer::globals::separator . $installer::globals::downloadfilename;
 
-                $installer::logger::Lang->printf("Setting source download file name: %s\n", $sourcedownloadfile);
+				$installer::logger::Lang->printf("Setting source download file name: %s\n", $sourcedownloadfile);
 
 				create_link_tree($sourcedownloadfile, $destdownloadfilename, $versionstring);
 				# my $md5sumoutput = call_md5sum($downloadfile);
 				# my $md5sum = get_md5sum($md5sumoutput);
-				
+
 			}
 		}
 		else
 		{
-            $installer::logger::Lang->printf("Version string is empty. Nothing to do!\n");
-        }
-	}	
+			$installer::logger::Lang->printf("Version string is empty. Nothing to do!\n");
+		}
+	}
 	else
 	{
-        $installer::logger::Lang->printf("Platform not used for hard linking. Nothing to do!\n");
+		$installer::logger::Lang->printf("Platform not used for hard linking. Nothing to do!\n");
 	}
 
 	$installer::logger::Lang->add_timestamp("Performance Info: Creating hard link, stop");