scriptitems.pm (c6dedb65) scriptitems.pm (9568fc44)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 477 unchanged lines hidden (view full) ---

486 next;
487 }
488 push(@filesarray, $onefile);
489 }
490
491 return \@filesarray;
492}
493
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 477 unchanged lines hidden (view full) ---

486 next;
487 }
488 push(@filesarray, $onefile);
489 }
490
491 return \@filesarray;
492}
493
494=head3 add_bundled_extension_blobs
494=head3 add_bundled_extension_blobs(@filelist)
495
495 Add entries for extension blobs to the global file list.
496 Extension blobs, unlike preregistered extensions, are not
497 extracted before included into a pack set.
498
499 The set of extensions to include is taken from the BUNDLED_EXTENSION_BLOBS
500 environment variable (typically set in configure.)
501
502 If that variable is not defined then the content of main/extensions.lst defines
503 the default set.
504
505 Extension blobs are placed in gid_Brand_Dir_Share_Extensions_Install.
496 Add entries for extension blobs to the global file list.
497 Extension blobs, unlike preregistered extensions, are not
498 extracted before included into a pack set.
499
500 The set of extensions to include is taken from the BUNDLED_EXTENSION_BLOBS
501 environment variable (typically set in configure.)
502
503 If that variable is not defined then the content of main/extensions.lst defines
504 the default set.
505
506 Extension blobs are placed in gid_Brand_Dir_Share_Extensions_Install.
507
506=cut
507sub add_bundled_extension_blobs
508{
509 my @filelist = @{$_[0]};
510
511 my @bundle_files = ();
512 my $bundleenv = $ENV{'BUNDLED_EXTENSION_BLOBS'};
508=cut
509sub add_bundled_extension_blobs
510{
511 my @filelist = @{$_[0]};
512
513 my @bundle_files = ();
514 my $bundleenv = $ENV{'BUNDLED_EXTENSION_BLOBS'};
513 my $bundlesrc = $ENV{'TARFILE_LOCATION'};
515 my $bundlehttpsrc = $ENV{'TARFILE_LOCATION'} . $installer::globals::separator;
516 my $bundlefilesrc = $ENV{SOLARVERSION}
517 . $installer::globals::separator . $ENV{INPATH}
518 . $installer::globals::separator . "bin"
519 . $installer::globals::separator;
514
515 if ($installer::globals::product =~ /(SDK|URE)/i )
516 {
517 # No extensions for the SDK.
518 }
519 elsif (defined $bundleenv)
520 {
521 # Use the list of extensions that was explicitly given to configure.
520
521 if ($installer::globals::product =~ /(SDK|URE)/i )
522 {
523 # No extensions for the SDK.
524 }
525 elsif (defined $bundleenv)
526 {
527 # Use the list of extensions that was explicitly given to configure.
522 @bundle_files = split(/\s+/, $bundleenv, -1);
528 for my $name (split(/\s+/, $bundleenv, -1))
529 {
530 push @bundle_files, $bundlehttpsrc . $name;
531 }
523 }
524 else
525 {
532 }
533 else
534 {
526 # Add the default rextensions for the current language set.
527 @bundle_files = ExtensionsLst::GetExtensionList("http|https", @installer::globals::languageproducts);
535 # Add the default extensions for the current language set.
536 # http:// extensions are taken from ext_sources/.
537 for my $name (ExtensionsLst::GetExtensionList("http|https", @installer::globals::languageproducts))
538 {
539 push @bundle_files, $bundlehttpsrc . $name;
540 }
541 # file:// extensions are taken from the solver bin/ directory.
542 for my $name (ExtensionsLst::GetExtensionList("file", @installer::globals::languageproducts))
543 {
544 push @bundle_files, $bundlefilesrc . $name;
545 }
528 }
529
530 installer::logger::print_message(
546 }
547
548 installer::logger::print_message(
531 sprintf("preparing %d extension blob%s for language%s %s:\n %s\n",
549 sprintf("preparing %d extension blob%s for language%s %s:\n",
532 $#bundle_files + 1,
533 $#bundle_files!=0 ? "s" : "",
534 $#installer::globals::languageproducts!=0 ? "s" : "",
535 join(" ", @installer::globals::languageproducts),
536 join("\n ", @bundle_files)));
537
538 foreach my $filename ( @bundle_files)
539 {
540 my $basename = File::Basename::basename( $filename);
541 my $onefile = {
542 'Dir' => 'gid_Brand_Dir_Share_Extensions_Install',
543 'Name' => $basename,
544 'Styles' => '(PACKED)',
545 'UnixRights' => '444',
550 $#bundle_files + 1,
551 $#bundle_files!=0 ? "s" : "",
552 $#installer::globals::languageproducts!=0 ? "s" : "",
553 join(" ", @installer::globals::languageproducts),
554 join("\n ", @bundle_files)));
555
556 foreach my $filename ( @bundle_files)
557 {
558 my $basename = File::Basename::basename( $filename);
559 my $onefile = {
560 'Dir' => 'gid_Brand_Dir_Share_Extensions_Install',
561 'Name' => $basename,
562 'Styles' => '(PACKED)',
563 'UnixRights' => '444',
546 'sourcepath' => $bundlesrc . $installer::globals::separator . $filename,
564 'sourcepath' => $filename,
547 'modules' => "gid_Module_Dictionaries",
548 'gid' => "gid_File_Extension_".$basename
549 };
550 push( @filelist, $onefile);
551 push( @installer::globals::logfileinfo, "\tbundling \"$filename\" extension\n");
565 'modules' => "gid_Module_Dictionaries",
566 'gid' => "gid_File_Extension_".$basename
567 };
568 push( @filelist, $onefile);
569 push( @installer::globals::logfileinfo, "\tbundling \"$filename\" extension\n");
570
571 installer::logger::print_message(" " . $basename . "\n");
552 }
553
554 return \@filelist;
555}
556
572 }
573
574 return \@filelist;
575}
576
557=head3 add_bundled_prereg_extensions
577=head3 add_bundled_prereg_extensions(@filelist)
578
558 Add entries for preregistered extensions to the global file list.
579 Add entries for preregistered extensions to the global file list.
559
580
560 The set of extensions to include is taken from the BUNDLED_PREREG_EXTENSIONS
561 environment variable (typically set in configure.)
562
563 If that variable is not defined then the content of main/extensions.lst defines
564 the default set.
565
566 Preregistered extensions are placed in subdirectories of gid_Brand_Dir_Share_Prereg_Bundled.
581 The set of extensions to include is taken from the BUNDLED_PREREG_EXTENSIONS
582 environment variable (typically set in configure.)
583
584 If that variable is not defined then the content of main/extensions.lst defines
585 the default set.
586
587 Preregistered extensions are placed in subdirectories of gid_Brand_Dir_Share_Prereg_Bundled.
588
567=cut
568sub add_bundled_prereg_extensions
569{
570 my @filelist = @{$_[0]};
571 my $dirsref = $_[1];
572
573 my @bundle_files = ();
574 my $bundleenv = $ENV{'BUNDLED_PREREG_EXTENSIONS'};

--- 5 unchanged lines hidden (view full) ---

580 elsif (defined $bundleenv)
581 {
582 # Use the list of extensions that was explicitly given to configure.
583 @bundle_files = split(/\s+/, $bundleenv, -1);
584 }
585 else
586 {
587 # Add the default rextensions for the current language set.
589=cut
590sub add_bundled_prereg_extensions
591{
592 my @filelist = @{$_[0]};
593 my $dirsref = $_[1];
594
595 my @bundle_files = ();
596 my $bundleenv = $ENV{'BUNDLED_PREREG_EXTENSIONS'};

--- 5 unchanged lines hidden (view full) ---

602 elsif (defined $bundleenv)
603 {
604 # Use the list of extensions that was explicitly given to configure.
605 @bundle_files = split(/\s+/, $bundleenv, -1);
606 }
607 else
608 {
609 # Add the default rextensions for the current language set.
588 @bundle_files = ExtensionsLst::GetExtensionList("file", @installer::globals::languageproducts);
610
611 # file:// URLs are currently handled by add_bundled_extension_blobs(@), therefore
612 # we may not their handling here anmore.
613 # @bundle_files = ExtensionsLst::GetExtensionList("file", @installer::globals::languageproducts);
589 }
590
591 installer::logger::print_message(
592 sprintf("preparing %d bundled extension%s for language%s %s:\n %s\n",
593 $#bundle_files + 1,
594 $#bundle_files!=0 ? "s" : "",
595 $#installer::globals::languageproducts!=0 ? "s" : "",
596 join(" ", @installer::globals::languageproducts),

--- 2519 unchanged lines hidden ---
614 }
615
616 installer::logger::print_message(
617 sprintf("preparing %d bundled extension%s for language%s %s:\n %s\n",
618 $#bundle_files + 1,
619 $#bundle_files!=0 ? "s" : "",
620 $#installer::globals::languageproducts!=0 ? "s" : "",
621 join(" ", @installer::globals::languageproducts),

--- 2519 unchanged lines hidden ---