summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2012-03-02 13:26:34 +0000
committerHerbert Dürr <hdu@apache.org>2012-03-02 13:26:34 +0000
commit468711c6c42cdbdf85873fd9f5e18542c221ce78 (patch)
tree2a1da110b4b22f7bab412a65c82283b05702afc4
parent21e9e4e1b3b1eb1f695a2f1a67252d138338acec (diff)
support bundling of extension blobs
-rw-r--r--configure.in88
-rw-r--r--scp2/source/ooo/common_brand.scp5
-rw-r--r--set_soenv.in2
-rw-r--r--solenv/bin/make_installer.pl21
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm50
5 files changed, 121 insertions, 45 deletions
diff --git a/configure.in b/configure.in
index a3e20ad6247f..bf8f614e65e4 100644
--- a/configure.in
+++ b/configure.in
@@ -327,6 +327,17 @@ AC_ARG_ENABLE(randr-link,
[ --disable-randr-link disable linking with libXrandr, instead dynamically
open it at runtime
],,enable_randr_link=yes)
+AC_ARG_WITH(bundled-extension-blobs,
+[ --with-bundled-extension-blobs Whitespace seperated list of files in the tarball directory
+ that are to be bundled as-is for installation as extensions
+ at the first program start. Make sure to only bundle extensions
+ which can be installed without requiring a license dialog
+],,)
+#AC_ARG_WITH(bundled-prereg-extensions,
+#[ --with-bundled-prereg-extensions Whitespace seperated list of files in the tarball directory that
+# are to be bundled as pre-registered extensions. Make sure to only bundle
+# extensions which can be installed without requiring a license dialog
+#],,)
AC_ARG_WITH(system-dicts,
[ --with-system-dicts Use dictionaries from system paths- Specify
them via --with-{dict,hyph,thes}-path=/path
@@ -1454,37 +1465,58 @@ fi
AC_MSG_RESULT([$ENABLE_RPATH])
AC_SUBST(ENABLE_RPATH)
-dnl Test whether to include system dictionaries
dnl ===================================================================
-AC_MSG_CHECKING([whether to use dicts from external paths])
-if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
- AC_MSG_RESULT([yes])
- SYSTEM_DICTS=YES
- AC_MSG_CHECKING([for spelling dictionary directory])
- if test -n "$with_external_dict_dir"; then
- DICT_SYSTEM_DIR=file://$with_external_dict_dir
- else
- DICT_SYSTEM_DIR=file:///usr/share/hunspell
- fi
- AC_MSG_RESULT([$DICT_SYSTEM_DIR])
- AC_MSG_CHECKING([for hyphenation patterns directory])
- if test -n "$with_external_hyph_dir"; then
- HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
- else
- HYPH_SYSTEM_DIR=file:///usr/share/hyphen
- fi
- AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
- AC_MSG_CHECKING([for thesaurus directory])
- if test -n "$with_external_thes_dir"; then
- THES_SYSTEM_DIR=file://$with_external_thes_dir
- else
- THES_SYSTEM_DIR=file:///usr/share/mythes
- fi
- AC_MSG_RESULT([$THES_SYSTEM_DIR])
+dnl Check extensions to be bundled as literal blobs
+dnl ===================================================================
+if test -n "$with_bundled_extension_blobs"; then
+ BUNDLED_EXTENSION_BLOBS="$with_bundled_extension_blobs"
else
- AC_MSG_RESULT([no])
- SYSTEM_DICTS=NO
+ BUNDLED_EXTENSION_BLOBS=
+fi
+AC_SUBST(BUNDLED_EXTENSION_BLOBS)
+
+#dnl ===================================================================
+#dnl Check extensions that are to be bundled as pre-registerd
+#dnl ===================================================================
+if test -n "$with_bundled_prereg_extensions"; then
+ BUNDLED_PREREG_EXTENSIONS="$with_bundled_prereg_extensions"
+else
+ BUNDLED_PREREG_EXTENSIONS=
fi
+AC_SUBST(BUNDLED_PREREG_EXTENSIONS)
+
+dnl ===================================================================
+dnl Configure system provided dictionary/hyphenation/thesaurus
+dnl ===================================================================
+ AC_MSG_CHECKING([whether to use dicts from external paths])
+ if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then
+ AC_MSG_RESULT([yes])
+ SYSTEM_DICTS=YES
+ AC_MSG_CHECKING([for spelling dictionary directory])
+ if test -n "$with_external_dict_dir"; then
+ DICT_SYSTEM_DIR=file://$with_external_dict_dir
+ else
+ DICT_SYSTEM_DIR=file:///usr/share/hunspell
+ fi
+ AC_MSG_RESULT([$DICT_SYSTEM_DIR])
+ AC_MSG_CHECKING([for hyphenation patterns directory])
+ if test -n "$with_external_hyph_dir"; then
+ HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
+ else
+ HYPH_SYSTEM_DIR=file:///usr/share/hyphen
+ fi
+ AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
+ AC_MSG_CHECKING([for thesaurus directory])
+ if test -n "$with_external_thes_dir"; then
+ THES_SYSTEM_DIR=file://$with_external_thes_dir
+ else
+ THES_SYSTEM_DIR=file:///usr/share/mythes
+ fi
+ AC_MSG_RESULT([$THES_SYSTEM_DIR])
+ else
+ AC_MSG_RESULT([no])
+ SYSTEM_DICTS=NO
+ fi
AC_SUBST(SYSTEM_DICTS)
AC_SUBST(DICT_SYSTEM_DIR)
AC_SUBST(HYPH_SYSTEM_DIR)
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index d6489d951f71..ad6898bb78d8 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -39,7 +39,8 @@ Module gid_Module_Root_Brand
gid_Brand_Dir_Share_C05_Faq,
gid_Brand_Dir_Share_Config,
gid_Brand_Dir_Share_Extension,
- gid_Brand_Dir_Share_Extensions,
+ gid_Brand_Dir_Share_Extensions,
+ gid_Brand_Dir_Share_Extensions_Install,
gid_Brand_Dir_Share_Prereg,
gid_Brand_Dir_Share_Uno_Packages,
gid_Brand_Dir_Share_Uno_Packages_Cache,
@@ -227,7 +228,7 @@ Directory gid_Brand_Dir_Share_Prereg
End
Directory gid_Brand_Dir_Share_Extensions_Install
- ParentID = gid_Brand_Dir_Share_Extension;
+ ParentID = gid_Brand_Dir_Share_Extensions;
DosName = "install";
End
diff --git a/set_soenv.in b/set_soenv.in
index e6a95a7de2b7..733a135baee8 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1862,6 +1862,8 @@ ToFile( "SYSTEM_GRAPHITE", "@SYSTEM_GRAPHITE@", "e");
ToFile( "GRAPHITE_LIBS", "@GRAPHITE_LIBS@", "e");
ToFile( "GRAPHITE_CFLAGS", "@GRAPHITE_CFLAGS@", "e");
ToFile( "VC_STANDARD", "@VC_STANDARD@", "e" );
+ToFile( "BUNDLED_EXTENSION_BLOBS", "@BUNDLED_EXTENSION_BLOBS@", "e");
+ToFile( "BUNDLED_PREREG_EXTENSIONS", "@BUNDLED_PREREG_EXTENSIONS@", "e");
ToFile( "SYSTEM_DICTS", "@SYSTEM_DICTS@", "e");
ToFile( "DICT_SYSTEM_DIR", "@DICT_SYSTEM_DIR@", "e");
ToFile( "HYPH_SYSTEM_DIR", "@HYPH_SYSTEM_DIR@", "e");
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 1307a5f5847b..e82fb14bf08d 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -796,10 +796,15 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_non_existent_languages_in_productlists($filesinproductlanguageresolvedarrayref, $languagestringref, "Name", "file");
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles7.log", $filesinproductlanguageresolvedarrayref); }
- installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($filesinproductlanguageresolvedarrayref, $dirsinproductarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles8.log", $filesinproductlanguageresolvedarrayref); }
-
installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist($filesinproductlanguageresolvedarrayref, $includepatharrayref_lang, $dirsinproductlanguageresolvedarrayref, "Files");
+ if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles8a.log", $filesinproductlanguageresolvedarrayref); }
+
+ $filesinproductlanguageresolvedarrayref = installer::scriptitems::add_bundled_extension_blobs( $filesinproductlanguageresolvedarrayref);
+ if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles8b.log", $filesinproductlanguageresolvedarrayref); }
+ $filesinproductlanguageresolvedarrayref = installer::scriptitems::add_bundled_prereg_extensions( $filesinproductlanguageresolvedarrayref);
+ if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles8c.log", $filesinproductlanguageresolvedarrayref); }
+
+ installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($filesinproductlanguageresolvedarrayref, $dirsinproductarrayref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles9.log", $filesinproductlanguageresolvedarrayref); }
$filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_Files_Without_Sourcedirectory($filesinproductlanguageresolvedarrayref);
@@ -1078,21 +1083,11 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
$modulesinproductlanguageresolvedarrayref = installer::scriptitems::remove_not_required_language_modules($modulesinproductlanguageresolvedarrayref, $languagesarrayref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes_modules($loggingdir . "modules2a.log", $modulesinproductlanguageresolvedarrayref); }
- if ( $installer::globals::analyze_spellcheckerlanguage )
- {
- $modulesinproductlanguageresolvedarrayref = installer::scriptitems::remove_not_required_spellcheckerlanguage_modules($modulesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes_modules($loggingdir . "modules3.log", $modulesinproductlanguageresolvedarrayref); }
-
- $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_not_required_spellcheckerlanguage_files($filesinproductlanguageresolvedarrayref);
- if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles15b.log", $filesinproductlanguageresolvedarrayref); }
- }
-
installer::scriptitems::changing_name_of_language_dependent_keys($modulesinproductlanguageresolvedarrayref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes_modules($loggingdir . "modules3a.log", $modulesinproductlanguageresolvedarrayref); }
# installer::scriptitems::collect_language_specific_names($modulesinproductlanguageresolvedarrayref);
installer::scriptitems::select_required_language_strings($modulesinproductlanguageresolvedarrayref); # using english strings
-
}
# Copy-only projects can now start to copy all items File and ScpAction
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 8ba010d004fb..da13cabcc76a 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -490,6 +490,52 @@ sub remove_not_required_spellcheckerlanguage_files
return \@filesarray;
}
+sub add_bundled_extension_blobs
+{
+ my @filelist = @{$_[0]};
+
+ my $bundleenv = $ENV{'BUNDLED_EXTENSION_BLOBS'};
+ my $bundlesrc = $ENV{'TARFILE_LOCATION'};
+ my @bundle_files = split(/\s+/, $bundleenv, -1);
+ foreach my $filename ( @bundle_files) {
+ my $basename = File::Basename::basename( $filename);
+ my $onefile = {
+ 'Dir' => 'gid_Brand_Dir_Share_Extensions_Install',
+ 'Name' => $basename,
+ 'Styles' => '(PACKED)',
+ 'UnixRights' => '444',
+ 'sourcepath' => $bundlesrc . $installer::globals::separator . $filename
+ };
+ push( @filelist, $onefile);
+ push( @installer::globals::logfileinfo, "\tbundling \"$filename\" extension\n");
+ }
+
+ return \@filelist;
+}
+
+sub add_bundled_prereg_extensions
+{
+ my @filelist = @{$_[0]};
+
+ my $bundleenv = $ENV{'BUNDLED_PREREG_EXTENSIONS'};
+ my $bundlesrc = $ENV{'TARFILE_LOCATION'};
+ my @bundle_files = split(/\s+/, $bundleenv, -1);
+ foreach my $filename ( @bundle_files) {
+ my $basename = File::Basename::basename( $filename);
+ my $onefile = {
+ 'Dir' => 'gid_Profileitem_Uno_Uno_Bundled_Extensions_Prereg',
+ 'Name' => $basename,
+ 'Styles' => '(PACKED,ARCHIVE)',
+ 'UnixRights' => '444',
+ 'sourcepath' => $bundlesrc . $installer::globals::separator . $filename
+ };
+ push( @filelist, $onefile);
+ push( @installer::globals::logfileinfo, "\tbundling \"$filename\" extension\n");
+ }
+
+ return \@filelist;
+}
+
################################################################################
# Looking for directories without correct HostName
################################################################################
@@ -981,7 +1027,7 @@ sub get_Directoryname_From_Directorygid
}
##################################################################
-# Getting destination direcotory for links, files and profiles
+# Getting destination directory for links, files and profiles
##################################################################
sub get_Destination_Directory_For_Item_From_Directorylist # this is used for Files, Profiles and Links
@@ -1373,7 +1419,7 @@ sub remove_Files_Without_Sourcedirectory
if ( ! $installer::globals::languagepack )
{
- $infoline = "ERROR: Removing file $filename from file list.\n";
+ $infoline = "ERROR: No sourcepath -> Removing file $filename from file list.\n";
push( @installer::globals::logfileinfo, $infoline);
push(@missingfiles, "ERROR: File not found: $filename\n");