You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2012/03/02 15:26:34 UTC

svn commit: r1296222 - in /incubator/ooo/trunk/main: configure.in scp2/source/ooo/common_brand.scp set_soenv.in solenv/bin/make_installer.pl solenv/bin/modules/installer/scriptitems.pm

Author: hdu
Date: Fri Mar  2 14:26:34 2012
New Revision: 1296222

URL: http://svn.apache.org/viewvc?rev=1296222&view=rev
Log:
support bundling of extension blobs

Modified:
    incubator/ooo/trunk/main/configure.in
    incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp
    incubator/ooo/trunk/main/set_soenv.in
    incubator/ooo/trunk/main/solenv/bin/make_installer.pl
    incubator/ooo/trunk/main/solenv/bin/modules/installer/scriptitems.pm

Modified: incubator/ooo/trunk/main/configure.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/configure.in?rev=1296222&r1=1296221&r2=1296222&view=diff
==============================================================================
--- incubator/ooo/trunk/main/configure.in (original)
+++ incubator/ooo/trunk/main/configure.in Fri Mar  2 14:26:34 2012
@@ -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)

Modified: incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp?rev=1296222&r1=1296221&r2=1296222&view=diff
==============================================================================
--- incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp (original)
+++ incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp Fri Mar  2 14:26:34 2012
@@ -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
 

Modified: incubator/ooo/trunk/main/set_soenv.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/set_soenv.in?rev=1296222&r1=1296221&r2=1296222&view=diff
==============================================================================
--- incubator/ooo/trunk/main/set_soenv.in (original)
+++ incubator/ooo/trunk/main/set_soenv.in Fri Mar  2 14:26:34 2012
@@ -1862,6 +1862,8 @@ ToFile( "SYSTEM_GRAPHITE",   "@SYSTEM_GR
 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");

Modified: incubator/ooo/trunk/main/solenv/bin/make_installer.pl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/make_installer.pl?rev=1296222&r1=1296221&r2=1296222&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/make_installer.pl (original)
+++ incubator/ooo/trunk/main/solenv/bin/make_installer.pl Fri Mar  2 14:26:34 2012
@@ -796,10 +796,15 @@ for ( my $n = 0; $n <= $#installer::glob
 	$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::glob
 		$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 

Modified: incubator/ooo/trunk/main/solenv/bin/modules/installer/scriptitems.pm
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/modules/installer/scriptitems.pm?rev=1296222&r1=1296221&r2=1296222&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/modules/installer/scriptitems.pm (original)
+++ incubator/ooo/trunk/main/solenv/bin/modules/installer/scriptitems.pm Fri Mar  2 14:26:34 2012
@@ -490,6 +490,52 @@ sub remove_not_required_spellcheckerlang
 	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");