jl158 merging with jl154

This commit is contained in:
Joachim Lingner 2010-08-13 17:01:44 +02:00
commit fac5928edd
6 changed files with 135 additions and 125 deletions

View file

@ -43,6 +43,8 @@ Module gid_Module_Root_Brand
gid_Brand_Dir_Share_C05_Faq, gid_Brand_Dir_Share_C05_Faq,
gid_Brand_Dir_Share_Config, gid_Brand_Dir_Share_Config,
gid_Brand_Dir_Share_Extension, gid_Brand_Dir_Share_Extension,
gid_Brand_Dir_Share_Extensions,
gid_Brand_Dir_Share_Prereg,
gid_Brand_Dir_Share_Uno_Packages, gid_Brand_Dir_Share_Uno_Packages,
gid_Brand_Dir_Share_Uno_Packages_Cache, gid_Brand_Dir_Share_Uno_Packages_Cache,
gid_Brand_Dir_Share_Registry, gid_Brand_Dir_Share_Registry,
@ -97,7 +99,8 @@ Module gid_Module_Root_Brand
gid_Brand_File_Share_Xdg_Printeradmin, gid_Brand_File_Share_Xdg_Printeradmin,
gid_Brand_File_Share_Xdg_QStart, gid_Brand_File_Share_Xdg_QStart,
gid_Brand_File_Share_Xdg_StartCenter, gid_Brand_File_Share_Xdg_StartCenter,
gid_Brand_File_Share_Xdg_Writer); gid_Brand_File_Share_Xdg_Writer,
gid_Brand_File_Txt_Package);
Unixlinks = (gid_Brand_Unixlink_BasisLink, Unixlinks = (gid_Brand_Unixlink_BasisLink,
gid_Brand_Unixlink_Program, gid_Brand_Unixlink_Program,
gid_Brand_Unixlink_Unopkg, gid_Brand_Unixlink_Unopkg,
@ -221,6 +224,12 @@ Directory gid_Brand_Dir_Share_Extensions
DosName = "extensions"; DosName = "extensions";
End End
Directory gid_Brand_Dir_Share_Prereg
ParentID = gid_Brand_Dir_Share;
DosName = "prereg";
Styles = (CREATE);
End
Directory gid_Brand_Dir_Share_Extensions_Install Directory gid_Brand_Dir_Share_Extensions_Install
ParentID = gid_Brand_Dir_Share_Extension; ParentID = gid_Brand_Dir_Share_Extension;
DosName = "install"; DosName = "install";
@ -644,6 +653,13 @@ File gid_Brand_File_Images_Brand_Zip
Styles = (PACKED); Styles = (PACKED);
End End
File gid_Brand_File_Txt_Package
TXT_FILE_BODY;
Dir = gid_Brand_Dir_Share_Extensions;
Name = "package.txt";
Styles = (PACKED);
End
File gid_Brand_File_Share_Registry_Brand_Xcd File gid_Brand_File_Share_Registry_Brand_Xcd
TXT_FILE_BODY; TXT_FILE_BODY;
Styles = (PACKED, SCPZIP_REPLACE); Styles = (PACKED, SCPZIP_REPLACE);

View file

@ -461,4 +461,3 @@ ProfileItem gid_Basis_Profileitem_Version_Ooopackageversion
Key = "OOOPackageVersion"; Key = "OOOPackageVersion";
Value = "${OOOPACKAGEVERSION}"; Value = "${OOOPACKAGEVERSION}";
End End

View file

@ -199,6 +199,25 @@ WindowsCustomAction gid_Customaction_Shellextensionsdll7
Assignment1 = ("InstallExecuteSequence", "REMOVE=\"ALL\" And Not PATCH", "InstallValidate"); Assignment1 = ("InstallExecuteSequence", "REMOVE=\"ALL\" And Not PATCH", "InstallValidate");
End End
WindowsCustomAction gid_Customaction_Register_Extensions
Name = "RegisterExtensions";
Typ = "65";
Source = "shlxtmsi.dll";
Target = "RegisterExtensions";
Inbinarytable = 1;
Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\"", "end");
Assignment2 = ("AdminExecuteSequence", "Not REMOVE=\"ALL\"", "end");
End
WindowsCustomAction gid_Customaction_Remove_Extensions
Name = "RemoveExtensions";
Typ = "65";
Source = "shlxtmsi.dll";
Target = "RemoveExtensions";
Inbinarytable = 1;
Assignment1 = ("InstallExecuteSequence", "REMOVE=\"ALL\" And Not PATCH", "FileCost");
End
WindowsCustomAction gid_Customaction_Set_Admininstall WindowsCustomAction gid_Customaction_Set_Admininstall
Name = "SetAdminInstallProperty"; Name = "SetAdminInstallProperty";
Typ = "65"; Typ = "65";
@ -287,6 +306,16 @@ WindowsCustomAction gid_Customaction_Patch_InstallExchangeFiles
Assignment2 = ("AdminExecuteSequence", "", "behind_InstallFinalize"); Assignment2 = ("AdminExecuteSequence", "", "behind_InstallFinalize");
End End
WindowsCustomAction gid_Customaction_Langpack_Register_Extensions
Name = "RegisterExtensions";
Typ = "65";
Source = "lngpckinsthlp.dll";
Target = "RegisterExtensions";
Inbinarytable = 1;
Assignment1 = ("InstallExecuteSequence", "", "end");
Assignment2 = ("AdminExecuteSequence", "", "end");
End
WindowsCustomAction gid_Customaction_Patch_SetFeatureState WindowsCustomAction gid_Customaction_Patch_SetFeatureState
Name = "SetFeatureState"; Name = "SetFeatureState";
Typ = "65"; Typ = "65";

View file

@ -762,32 +762,12 @@ sub replace_many_variables_in_shellscripts
foreach $key (keys %{$variableshashref}) foreach $key (keys %{$variableshashref})
{ {
my $value = $variableshashref->{$key}; my $value = $variableshashref->{$key};
if ( ! $value =~ /.oxt/ ) { $value = lc($value); } # lowercase ! # $value = lc($value); # lowercase !
if ( $installer::globals::issolarisbuild) { $value =~ s/\.org/org/g; } # openofficeorg instead of openoffice.org # if ( $installer::globals::issolarisbuild) { $value =~ s/\.org/org/g; } # openofficeorg instead of openoffice.org
replace_variable_in_shellscripts($scriptref, $value, $key); replace_variable_in_shellscripts($scriptref, $value, $key);
} }
} }
#######################################
# Setting oxt file name variable
#######################################
sub set_oxt_filename
{
my ($filesinpackage, $allvariables) = @_;
for ( my $i = 0; $i <= $#{$filesinpackage}; $i++ )
{
my $onefile = ${$filesinpackage}[$i];
if ( $onefile->{'Name'} =~ /.oxt\s*$/ )
{
$allvariables->{'OXTFILENAME'} = $onefile->{'Name'};
# $allvariables->{'FULLOXTFILENAME'} = $onefile->{'destination'};
last; # only one oxt file for each rpm!
}
}
}
####################################### #######################################
# Adding shell scripts to epm file # Adding shell scripts to epm file
####################################### #######################################
@ -796,9 +776,6 @@ sub adding_shellscripts_to_epm_file
{ {
my ($epmfileref, $shellscriptsfilename, $localrootpath, $allvariableshashref, $filesinpackage) = @_; my ($epmfileref, $shellscriptsfilename, $localrootpath, $allvariableshashref, $filesinpackage) = @_;
# Setting variable for ${OXTFILENAME} into $allvariableshashref, if this is a RPM with an extension
set_oxt_filename($filesinpackage, $allvariableshashref);
# $installer::globals::shellscriptsfilename # $installer::globals::shellscriptsfilename
push( @{$epmfileref}, "\n\n" ); push( @{$epmfileref}, "\n\n" );
@ -1803,26 +1780,27 @@ sub is_extension_package
# share/extension/install # share/extension/install
###################################################################### ######################################################################
sub get_extension_name sub contains_extension_dir
{ {
my ($prototypefile) = @_; my ($prototypefile) = @_;
my $extensionName = ""; my $contains_extension_dir = 0;
# d none opt/openoffice.org3/share/extensions/
for ( my $i = 0; $i <= $#{$prototypefile}; $i++ ) for ( my $i = 0; $i <= $#{$prototypefile}; $i++ )
{ {
my $line = ${$prototypefile}[$i]; my $line = ${$prototypefile}[$i];
if ( $line =~ /^\s*f\s+none\s+share\/extension\/install\/(\w+?\.oxt)\s*\=/ ) if ( $line =~ /^\s*d\s+none\s.*\/share\/extensions\// )
{ {
$extensionName = $1; $contains_extension_dir = 1;
last; last;
} }
} }
return $extensionName; return $contains_extension_dir;
} }
############################################################ ############################################################
# A Solaris patch contains 7 specific scripts # A Solaris patch contains 7 specific scripts
############################################################ ############################################################
@ -1839,9 +1817,9 @@ sub add_scripts_into_prototypefile
$path = $path . $installer::globals::separator; $path = $path . $installer::globals::separator;
my @newlines = (); my @newlines = ();
my $extensionname = get_extension_name($prototypefile); my $is_extension_package = contains_extension_dir($prototypefile);
if ( $extensionname ne "" ) if ( $is_extension_package )
{ {
for ( my $i = 0; $i <= $#installer::globals::solarispatchscriptsforextensions; $i++ ) for ( my $i = 0; $i <= $#installer::globals::solarispatchscriptsforextensions; $i++ )
{ {
@ -1865,9 +1843,7 @@ sub add_scripts_into_prototypefile
my $scriptfile = installer::files::read_file($sourcefilename); my $scriptfile = installer::files::read_file($sourcefilename);
# Replacing variables # Replacing variables
my $oldstring = "\$\{OXTFILENAME\}"; my $oldstring = "PRODUCTDIRECTORYNAME";
replace_variables_in_shellscripts_for_patch($scriptfile, $destpath, $oldstring, $extensionname);
$oldstring = "PRODUCTDIRECTORYNAME";
replace_variables_in_shellscripts_for_patch($scriptfile, $destpath, $oldstring, $staticpath); replace_variables_in_shellscripts_for_patch($scriptfile, $destpath, $oldstring, $staticpath);
# Saving file # Saving file

View file

@ -71,9 +71,10 @@ sub get_extensions_dir
my $extensiondir = $subfolderdir . $installer::globals::separator; my $extensiondir = $subfolderdir . $installer::globals::separator;
if ( $installer::globals::officedirhostname ne "" ) { $extensiondir = $extensiondir . $installer::globals::officedirhostname . $installer::globals::separator; } if ( $installer::globals::officedirhostname ne "" ) { $extensiondir = $extensiondir . $installer::globals::officedirhostname . $installer::globals::separator; }
$extensiondir = $extensiondir . "share" . $installer::globals::separator . "extensions"; my $extensionsdir = $extensiondir . "share" . $installer::globals::separator . "extensions";
my $preregdir = $extensiondir . "share" . $installer::globals::separator . "prereg" . $installer::globals::separator . "bundled";
return $extensiondir; return ( $extensionsdir, $preregdir );
} }
#################################################### ####################################################
@ -82,21 +83,24 @@ sub get_extensions_dir
sub register_extensions sub register_extensions
{ {
my ($officedir, $languagestringref) = @_; my ($officedir, $languagestringref, $preregdir) = @_;
my $infoline = "";
if ( $preregdir eq "" )
{
$infoline = "ERROR: Failed to determine directory \"prereg\" for extension registration! Please check your installation set.\n";
push( @installer::globals::logfileinfo, $infoline);
installer::exiter::exit_program($infoline, "register_extensions");
}
my $programdir = $officedir . $installer::globals::separator; my $programdir = $officedir . $installer::globals::separator;
# if ( $installer::globals::sundirhostname ne "" ) { $programdir = $programdir . $installer::globals::sundirhostname . $installer::globals::separator; }
if ( $installer::globals::officedirhostname ne "" ) { $programdir = $programdir . $installer::globals::officedirhostname . $installer::globals::separator; } if ( $installer::globals::officedirhostname ne "" ) { $programdir = $programdir . $installer::globals::officedirhostname . $installer::globals::separator; }
$programdir = $programdir . "program"; $programdir = $programdir . "program";
my $from = cwd(); my $from = cwd();
chdir($programdir); chdir($programdir);
my $infoline = "";
# my $unopkgfile = $officedir . $installer::globals::separator . "program" .
# $installer::globals::separator . $installer::globals::unopkgfile;
my $unopkgfile = $installer::globals::unopkgfile; my $unopkgfile = $installer::globals::unopkgfile;
my $unopkgexists = 1; my $unopkgexists = 1;
@ -107,87 +111,73 @@ sub register_extensions
push( @installer::globals::logfileinfo, $infoline); push( @installer::globals::logfileinfo, $infoline);
} }
# my $extensiondir = $officedir . $installer::globals::separator . "share" . if ( ! -f $unopkgfile )
# $installer::globals::separator . "extension" . {
# $installer::globals::separator . "install"; $unopkgexists = 0;
$infoline = "Info: File $unopkgfile does not exist! Extensions cannot be registered.\n";
push( @installer::globals::logfileinfo, $infoline);
}
my $extensiondir = ".." . $installer::globals::separator . "share" . $installer::globals::separator . "extension" . $installer::globals::separator . "install"; if ( $unopkgexists )
my $allextensions = installer::systemactions::find_file_with_file_extension("oxt", $extensiondir);
if (( $#{$allextensions} > -1 ) && ( $unopkgexists ))
{ {
my $currentdir = cwd(); my $currentdir = cwd();
print "... current dir: $currentdir ...\n"; print "... current dir: $currentdir ...\n";
$infoline = "Current dir: $currentdir\n"; $infoline = "Current dir: $currentdir\n";
push( @installer::globals::logfileinfo, $infoline); push( @installer::globals::logfileinfo, $infoline);
for ( my $i = 0; $i <= $#{$allextensions}; $i++ ) if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); }
my $localtemppath = installer::systemactions::create_directories("uno", $languagestringref);
my $slash = "";
if ( $installer::globals::iswindowsbuild )
{ {
my $oneextension = $extensiondir . $installer::globals::separator . ${$allextensions}[$i]; if ( $^O =~ /cygwin/i )
# my $systemcall = $unopkgfile . " add --shared --suppress-license " . "\"" . $oneextension . "\"";
if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); }
if ( ! -f $oneextension ) { installer::exiter::exit_program("ERROR: $oneextension not found!", "register_extensions"); }
my $localtemppath = installer::systemactions::create_directories("uno", $languagestringref);
if ( $installer::globals::iswindowsbuild )
{ {
if ( $^O =~ /cygwin/i ) $localtemppath = $installer::globals::cyg_temppath;
{ $preregdir = qx{cygpath -m "$preregdir"};
$localtemppath = $installer::globals::cyg_temppath; chomp($preregdir);
}
else
{
$windowsslash = "\/";
}
$localtemppath =~ s/\\/\//g;
$localtemppath = "/".$localtemppath;
}
my $systemcall = $unopkgfile . " add --shared --suppress-license --verbose " . $oneextension . " -env:UserInstallation=file://" . $localtemppath . " 2\>\&1 |";
print "... $systemcall ...\n";
$infoline = "Systemcall: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
my @unopkgoutput = ();
open (UNOPKG, $systemcall);
while (<UNOPKG>)
{
my $lastline = $_;
push(@unopkgoutput, $lastline);
}
close (UNOPKG);
my $returnvalue = $?; # $? contains the return value of the systemcall
if ($returnvalue)
{
# Writing content of @unopkgoutput only in the error case into the log file. Sometimes it
# contains strings like "Error" even in the case of success. This causes a packaging error
# when the log file is analyzed at the end, even if there is no real error.
for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); }
$infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n";
push( @installer::globals::logfileinfo, $infoline);
installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions");
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
push( @installer::globals::logfileinfo, $infoline);
} }
$localtemppath =~ s/\\/\//g;
$slash = "/"; # Third slash for Windows. Other OS pathes already start with "/"
} }
}
else $preregdir =~ s/\/\s*$//g;
{
if ( ! ( $#{$allextensions} > -1 )) my $systemcall = $unopkgfile . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file://" . $slash . $preregdir . "\"" . " -env:UserInstallation=file://" . $slash . $localtemppath . " 2\>\&1 |";
print "... $systemcall ...\n";
$infoline = "Systemcall: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
my @unopkgoutput = ();
open (UNOPKG, $systemcall);
while (<UNOPKG>)
{ {
$infoline = "No extensions located in directory $extensiondir.\n"; my $lastline = $_;
push(@unopkgoutput, $lastline);
}
close (UNOPKG);
my $returnvalue = $?; # $? contains the return value of the systemcall
if ($returnvalue)
{
# Writing content of @unopkgoutput only in the error case into the log file. Sometimes it
# contains strings like "Error" even in the case of success. This causes a packaging error
# when the log file is analyzed at the end, even if there is no real error.
for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); }
$infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n";
push( @installer::globals::logfileinfo, $infoline);
installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions");
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
push( @installer::globals::logfileinfo, $infoline); push( @installer::globals::logfileinfo, $infoline);
} }
} }
@ -662,6 +652,7 @@ sub create_simple_package
if ( $onedir->{'HostName'} ) if ( $onedir->{'HostName'} )
{ {
my $destdir = $subfolderdir . $installer::globals::separator . $onedir->{'HostName'}; my $destdir = $subfolderdir . $installer::globals::separator . $onedir->{'HostName'};
if ( ! -d $destdir ) if ( ! -d $destdir )
{ {
if ( $^O =~ /cygwin/i ) # Cygwin performance check if ( $^O =~ /cygwin/i ) # Cygwin performance check
@ -787,19 +778,18 @@ sub create_simple_package
system($localcall); system($localcall);
} }
# Registering the extensions
# installer::logger::print_message( "... registering extensions ...\n" );
# installer::logger::include_header_into_logfile("Registering extensions:");
# register_extensions($subfolderdir, $languagestringref);
installer::logger::print_message( "... removing superfluous directories ...\n" ); installer::logger::print_message( "... removing superfluous directories ...\n" );
installer::logger::include_header_into_logfile("Removing superfluous directories:"); installer::logger::include_header_into_logfile("Removing superfluous directories:");
my $extensionfolder = get_extensions_dir($subfolderdir); my ( $extensionfolder, $preregdir ) = get_extensions_dir($subfolderdir);
installer::systemactions::remove_empty_dirs_in_folder($extensionfolder); installer::systemactions::remove_empty_dirs_in_folder($extensionfolder);
# Registering the extensions
installer::logger::print_message( "... registering extensions ...\n" );
installer::logger::include_header_into_logfile("Registering extensions:");
register_extensions($subfolderdir, $languagestringref, $preregdir);
if ( $installer::globals::compiler =~ /^unxmacx/ ) if ( $installer::globals::compiler =~ /^unxmacx/ )
{ {
installer::worker::put_scpactions_into_installset("$installdir/$packagename"); installer::worker::put_scpactions_into_installset("$installdir/$packagename");

2
solenv/bin/subsequenttests Executable file → Normal file
View file

@ -47,7 +47,7 @@ while (@ARGV) {
} }
my @testpaths = (); my @testpaths = ();
my $sc = SourceConfig->new(); my $sc = SourceConfig->new($ENV{'SOLARSRC'});
my $module; my $module;
foreach $module ($sc->get_active_modules()) { foreach $module ($sc->get_active_modules()) {
my $buildlst = $sc->get_module_build_list($module); my $buildlst = $sc->get_module_build_list($module);