Commits

Anonymous committed 5132b8d

CWS-TOOLING: integrate CWS native255_DEV300
2009-07-10 11:34:13 +0200 is r273881 : #158814# naming schema of windows patches
2009-07-08 17:50:35 +0200 is r273842 : #158814# msp naming schema
2009-07-08 15:46:43 +0200 is r273836 : #158814# msp naming schema

  • Participants
  • Parent commits 5612b89

Comments (0)

Files changed (3)

solenv/bin/make_installer.pl

 			# Temp path for administrative installations: $installer::globals::temppath
 			# Path of new installation set: $finalinstalldir
 			# Path of old installation set: $installer::globals::updatedatabasepath
-			my $mspdir = installer::windows::msp::create_msp_patch($finalinstalldir, $includepatharrayref, $allvariableshashref, $languagestringref, $filesinproductlanguageresolvedarrayref);
+			my $mspdir = installer::windows::msp::create_msp_patch($finalinstalldir, $includepatharrayref, $allvariableshashref, $languagestringref, $languagesarrayref, $filesinproductlanguageresolvedarrayref);
 			($is_success, $finalinstalldir) = installer::worker::analyze_and_save_logfile($loggingdir, $mspdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number);
 			installer::worker::clean_output_tree();	# removing directories created in the output tree
 		}

solenv/bin/modules/installer/windows/admin.pm

 	# But this wrong expand.exe is typically in the PATH before this expand.exe, to unpack 
 	# cabinet files.
 
+#	if ( $^O =~ /cygwin/i )
+#	{
+#		$expandfile = $ENV{'SYSTEMROOT'} . "/system32/expand.exe"; # Has to be located in the systemdirectory
+#		$expandfile =~ s/\\/\//;
+#		if ( ! -f $expandfile ) { exit_program("ERROR: Did not find file $expandfile in the Windows system folder!"); }
+#	}
+
 	if ( $^O =~ /cygwin/i )
 	{
-		$expandfile = $ENV{'SYSTEMROOT'} . "/system32/expand.exe"; # Has to be located in the systemdirectory
-		$expandfile =~ s/\\/\//;
-		if ( ! -f $expandfile ) { exit_program("ERROR: Did not find file $expandfile in the Windows system folder!"); }
+		$expandfile = qx(cygpath -u "$ENV{WINDIR}"/System32/expand.exe);
+		chomp $expandfile;
 	}
 
 	my $expandlogfile = $unpackdir . $installer::globals::separator . "expand.log";

solenv/bin/modules/installer/windows/msp.pm

 }
 
 ####################################################################
+# Setting the languages for the service packs
+####################################################################
+
+sub create_langstring
+{
+	my ( $languagesarrayref ) = @_;
+	
+	my $langstring = "";
+	for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ ) { $langstring = $langstring . "_" . ${$languagesarrayref}[$i]; }
+
+	return $langstring;
+}
+
+####################################################################
 # Setting the name of the msp database
 ####################################################################
 
 sub set_mspfilename
 {
-	my ($allvariables, $mspdir) = @_;
+	my ($allvariables, $mspdir, $languagesarrayref) = @_;
 
-	my $databasename = $allvariables->{'PRODUCTNAME'} . $allvariables->{'PRODUCTVERSION'};
+	my $databasename = $allvariables->{'PRODUCTNAME'};
 	$databasename = lc($databasename);
 	$databasename =~ s/\.//g;
 	$databasename =~ s/\-//g;
 	$databasename =~ s/\s//g;
 
+	if ( $allvariables->{'MSPPRODUCTVERSION'} ) { $databasename = $databasename . $allvariables->{'MSPPRODUCTVERSION'}; }
+
 	# possibility to overwrite the name with variable DATABASENAME
 	# if ( $allvariables->{'DATABASENAME'} ) { $databasename = $allvariables->{'DATABASENAME'}; }
 
 	if (( $allvariables->{'SERVICEPACK'} ) && ( $allvariables->{'SERVICEPACK'} == 1 ))
 	{
 		my $windowspatchlevel = 0;
-		if ( $allvariables->{'WINDOWSPATCHLEVEL'} ) { $windowspatchlevel = $allvariables->{'WINDOWSPATCHLEVEL'}; }
+		if ( $allvariables->{'MSPPATCHLEVEL'} ) { $windowspatchlevel = $allvariables->{'MSPPATCHLEVEL'}; }
 		$databasename = $databasename . "_servicepack_" . $windowspatchlevel;
+		my $languagestring = create_langstring($languagesarrayref);
+		$databasename = $databasename . $languagestring;
 	}
 	else
 	{
 
 sub create_msp_patch
 {
-	my ($installationdir, $includepatharrayref, $allvariables, $languagestringref, $filesarray) = @_;
+	my ($installationdir, $includepatharrayref, $allvariables, $languagestringref, $languagesarrayref, $filesarray) = @_;
 
 	my $force = 1; # print this message even in 'quiet' mode
 	installer::logger::print_message( "\n******************************************\n" );
 	check_and_save_tables($tablelist, $localmspdir);
 
 	# Setting the name of the new msp file
-	my $mspfilename = set_mspfilename($allvariables, $mspdir);
+	my $mspfilename = set_mspfilename($allvariables, $mspdir, $languagesarrayref);
 
 	# Editing tables
 	edit_tables($tablelist, $localmspdir, $olddatabase, $newdatabase, $mspfilename, $allvariables, $languagestringref);