Commits

Ingo Schmidt  committed cce17b2

native372: #i117630# preparations from native373

  • Participants
  • Parent commits 2a21a66

Comments (0)

Files changed (12)

File instsetoo_native/util/openoffice.lst

             OOOVENDOR Oracle
 			OOODOWNLOADNAME 1
 			STARTCENTER_LAYOUT_STYLE 0
+			NOLANGUAGESELECTIONPRODUCT 0
 			BUILDIDCWS {buildidcws}
             OPENSOURCE 1
 		}
             DOWNLOADSETUPICO ooosetup.ico
             DONTUSESTARTMENUFOLDER 1
             RELATIVE_PATHES_IN_DDF 1
+            NOLANGUAGESELECTIONPRODUCT 1
             STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794
             STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp
             STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/OpenOffice.org/templates.jsp?cid=926383
             IGNOREDIRECTORYLAYER 1
             NOVERSIONINDIRNAME 0
             NOSPACEINDIRECTORYNAME 1
-            NOSHORTDIRECTORYNAMES 1
+            NOLANGUAGESELECTIONPRODUCT 1
             CHANGETARGETDIR 1
             DOWNLOADBANNER ooosdkbanner.bmp
             DOWNLOADBITMAP ooosdkbitmap.bmp
             IGNOREDIRECTORYLAYER 1
             NOVERSIONINDIRNAME 0
             NOSPACEINDIRECTORYNAME 1
-            NOSHORTDIRECTORYNAMES 1
+            NOLANGUAGESELECTIONPRODUCT 1
             CHANGETARGETDIR 1
             DOWNLOADBANNER ooosdkbanner.bmp
             DOWNLOADBITMAP ooosdkbitmap.bmp

File javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java

 package org.openoffice.setup.Util;
 
 import org.openoffice.setup.InstallData;
+import org.openoffice.setup.Installer.Installer;
+import org.openoffice.setup.Installer.InstallerFactory;
 import org.openoffice.setup.SetupData.PackageDescription;
 import java.util.Enumeration;
 import java.util.Vector;
     static public void collectInstallPackages(PackageDescription packageData, Vector allPackages) {
             	
         if (( packageData.isLeaf() ) && ( packageData.getSelectionState() == packageData.INSTALL )) {
-            allPackages.add(packageData);
-            // System.err.println("Adding to collector 1: " + packageData.getPackageName());
+            boolean doAdd = true;
+            // Special handling for jre package, because this is not necessarily older, if an older product is updated.
+            if ( packageData.isJavaPackage() ) {
+                Installer installer = InstallerFactory.getInstance();
+                InstallData data = InstallData.getInstance();
+                if ( installer.isPackageInstalled(packageData, data) ) {
+                    if ( ! installer.isInstalledPackageOlder(packageData, data) ) {
+                        doAdd = false;
+                    }
+                }
+            }
+
+            if ( doAdd ) {
+                allPackages.add(packageData);
+                System.err.println("Adding to collector 1: " + packageData.getPackageName());
+            }
         }
         
         // also allowing packages at nodes! 
                 ( ! packageData.getPackageName().equals("")) &&
                 (( packageData.getSelectionState() == packageData.INSTALL ) ||
                 ( packageData.getSelectionState() == packageData.INSTALL_SOME ))) {
-            allPackages.add(packageData);            
-            // System.err.println("Adding to collector 2: " + packageData.getPackageName());
+            boolean doAdd = true;
+            // Special handling for jre package, because this is not necessarily older, if an older product is updated.
+            if ( packageData.isJavaPackage() ) {
+                Installer installer = InstallerFactory.getInstance();
+                InstallData data = InstallData.getInstance();
+                if ( installer.isPackageInstalled(packageData, data) ) {
+                    if ( ! installer.isInstalledPackageOlder(packageData, data) ) {
+                        doAdd = false;
+                    }
+                }
+            }
+
+            if ( doAdd ) {
+                allPackages.add(packageData);
+                // System.err.println("Adding to collector 2: " + packageData.getPackageName());
+            }
         }
         
         for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {

File setup_native/scripts/javaloader.sh

 java_versions_supported="1.4 1.5 1.6"
 rpm2cpio_found="no"
 rpm_found="no"
+is_64bit_arch="no"
+arch64string="x86_64"
+arch64string2="64-bit"
 sunjavahotspot="HotSpot"
 errortext=""
 errorcode=""
     fi
 }
 
-find_solaris_jre()
+find_jre_in_path()
 {
     # searching for java runtime in path
     for i in `echo $PATH | sed -e 's/^:/.:/g' -e 's/:$/:./g' -e 's/::/:.:/g' -e 's/:/ /g'`; do
     fi
 }
 
+check_linux_jre_version()
+{
+    # check version of an installed JRE
+    javaoutput=`$java_runtime -version 2>&1 | head -1`
+
+    for i in $java_versions_supported; do
+        versionmatch=`echo $javaoutput | grep $i`
+        if [ ! -z "$versionmatch" ]; then
+            java_runtime_sufficient="yes"
+            break
+        fi
+    done
+}
+
+check_64bit_architecture()
+{
+    # check system architecture using "uname -m"
+    # unameoutput=`uname -m 2>&1`
+    # x64str=`echo $unameoutput | grep $arch64string`
+
+    # check system architecture using "file /usr/bin/file"
+    fileoutput=`file /usr/bin/file 2>&1`
+    x64str=`echo $fileoutput | grep $arch64string2`
+
+    if [ ! -z "$x64str" ]; then
+        is_64bit_arch="yes"
+        echo "64-bit Linux"
+    fi
+}
+
 # the user might want to specify java runtime on the commandline
 USAGE="Usage: $0 [ -j <java_runtime> ]"
 while getopts hj: opt; do
 if [ "$java_runtime_set" != "yes" ]; then
     platform=`uname -s`
     if [ "`uname -s`" = "Linux" ]; then
-        install_linux_rpm
+        check_64bit_architecture
+        if [ "$is_64bit_arch" = "no" ]; then
+            install_linux_rpm
+        else
+            find_jre_in_path
+            if [ "$java_runtime_found" = "yes" ]; then
+                check_linux_jre_version
+                if [ ! "$java_runtime_sufficient" = "yes" ]; then
+                    errortext="Error: Did not find a valid Java Runtime Environment (JRE). Required JRE versions: $java_versions_supported"
+                    errorcode="14"
+                    do_exit
+                fi
+            else
+                errortext="Error: Did not find an installed Java Runtime Environment (JRE)."
+                errorcode="15"
+                do_exit
+            fi
+        fi
     elif [ "`uname -s`" = "SunOS" ]; then
         check_architecture
-        find_solaris_jre
+        find_jre_in_path
         if [ "$java_runtime_found" = "yes" ]; then
             check_jre_version
             if [ ! "$java_runtime_sufficient" = "yes" ]; then

File setup_native/source/packinfo/packinfo_office_lang.txt

 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-fonts"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-fonts"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-fonts"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-fonts"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-res"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-res"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-res"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-res"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-help"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-help"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-help"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-help"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-writer"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-writer"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-writer"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-writer"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-calc"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-calc"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-calc"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-calc"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-impress"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-impress"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-impress"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-impress"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-draw"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-draw"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-draw"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-draw"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-math"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-math"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-math"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-math"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-base"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-base"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-base"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-base"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-binfilter"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-binfilter"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-binfilter"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-binfilter"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-onlineupd"
 solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING"
 packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-onlineupd"
-provides = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-%LANGUAGESTRING-onlineupd"
+provides = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING-onlineupd"
 requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-%LANGUAGESTRING"
 copyright = "1999-2009 by OpenOffice.org"
 solariscopyright = "solariscopyrightfile"

File solenv/bin/make_installer.pl

 						
 			installer::windows::idtglobal::prepare_language_idt_directory($languageidtdir, $newidtdir, $onelanguage, $filesinproductlanguageresolvedarrayref, \@iconfilecollector, $binarytablefiles, $allvariableshashref);
 
-			if ( ! $installer::globals::languagepack )
+			if (( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'NOLANGUAGESELECTIONPRODUCT'} ))
 			{
 				# For multilingual installation sets, the dialog for the language selection can now be prepared, with 
 				# a checkbox for each available language. This has to happen before the following translation.

File solenv/bin/modules/installer/epmfile.pm

 				$onereplaces =~ s/\s*$//;
 				installer::packagelist::resolve_packagevariables(\$onereplaces, $variableshashref, 1);
 				if ( $installer::globals::linuxlinkrpmprocess ) { $onereplaces = $onereplaces . "u"; }
+				if ( $installer::globals::debian ) { $onereplaces =~ s/_/-/g; } # Debian allows no underline in package name
 				$line = "%replaces" . " " . $onereplaces . "\n";
 				push(@epmheader, $line);
 
 			$oneprovides =~ s/\s*$//;
 			installer::packagelist::resolve_packagevariables(\$oneprovides, $variableshashref, 1);
 			if ( $installer::globals::linuxlinkrpmprocess ) { $oneprovides = $oneprovides . "u"; }
+			if ( $installer::globals::debian ) { $oneprovides =~ s/_/-/g; } # Debian allows no underline in package name
 			$line = "%provides" . " " . $oneprovides . "\n";
 			push(@epmheader, $line);
 		}
 			my $onerequires = ${$allrequires}[$i];
 			$onerequires =~ s/\s*$//;
 			installer::packagelist::resolve_packagevariables2(\$onerequires, $variableshashref, 0, $isdict);
+			if ( $installer::globals::debian ) { $onerequires =~ s/_/-/g; } # Debian allows no underline in package name
 			
 			# Special handling for Solaris. In depend files, the names of the packages are required, not 
 			# only the abbreviation. Therefore there is a special syntax for names in packagelist:
 				my $onerequires = ${$allrequires}[$i];
 				$onerequires =~ s/\s*$//;
 				installer::packagelist::resolve_packagevariables(\$onerequires, $variableshashref, 0);
+				if ( $installer::globals::debian ) { $onerequires =~ s/_/-/g; } # Debian allows no underline in package name
 
 				# Special handling for Solaris. In depend files, the names of the packages are required, not 
 				# only the abbreviation. Therefore there is a special syntax for names in packagelist:

File solenv/bin/modules/installer/globals.pm

 	%allcomponents = ();
 	%allcomponents_in_this_database = ();
 	%allshortcomponents = ();
-	%alluniquedirectorynames = ();
 	%allregistrycomponents_ = ();
 	%allregistrycomponents_in_this_database_ = ();
 	%allshortregistrycomponents = ();

File solenv/bin/modules/installer/windows/directory.pm

 use installer::globals;
 use installer::pathanalyzer;
 use installer::windows::idtglobal;
+use installer::windows::msiglobal;
 
 ##############################################################
 # Collecting all directory trees in global hash
 
 sub make_short_dir_version
 {
-	my ($longstring, $length, $displayname) = @_;
+	my ($longstring) = @_;
 	
 	my $shortstring = "";
-	my $infoline = "";
-	my $savestring = $longstring;
+	my $cutlength = 60;
+	my $length = 5; # So the directory can still be recognized
+	my $longstring_save = $longstring;
 	
 	# Splitting the string at each "underline" and allowing only $length characters per directory name.
 	# Checking also uniqueness and length.
 
 	$shortstring =~ s/^\s*\_//;
 
-	if ( length($shortstring) > 72 )
-	{
-		my $shortlength = length($shortstring);
-		$infoline = "WARNING: Failed to create unique directory name with less than 72 characters: \"$displayname\" ($shortstring ($shortlength)).\n"; 
-		push(@installer::globals::logfileinfo, $infoline);
-	}
+	# Setting unique ID to each directory
+	# No counter allowed, process must be absolute reproducable due to patch creation process.
+	
+	# chomp(my $id = `echo $longstring_save | md5sum | sed -e "s/ .*//g"`);  # Very, very slow
+	# my $subid = substr($id, 0, 9); # taking only the first 9 digits
+
+	my $subid = installer::windows::msiglobal::calculate_id($longstring_save, 9); # taking only the first 9 digits
+
+	if ( length($shortstring) > $cutlength ) { $shortstring = substr($shortstring, 0, $cutlength); }
+
+	$shortstring = $shortstring . "_" . $subid;
 
 	return $shortstring;
 }
 	my ($directoryref, $allvariables) = @_;
 
 	$installer::globals::officeinstalldirectoryset = 0;
-	
-	my %conversionhash = ();
+
+	my %completedirhashstep1 = ();
+	my %shortdirhash = ();
+	my %shortdirhashreverse = ();
 	my $infoline = "";
 	my $errorcount = 0;
 
 	for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
 	{
 		my $onedir = ${$directoryref}[$i];
-		my $hostname = $onedir->{'HostName'};
+		my $uniquename = $onedir->{'HostName'};
 
-		my $uniquename = $hostname;
 		my $styles = "";
 		if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
-		# get_path_from_fullqualifiedname(\$uniqueparentname);
-		# making /registry/schema/org/openoffice/VCL.xcs to VCL.xcs 
 
 		$uniquename =~ s/^\s*//g;				# removing beginning white spaces
 		$uniquename =~ s/\s*$//g;				# removing ending white spaces
 		$uniquename =~ s/\s//g;					# removing white spaces
 		$uniquename =~ s/\_//g;					# removing existing underlines
 		$uniquename =~ s/\.//g;					# removing dots in directoryname
+		$uniquename =~ s/OpenOffice/OO/g;
+
 		$uniquename =~ s/\Q$installer::globals::separator\E/\_/g;	# replacing slash and backslash with underline
-		$uniquename =~ s/OpenOffice/OO/g;
+
 		$uniquename =~ s/_registry/_rgy/g;
 		$uniquename =~ s/_registration/_rgn/g;
 		$uniquename =~ s/_extension/_ext/g;
 		$uniquename =~ s/_table/_tbl/g;
 		$uniquename =~ s/_chart/_crt/g;
 
-		my $startlength = 5;
-		
-		if ( ! $allvariables->{'NOSHORTDIRECTORYNAMES'} )
-		{
-			# This process does not work for SDK, because of its long and similar pathes
-			$uniquename = make_short_dir_version($uniquename, $startlength, $hostname); # taking care of underlines!
-		}
+		# The names after this small changes must still be unique!
+		if ( exists($completedirhashstep1{$uniquename}) ) { installer::exiter::exit_program("ERROR: Error in packaging process. Unallowed modification of directory name, not unique (step 1): \"$uniquename\".", "create_unique_directorynames"); }
+		$completedirhashstep1{$uniquename} = 1;
 
-		if ( exists($installer::globals::alluniquedirectorynames{$uniquename}) )
-		{
-			# This is an error, that must stop the packaging process
-			$errorcount++;
+		# Starting to make unique name for the parent and its directory
+		my $originaluniquename = $uniquename;
 
-			$infoline = "$errorcount: Already existing unique directory: $uniquename\n";
-			push( @installer::globals::logfileinfo, $infoline);
-			$infoline = "$errorcount: First full directory: $conversionhash{$uniquename}\n";
-			push( @installer::globals::logfileinfo, $infoline);
-			$infoline = "$errorcount: Current full directory: $hostname\n";
-			push( @installer::globals::logfileinfo, $infoline);		
-		}
-	
-		$conversionhash{$uniquename} = $hostname;
+		$uniquename = make_short_dir_version($uniquename);
 
-		$installer::globals::alluniquedirectorynames{$uniquename} = 1;
+		# Checking if the same directory already exists, but has another short version.
+		if (( exists($shortdirhash{$originaluniquename}) ) && ( $shortdirhash{$originaluniquename} ne $uniquename )) { installer::exiter::exit_program("ERROR: Error in packaging process. Unallowed modification of directory name, not unique (step 2A): \"$uniquename\".", "create_unique_directorynames"); }
 
-		# Important: The unique parent is generated from the string $uniquename. Therefore counters
-		# like adding "_1" is not allowed to achive uniqueness, because this depends from other directories
-		# and does not deliver always the same result.
+		# Also checking vice versa
+		# Checking if the same short directory already exists, but has another long version.
+		if (( exists($shortdirhashreverse{$uniquename}) ) && ( $shortdirhashreverse{$uniquename} ne $originaluniquename )) { installer::exiter::exit_program("ERROR: Error in packaging process. Unallowed modification of directory name, not unique (step 2B): \"$uniquename\".", "create_unique_directorynames"); }
 
-		my $uniqueparentname = $uniquename;
+		# Creating assignment from long to short directory names
+		$shortdirhash{$originaluniquename} = $uniquename;
+		$shortdirhashreverse{$uniquename} = $originaluniquename;
+
+		# Important: The unique parent is generated from the string $originaluniquename (with the use of underlines).
+
+		my $uniqueparentname = $originaluniquename;
+		my $keepparent = 1;
 
 		if ( $uniqueparentname =~ /^\s*(.*)\_(.*?)\s*$/ )	# the underline is now the separator
 		{
 			$uniqueparentname = $1;
+			$keepparent = 0;
 		}
 		else
 		{
 			$uniqueparentname = $installer::globals::programfilesfolder;
+			$keepparent = 1;
 		}
 
-		if ( $styles =~ /\bPROGRAMFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::programfilesfolder; }
-		if ( $styles =~ /\bCOMMONFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::commonfilesfolder; }
-		if ( $styles =~ /\bCOMMONAPPDATAFOLDER\b/ ) { $uniqueparentname = $installer::globals::commonappdatafolder; }
-		if ( $styles =~ /\bLOCALAPPDATAFOLDER\b/ ) { $uniqueparentname = $installer::globals::localappdatafolder; }
+		if ( $styles =~ /\bPROGRAMFILESFOLDER\b/ )
+		{
+			$uniqueparentname = $installer::globals::programfilesfolder;
+			$keepparent = 1;
+		}
+		if ( $styles =~ /\bCOMMONFILESFOLDER\b/ )
+		{
+			$uniqueparentname = $installer::globals::commonfilesfolder;
+			$keepparent = 1;
+		}
+		if ( $styles =~ /\bCOMMONAPPDATAFOLDER\b/ )
+		{
+			$uniqueparentname = $installer::globals::commonappdatafolder;
+			$keepparent = 1;
+		}
+		if ( $styles =~ /\bLOCALAPPDATAFOLDER\b/ )
+		{
+			$uniqueparentname = $installer::globals::localappdatafolder;
+			$keepparent = 1;
+		}
 
 		if ( $styles =~ /\bSHAREPOINTPATH\b/ )
 		{
 			$uniqueparentname = "SHAREPOINTPATH";
 			$installer::globals::usesharepointpath = 1;
+			$keepparent = 1;
 		}
 
+		# also setting short directory name for the parent
+		
+		my $originaluniqueparentname = $uniqueparentname;
+
+		if ( ! $keepparent )
+		{
+			$uniqueparentname = make_short_dir_version($uniqueparentname);
+		}
+
+		# Again checking if the same directory already exists, but has another short version.
+		if (( exists($shortdirhash{$originaluniqueparentname}) ) && ( $shortdirhash{$originaluniqueparentname} ne $uniqueparentname )) { installer::exiter::exit_program("ERROR: Error in packaging process. Unallowed modification of directory name, not unique (step 3A): \"$uniqueparentname\".", "create_unique_directorynames"); }
+
+		# Also checking vice versa
+		# Checking if the same short directory already exists, but has another long version.
+		if (( exists($shortdirhashreverse{$uniqueparentname}) ) && ( $shortdirhashreverse{$uniqueparentname} ne $originaluniqueparentname )) { installer::exiter::exit_program("ERROR: Error in packaging process. Unallowed modification of directory name, not unique (step 3B): \"$uniqueparentname\".", "create_unique_directorynames"); }
+
+		$shortdirhash{$originaluniqueparentname} = $uniqueparentname;
+		$shortdirhashreverse{$uniqueparentname} = $originaluniqueparentname;
+		
+		# Hyphen not allowed in database
 		$uniquename =~ s/\-/\_/g;			# making "-" to "_"
 		$uniqueparentname =~ s/\-/\_/g;		# making "-" to "_"
 		
+		# And finally setting the values for the directories
 		$onedir->{'uniquename'} = $uniquename;
 		$onedir->{'uniqueparentname'} = $uniqueparentname;
 
 			$installer::globals::vendordirectory = $uniquename;
 			$installer::globals::vendordirectoryset = 1;
 		}
-	}
-	
-	if ( $errorcount > 0 )
-	{
-		installer::exiter::exit_program("ERROR: Failed to create unique directory names.", "create_unique_directorynames");	
-	}			
+	}	
 }
 
 #####################################################
 	# DefaultDir is .:APPLIC~1|Application Data with
 	# Before ":" : [sourcedir]:[destdir] (not programmed yet)
 	# After ":" : 8+3 and not 8+3 the destination directory name
+	
+	installer::logger::include_timestamp_into_logfile("Performance Info: Directory Table start");
 
 	my @directorytable = ();
 	my $infoline;
 	$infoline = "Created idt file: $directorytablename\n"; 
 	push(@installer::globals::logfileinfo, $infoline);
 
+	installer::logger::include_timestamp_into_logfile("Performance Info: Directory Table end");
+
 }
 
 1;

File solenv/bin/modules/installer/windows/file.pm

 use installer::worker;
 use installer::windows::font;
 use installer::windows::idtglobal;
+use installer::windows::msiglobal;
 use installer::windows::language;
 
 ##########################################################################
 # -> no resetting of
 # %installer::globals::allshortcomponents
 # after a package was created.
+# Using no counter because of reproducibility.
 #########################################################
 
 sub generate_new_short_componentname
 {
 	my ($componentname) = @_;
 	
-	my $shortcomponentname = "";
-	my $counter = 1;
+	my $startversion = substr($componentname, 0, 60); # taking only the first 60 characters
+	my $subid = installer::windows::msiglobal::calculate_id($componentname, 9); # taking only the first 9 digits
+	my $shortcomponentname = $startversion . "_" . $subid;
 	
-	my $startversion = substr($componentname, 0, 60); # taking only the first 60 characters
-	$startversion = $startversion . "_";
-	
-	$shortcomponentname = $startversion . $counter;
-
-	while ( exists($installer::globals::allshortcomponents{$shortcomponentname}) )
-	{
-		$counter++;
-		$shortcomponentname = $startversion . $counter;
-	}
+	if ( exists($installer::globals::allshortcomponents{$shortcomponentname}) ) { installer::exiter::exit_program("Failed to create unique component name: \"$shortcomponentname\"", "generate_new_short_componentname"); }
 	
 	$installer::globals::allshortcomponents{$shortcomponentname} = 1;
 	
 		}
 		else
 		{
-			if ( length($componentname) > 60 )
+			if ( length($componentname) > 70 )
 			{
-				# Using md5sum needs much time
-				# chomp(my $shorter = `echo $componentname | md5sum | sed -e "s/ .*//g"`);
-				# $componentname = "comp_$shorter";
 				$componentname = generate_new_short_componentname($componentname); # This has to be unique for the complete product, not only one package
 			}
 

File solenv/bin/modules/installer/windows/idtglobal.pm

 	$$stringref =~ s/_Wrt_Flt_/_w_f_/;
 	$$stringref =~ s/_Javafilter_/_jf_/;
 	$$stringref =~ s/_Productivity_/_pr_/;
+	$$stringref =~ s/_Replacement_/_rpl_/;
 }
 
 ############################################

File solenv/bin/modules/installer/windows/msiglobal.pm

 }
 
 #################################################################
+# Calculating a ID with a string using md5 (very fast).
+#################################################################
+
+sub calculate_id
+{
+	my ( $string, $length ) = @_;
+	
+	my $id = "";
+	
+    my $md5 = Digest::MD5->new;
+    $md5->add($string);
+    my $digest = lc($md5->hexdigest);
+	$id = substr($digest, 0, $length);
+	
+	return $id;
+}
+
+#################################################################
 # Filling the component hash with the values of the 
 # component file.
 #################################################################

File solenv/bin/modules/installer/windows/registry.pm

 use installer::files;
 use installer::globals;
 use installer::worker;
+use installer::windows::msiglobal;
 use installer::windows::idtglobal;
 
 #####################################################
 	}
 	else
 	{
-		if ( length($componentname) > 60 )
+		if ( length($componentname) > 70 )
 		{
 			$componentname = generate_new_short_registrycomponentname($componentname); # This has to be unique for the complete product, not only one package
 		}
 sub generate_new_short_registrycomponentname
 {
 	my ($componentname) = @_;
+
+	my $startversion = substr($componentname, 0, 60); # taking only the first 60 characters
+	my $subid = installer::windows::msiglobal::calculate_id($componentname, 9); # taking only the first 9 digits
+	my $shortcomponentname = $startversion . "_" . $subid;
 	
-	my $shortcomponentname = "";
-	my $counter = 1;
-	
-	my $startversion = substr($componentname, 0, 60); # taking only the first 60 characters
-	$startversion = $startversion . "_";
-	
-	$shortcomponentname = $startversion . $counter;
-
-	while ( exists($installer::globals::allshortregistrycomponents{$shortcomponentname}) )
-	{
-		$counter++;
-		$shortcomponentname = $startversion . $counter;
-	}
+	if ( exists($installer::globals::allshortregistrycomponents{$shortcomponentname}) ) { installer::exiter::exit_program("Failed to create unique component name: \"$shortcomponentname\"", "generate_new_short_registrycomponentname"); }
 	
 	$installer::globals::allshortregistrycomponents{$shortcomponentname} = 1;