summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/prj/build.lst3
-rw-r--r--setup_native/prj/d.lst5
-rw-r--r--setup_native/scripts/admin.pl204
-rwxr-xr-xsetup_native/source/java/javaversion.dat26
-rw-r--r--setup_native/source/java/javaversion2.dat26
-rw-r--r--setup_native/source/opensolaris/bundledextensions/README80
-rw-r--r--setup_native/source/opensolaris/bundledextensions/installed1
-rw-r--r--setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml60
-rw-r--r--setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions108
-rwxr-xr-xsetup_native/source/packinfo/packinfo_office.txt88
-rw-r--r--setup_native/source/packinfo/spellchecker_selection.txt30
-rw-r--r--setup_native/source/ulfconv/ulfconv.cxx6
-rwxr-xr-xsetup_native/source/win32/customactions/reg64/exports.dxp2
-rwxr-xr-xsetup_native/source/win32/customactions/reg64/makefile.mk112
-rwxr-xr-xsetup_native/source/win32/customactions/reg64/reg64.cxx476
-rw-r--r--setup_native/source/win32/customactions/regactivex/regactivex.cxx50
-rwxr-xr-xsetup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx3
-rw-r--r--setup_native/source/win32/customactions/shellextensions/shellextensions.cxx87
-rw-r--r--setup_native/source/win32/msi-encodinglist.txt13
-rw-r--r--setup_native/tests/opensolaris/bundledextensions/send_ooo32
20 files changed, 1337 insertions, 75 deletions
diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst
index 8835ff0d6ad2..ad7d365c30de 100644
--- a/setup_native/prj/build.lst
+++ b/setup_native/prj/build.lst
@@ -1,4 +1,4 @@
-pk setup_native : transex3 soltools sal xml2cmp NULL
+pk setup_native : l10n transex3 soltools sal xml2cmp NULL
pk setup_native usr1 - all sn_mkout NULL
pk setup_native\scripts\source nmake - u sn_source NULL
pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL
@@ -9,6 +9,7 @@ pk setup_native\source\win32\customactions\rebase nmake - w sn_reba
pk setup_native\source\win32\customactions\regactivex nmake - w sn_regactivex NULL
pk setup_native\source\win32\customactions\regpatchactivex nmake - w sn_regpatchactivex NULL
pk setup_native\source\win32\customactions\reg4allmsdoc nmake - w sn_reg4allmsdoc NULL
+pk setup_native\source\win32\customactions\reg64 nmake - w sn_reg64 NULL
pk setup_native\source\win32\customactions\javafilter nmake - w sn_javafilter NULL
pk setup_native\source\win32\customactions\quickstarter nmake - w sn_quickstarter NULL
pk setup_native\source\win32\customactions\shellextensions nmake - w sn_shellextensions sn_tools.w NULL
diff --git a/setup_native/prj/d.lst b/setup_native/prj/d.lst
index a573b94fd5cb..9d429454ebba 100644
--- a/setup_native/prj/d.lst
+++ b/setup_native/prj/d.lst
@@ -8,6 +8,7 @@ mkdir: %_DEST%\bin%_EXT%\userscripts
..\%__SRC%\bin\uninstall %_DEST%\bin%_EXT%\userscripts\uninstall
..\%__SRC%\bin\noarch\fake-db-1.0-0.noarch.rpm %_DEST%\bin%_EXT%\openoffice.org-userland-1.0-0.noarch.rpm
+mkdir: %_DEST%\bin%_EXT%\osolsmf
..\%__SRC%\bin\ulfconv %_DEST%\bin%_EXT%\ulfconv
..\%__SRC%\bin\langpackscript.sh %_DEST%\bin%_EXT%\langpackscript.sh
..\%__SRC%\bin\linuxpatchscript.sh %_DEST%\bin%_EXT%\linuxpatchscript.sh
@@ -33,6 +34,10 @@ mkdir: %_DEST%\bin%_EXT%\userscripts
..\source\java\openofficeorg_setup.gif %_DEST%\bin%_EXT%\osl\Setup.gif
..\source\java\javaversion.dat %_DEST%\bin%_EXT%\javaversion.dat
..\source\java\javaversion2.dat %_DEST%\bin%_EXT%\javaversion2.dat
+..\source\opensolaris\bundledextensions\installed %_DEST%\bin%_EXT%\osolsmf\installed
+..\source\opensolaris\bundledextensions\README %_DEST%\bin%_EXT%\osolsmf\README
+..\source\opensolaris\bundledextensions\ooo_bundled_extensions.xml %_DEST%\bin%_EXT%\osolsmf\ooo_bundled_extensions.xml
+..\source\opensolaris\bundledextensions\svc-ooo_bundled_extensions %_DEST%\bin%_EXT%\osolsmf\svc-ooo_bundled_extensions
..\source\packinfo\solariscopyrightfile %_DEST%\bin%_EXT%\solariscopyrightfile
..\source\packinfo\*.txt %_DEST%\bin%_EXT%\*.txt
..\source\packinfo\*.pcp %_DEST%\bin%_EXT%\*.pcp
diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl
index 81d5649ffec6..f737a6392f13 100644
--- a/setup_native/scripts/admin.pl
+++ b/setup_native/scripts/admin.pl
@@ -46,6 +46,7 @@ BEGIN
$savetemppath = "";
$msiinfo_available = 0;
$path_displayed = 0;
+ $localmsidbpath = "";
$plat = $^O;
@@ -69,7 +70,7 @@ sub usage
{
print <<Ende;
----------------------------------------------------------------------
-$prog V1.0 (c) Sun Microsystems 2008
+$prog V1.0 (c) Sun Microsystems 2009
This program installs a Windows Installer installation set
without using msiexec.exe. The installation is comparable
with an administrative installation using the Windows Installer
@@ -150,6 +151,33 @@ sub controlparameter
}
#############################################################################
+# The program msidb.exe can be located next to the Perl program. Then it is
+# not neccessary to find it in the PATH variable.
+#############################################################################
+
+sub check_local_msidb
+{
+ my $msidbname = "msidb.exe";
+ my $perlprogramm = $0;
+ my $path = $perlprogramm;
+
+ get_path_from_fullqualifiedname(\$path);
+
+ $path =~ s/\\\s*$//;
+ $path =~ s/\/\s*$//;
+
+ my $msidbpath = "";
+ if ( $path =~ /^\s*$/ ) { $msidbpath = $msidbname; }
+ else { $msidbpath = $path . $separator . $msidbname; }
+
+ if ( -f $msidbpath )
+ {
+ $localmsidbpath = $msidbpath;
+ print "Using $msidbpath (next to \"admin.pl\")\n";
+ }
+}
+
+#############################################################################
# Converting a string list with separator $listseparator
# into an array
#############################################################################
@@ -198,7 +226,8 @@ sub check_system_path
}
my $patharrayref = convert_stringlist_into_array(\$pathvariable, $local_pathseparator);
- my @needed_files_in_path = ("msidb.exe", "expand.exe");
+ my @needed_files_in_path = ("expand.exe");
+ if ( $localmsidbpath eq "" ) { push(@needed_files_in_path, "msidb.exe"); } # not found locally -> search in path
my @optional_files_in_path = ("msiinfo.exe");
print("\nChecking required files:\n");
@@ -386,7 +415,7 @@ sub get_path_from_fullqualifiedname
if ( $$longfilenameref =~ /\Q$separator\E/ ) # Is there a separator in the path? Otherwise the path is empty.
{
- if ( $$longfilenameref =~ /^\s*(\S.*\S\Q$separator\E)(\S.+\S?)/ )
+ if ( $$longfilenameref =~ /^\s*(\S.*\Q$separator\E)(\S.+\S?)/ )
{
$$longfilenameref = $1;
}
@@ -486,6 +515,7 @@ sub extract_tables_from_database
my ($fullmsidatabasepath, $workdir, $tablelist) = @_;
my $msidb = "msidb.exe"; # Has to be in the path
+ if ( $localmsidbpath ) { $msidb = $localmsidbpath; }
my $infoline = "";
my $systemcall = "";
my $returnvalue = "";
@@ -513,6 +543,117 @@ sub extract_tables_from_database
}
}
+########################################################
+# Check, if this installation set contains
+# internal cabinet files included into the msi
+# database.
+########################################################
+
+sub check_for_internal_cabfiles
+{
+ my ($cabfilehash) = @_;
+
+ my $contains_internal_cabfiles = 0;
+ my %allcabfileshash = ();
+
+ foreach my $filename ( keys %{$cabfilehash} )
+ {
+ if ( $filename =~ /^\s*\#/ ) # starting with a hash
+ {
+ $contains_internal_cabfiles = 1;
+ # setting real filename without hash as key and name with hash as value
+ my $realfilename = $filename;
+ $realfilename =~ s/^\s*\#//;
+ $allcabfileshash{$realfilename} = $filename;
+ }
+ }
+
+ return ( $contains_internal_cabfiles, \%allcabfileshash );
+}
+
+#################################################################
+# Exclude all cab files from the msi database.
+#################################################################
+
+sub extract_cabs_from_database
+{
+ my ($msidatabase, $allcabfiles) = @_;
+
+ my $infoline = "";
+ my $fullsuccess = 1;
+ my $msidb = "msidb.exe"; # Has to be in the path
+ if ( $localmsidbpath ) { $msidb = $localmsidbpath; }
+
+ my @all_excluded_cabfiles = ();
+
+ if( $^O =~ /cygwin/i )
+ {
+ $msidatabase = qx{cygpath -w "$msidatabase"};
+ $msidatabase =~ s/\\/\\\\/g;
+ $msidatabase =~ s/\s*$//g;
+ }
+ else
+ {
+ # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
+ $msidatabase =~ s/\//\\\\/g;
+ }
+
+ foreach my $onefile ( keys %{$allcabfiles} )
+ {
+ my $systemcall = $msidb . " -d " . $msidatabase . " -x " . $onefile;
+ system($systemcall);
+ push(@all_excluded_cabfiles, $onefile);
+ }
+
+ \@all_excluded_cabfiles;
+}
+
+################################################################################
+# Collect all DiskIds to the corresponding cabinet files from Media.idt.
+################################################################################
+
+sub analyze_media_file
+{
+ my ($filecontent) = @_;
+
+ my %diskidhash = ();
+
+ for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
+ {
+ if ( $i < 3 ) { next; }
+
+ if ( ${$filecontent}[$i] =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ )
+ {
+ my $diskid = $1;
+ my $cabfile = $4;
+
+ $diskidhash{$cabfile} = $diskid;
+ }
+ }
+
+ return \%diskidhash;
+}
+
+sub analyze_customaction_file
+{
+ my ($filecontent) = @_;
+
+ my $register_extensions_exists = 0;
+
+ my %table = ();
+
+ for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
+ {
+ if ( ${$filecontent}[$i] =~ /^\s*RegisterExtensions\s+/ )
+ {
+ $register_extensions_exists = 1;
+ last;
+ }
+ }
+
+ return $register_extensions_exists;
+}
+
################################################################################
# Analyzing the content of Directory.idt
#################################################################################
@@ -930,6 +1071,10 @@ sub register_one_extension
$localextension =~ s/\\/\\\\/g;
}
+ if ( $^O =~ /cygwin/i ) {
+ $executable = "./" . $executable;
+ }
+
my $systemcall = $executable . " add --shared --verbose " . "\"" . $localextension . "\"" . " -env:UserInstallation=file://" . $temppath . " 2\>\&1 |";
print "... $systemcall\n";
@@ -1019,6 +1164,7 @@ sub get_sis_time_string
my $day = (localtime())[3];
my $month = (localtime())[4];
my $year = 1900 + (localtime())[5];
+ $month++;
if ( $second < 10 ) { $second = "0" . $second; }
if ( $minute < 10 ) { $minute = "0" . $minute; }
@@ -1142,6 +1288,7 @@ $starttime = time();
getparameter();
controlparameter();
+check_local_msidb();
check_system_path();
my $temppath = get_temppath();
@@ -1153,9 +1300,36 @@ create_directory($helperdir);
# Get File.idt, Component.idt and Directory.idt from database
-my $tablelist = "File Directory Component";
+my $tablelist = "File Directory Component Media CustomAction";
extract_tables_from_database($databasepath, $helperdir, $tablelist);
+# Set unpackdir
+my $unpackdir = $helperdir . $separator . "unpack";
+create_directory($unpackdir);
+
+# Reading media table to check for internal cabinet files
+my $filename = $helperdir . $separator . "Media.idt";
+if ( ! -f $filename ) { exit_program("ERROR: Could not find required file: $filename !"); }
+my $filecontent = read_file($filename);
+my $cabfilehash = analyze_media_file($filecontent);
+
+# Check, if there are internal cab files
+my ( $contains_internal_cabfiles, $all_internal_cab_files) = check_for_internal_cabfiles($cabfilehash);
+
+if ( $contains_internal_cabfiles )
+{
+ # Set unpackdir
+ my $cabdir = $helperdir . $separator . "internal_cabs";
+ create_directory($cabdir);
+ my $from = cwd();
+ chdir($cabdir);
+ # Exclude all cabinet files from database
+ my $all_excluded_cabs = extract_cabs_from_database($databasepath, $all_internal_cab_files);
+ print "Unpacking files from internal cabinet file(s)\n";
+ foreach my $cabfile ( @{$all_excluded_cabs} ) { unpack_cabinet_file($cabfile, $unpackdir); }
+ chdir($from);
+}
+
# Unpack all cab files into $helperdir, cab files must be located next to msi database
my $installdir = $databasepath;
@@ -1166,11 +1340,7 @@ make_absolute_filename_to_relative_filename(\$databasefilename);
my $cabfiles = find_file_with_file_extension("cab", $installdir);
-if ( $#{$cabfiles} < 0 ) { exit_program("ERROR: Did not find any cab file in directory $installdir"); }
-
-# Set unpackdir
-my $unpackdir = $helperdir . $separator . "unpack";
-create_directory($unpackdir);
+if (( $#{$cabfiles} < 0 ) && ( ! $contains_internal_cabfiles )) { exit_program("ERROR: Did not find any cab file in directory $installdir"); }
print "Unpacking files from cabinet file(s)\n";
for ( my $i = 0; $i <= $#{$cabfiles}; $i++ )
@@ -1180,8 +1350,8 @@ for ( my $i = 0; $i <= $#{$cabfiles}; $i++ )
}
# Reading tables
-my $filename = $helperdir . $separator . "Directory.idt";
-my $filecontent = read_file($filename);
+$filename = $helperdir . $separator . "Directory.idt";
+$filecontent = read_file($filename);
my $dirhash = analyze_directory_file($filecontent);
$filename = $helperdir . $separator . "Component.idt";
@@ -1203,8 +1373,16 @@ my $msidatabase = $targetdir . $separator . $databasefilename;
my $copyreturn = copy($databasepath, $msidatabase);
if ( ! $copyreturn) { exit_program("ERROR: Could not copy $source to $dest\n"); }
-# Registering extensions
-register_extensions($unopkgfile, $extensions, $temppath);
+# Reading tables
+$filename = $helperdir . $separator . "CustomAction.idt";
+$filecontent = read_file($filename);
+my $register_extensions_exists = analyze_customaction_file($filecontent);
+
+if ( $register_extensions_exists )
+{
+ # Registering extensions
+ register_extensions($unopkgfile, $extensions, $temppath);
+}
# Saving info in Summary Information Stream of msi database (required for following patches)
if ( $msiinfo_available ) { write_sis_info($msidatabase); }
diff --git a/setup_native/source/java/javaversion.dat b/setup_native/source/java/javaversion.dat
index 87172c3a6495..6a18f1641eab 100755
--- a/setup_native/source/java/javaversion.dat
+++ b/setup_native/source/java/javaversion.dat
@@ -30,30 +30,30 @@
#*************************************************************************
# GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})")
-JAVAVERSION=Java 6 Update 16
-WINDOWSJAVAVERSION=Java 6 Update 16
+JAVAVERSION=Java 6 Update 18
+WINDOWSJAVAVERSION=Java 6 Update 18
# Windows (scp2 and downloadtemplate.nsi)
-WINDOWSJAVAFILENAME=jre-6u16-windows-i586.exe
-WINDOWSJAVAREGISTRYENTRY=1.6.0_16
+WINDOWSJAVAFILENAME=jre-6u18-windows-i586.exe
+WINDOWSJAVAREGISTRYENTRY=1.6.0_18
# Linux (scp2)
-LINUXJAVAFILENAME=jre-6u16-linux-i586.rpm
+LINUXJAVAFILENAME=jre-6u18-linux-i586.rpm
# Linux (rpmUnit.xml, rpm -qp <filename> )
-LINUXJAVANAME=jre-1.6.0_16-fcs
+LINUXJAVANAME=jre-1.6.0_18-fcs
# Linux-x64 (scp2)
-LINUXX64JAVAFILENAME=jre-6u16-linux-amd64.rpm
+LINUXX64JAVAFILENAME=jre-6u18-linux-amd64.rpm
# Solaris Sparc (scp2)
-SOLSJAVARTPACKED=SUNWj6rt_1_6_0_16_sparc.tar.gz
-SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_16_sparc.tar.gz
-SOLSJAVAMANPACKED=SUNWj6man_1_6_0_16_sparc.tar.gz
+SOLSJAVARTPACKED=SUNWj6rt_1_6_0_18_sparc.tar.gz
+SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_18_sparc.tar.gz
+SOLSJAVAMANPACKED=SUNWj6man_1_6_0_18_sparc.tar.gz
# Solaris x86 (scp2)
-SOLIJAVARTPACKED=SUNWj6rt_1_6_0_16_x86.tar.gz
-SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_16_x86.tar.gz
-SOLIJAVAMANPACKED=SUNWj6man_1_6_0_16_x86.tar.gz
+SOLIJAVARTPACKED=SUNWj6rt_1_6_0_18_x86.tar.gz
+SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_18_x86.tar.gz
+SOLIJAVAMANPACKED=SUNWj6man_1_6_0_18_x86.tar.gz
# Solaris (pkgUnit.xml, needs only to be changed in major changes)
SOLARISJAVART=SUNWj6rt
diff --git a/setup_native/source/java/javaversion2.dat b/setup_native/source/java/javaversion2.dat
index 87172c3a6495..6a18f1641eab 100644
--- a/setup_native/source/java/javaversion2.dat
+++ b/setup_native/source/java/javaversion2.dat
@@ -30,30 +30,30 @@
#*************************************************************************
# GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})")
-JAVAVERSION=Java 6 Update 16
-WINDOWSJAVAVERSION=Java 6 Update 16
+JAVAVERSION=Java 6 Update 18
+WINDOWSJAVAVERSION=Java 6 Update 18
# Windows (scp2 and downloadtemplate.nsi)
-WINDOWSJAVAFILENAME=jre-6u16-windows-i586.exe
-WINDOWSJAVAREGISTRYENTRY=1.6.0_16
+WINDOWSJAVAFILENAME=jre-6u18-windows-i586.exe
+WINDOWSJAVAREGISTRYENTRY=1.6.0_18
# Linux (scp2)
-LINUXJAVAFILENAME=jre-6u16-linux-i586.rpm
+LINUXJAVAFILENAME=jre-6u18-linux-i586.rpm
# Linux (rpmUnit.xml, rpm -qp <filename> )
-LINUXJAVANAME=jre-1.6.0_16-fcs
+LINUXJAVANAME=jre-1.6.0_18-fcs
# Linux-x64 (scp2)
-LINUXX64JAVAFILENAME=jre-6u16-linux-amd64.rpm
+LINUXX64JAVAFILENAME=jre-6u18-linux-amd64.rpm
# Solaris Sparc (scp2)
-SOLSJAVARTPACKED=SUNWj6rt_1_6_0_16_sparc.tar.gz
-SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_16_sparc.tar.gz
-SOLSJAVAMANPACKED=SUNWj6man_1_6_0_16_sparc.tar.gz
+SOLSJAVARTPACKED=SUNWj6rt_1_6_0_18_sparc.tar.gz
+SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_18_sparc.tar.gz
+SOLSJAVAMANPACKED=SUNWj6man_1_6_0_18_sparc.tar.gz
# Solaris x86 (scp2)
-SOLIJAVARTPACKED=SUNWj6rt_1_6_0_16_x86.tar.gz
-SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_16_x86.tar.gz
-SOLIJAVAMANPACKED=SUNWj6man_1_6_0_16_x86.tar.gz
+SOLIJAVARTPACKED=SUNWj6rt_1_6_0_18_x86.tar.gz
+SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_18_x86.tar.gz
+SOLIJAVAMANPACKED=SUNWj6man_1_6_0_18_x86.tar.gz
# Solaris (pkgUnit.xml, needs only to be changed in major changes)
SOLARISJAVART=SUNWj6rt
diff --git a/setup_native/source/opensolaris/bundledextensions/README b/setup_native/source/opensolaris/bundledextensions/README
new file mode 100644
index 000000000000..f64c225d9df9
--- /dev/null
+++ b/setup_native/source/opensolaris/bundledextensions/README
@@ -0,0 +1,80 @@
+================================================================================
+Installation information
+================================================================================
+
+In order to properly install the bundled extensions, such as dictionaries, it is
+necessary that the files
+
+installed
+ooo_bundled_extensions.xml
+svc-ooo_bundled_extensions
+
+are part of the OpenOffice.org IPS package. They must be added to the package
+after all other files have been added. Those other files are the SVR4 packages
+of OOo which can be imported by pkg (pkg import).
+The files have to be uploaded this way:
+
+pkgsend -s url_to_pkg_server add file installed mode=644 owner=root group=bin path=${EXTENSIONPATH}/installed restart_fmri=svc:/application/ooo_bundled_extensions:default
+pkgsend -s url_to_pkg_server add file svc-ooo_bundled_extensions mode=744 owner=root group=bin path=/lib/svc/method/svc-ooo_bundled_extensions
+pkgsend -s url_to_pkg_server add file ooo_bundled_extensions.xml mode=644 owner=root group=bin path=/var/svc/manifest/application/ooo_bundled_extensions.xml restart_fmri=svc:/system/manifest-import:default
+
+
+---
+
+${EXTENSIONPATH} must be replaced by the path to the folder containing the
+bundled extensions. This path changes with every major release of OOo because of
+the version number which is part of a folder name. The
+current value is:
+
+EXTENSIONPATH=/opt/openoffice.org3/share/extension/install
+
+The service was tested with OpenSolaris release 2009.6 and may not work with a
+previous release.
+
+
+================================================================================
+What do these files do
+================================================================================
+
+The three files constitute a SMF service. When this service is started, then it
+installes the bundled extensions which are contained in
+/opt/openoffice.org3/share/extension/install. To install them, the service calls
+"unopkg add --shared ..." with the appropriate arguments.
+
+The service is started initially after the installation of
+ooo_bundled_extensions.xml. At this time, all files of OOo, including the
+extensions, have been copied to their destination. The service calls unopkg on
+behalf of every extension and adds the path to that extension to the file
+'installed'. The file 'installed' is used to remember what extensions have
+already been installed with unopkg. This will prevent to reinstall those
+extensions whenever the service is restarted.
+
+When a new version of OOo becomes available, then the respective OOo package
+containes a new version of 'installed'. That is, it contains a version string,
+such as 3.2.0. The sole reason for that string is, to change the content of this
+file in every release. Otherwise IPS would not replace the installed version of
+'installed' with the one contained in the package.
+
+The update procedure of OOo will replace 'installed'. 'installed' is associated
+with a restart_fmri of the service ooo_bundled_extensions. That is after
+copying 'installed' the service will be restarted. It then installes all
+extensions contained in /opt/openoffice.org3/share/extension/install, because
+the newly installed 'installed' file does not contain any entries yet, except
+for the version string.
+
+
+================================================================================
+Known issues
+================================================================================
+
+If OOo, which contains this service, is uninstalled and later it is installed
+again, then the bundled extensions are not installed. That is, unopkg is not
+called to install them with OOo's Extensions Manager. The reasons is a bug in
+OpenSolaris:
+
+http://defect.opensolaris.org/bz/show_bug.cgi?id=5742
+
+To work around this, one can call after uninstalling OOo
+
+svccfg delete -f ooo_bundled_extensions
+svccfg delete smf/manifest
diff --git a/setup_native/source/opensolaris/bundledextensions/installed b/setup_native/source/opensolaris/bundledextensions/installed
new file mode 100644
index 000000000000..0c8d8df5ae26
--- /dev/null
+++ b/setup_native/source/opensolaris/bundledextensions/installed
@@ -0,0 +1 @@
+${OOOPACKAGEVERSION}
diff --git a/setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml b/setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml
new file mode 100644
index 000000000000..66acd508c281
--- /dev/null
+++ b/setup_native/source/opensolaris/bundledextensions/ooo_bundled_extensions.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+
+<service_bundle type="manifest" name="ooo_bundled_extensions">
+
+<service
+ name="application/ooo_bundled_extensions"
+ type="service"
+ version="1">
+
+ <create_default_instance enabled="true" />
+ <single_instance/>
+
+ <dependency name="service_available"
+ grouping="require_all"
+ restart_on="none"
+ type="service">
+ <service_fmri value="svc:/system/filesystem/local:default" />
+ </dependency>
+
+ <exec_method
+ type="method" name="start"
+ exec="/lib/svc/method/svc-ooo_bundled_extensions start"
+ timeout_seconds="160">
+ <method_context>
+ <method_credential user="root" group="root" />
+ </method_context>
+ </exec_method>
+
+
+ <exec_method
+ type="method" name="stop"
+ exec="/lib/svc/method/svc-ooo_bundled_extensions stop"
+ timeout_seconds="160" >
+ <method_context>
+ <method_credential user="root" group="root" />
+ </method_context>
+ </exec_method>
+
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring"
+ value="transient" />
+ <propval name="ignore_error"
+ type="astring" value="core,signal" />
+
+ </property_group>
+
+ <stability value="Unstable" />
+
+ <template>
+ <common_name>
+ <loctext xml:lang="C">
+ Installation of OpenOffice.org's bundled extensions.
+ </loctext>
+ </common_name>
+ </template>
+</service>
+
+</service_bundle>
diff --git a/setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions b/setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions
new file mode 100644
index 000000000000..696277011133
--- /dev/null
+++ b/setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions
@@ -0,0 +1,108 @@
+#!/sbin/sh
+
+. /lib/svc/share/smf_include.sh
+
+#The start method is used for installing and updating the
+#extensions. The service keeps a list
+#(share/extensions/install/installed) of the extensions which were
+#already installed. During installation, the bundled extensions are
+#copied to the install folder (share/extensions/install). Finally this
+#service, which is part of the office installation package, will be
+#started and the start "method" of this script is called. Then all
+#extensions in the "install" folder are checked if they are already
+#installed by reading the list "installed". Because the list is empty
+#at this time, all the extensions will be installed.
+#
+#If this service is restarted then the script checks if there is an
+#extensions which is not yet installed, that is there is no entry for
+#it in the 'installed' file. Only if this is the case then that
+#extensions will be installed and its path is added to 'installed'.
+#
+#In case of an update, new versions of existing extensions and
+#completely new extensions may be copied to the 'install' folder. Also
+#a new 'installed' file will be copied which replaces the existing
+#file. The new 'installed' file does not contain any entries of
+#installed extensions. Therefore the next time when the start method is
+#run all extensions contained in share/extensions/install will be
+#installed.
+
+#Create the folder which contains the temporary user installation
+INSTDIR=`/usr/bin/mktemp -d "/tmp/userinstall.XXXXXX"`
+
+OOO_BASE_DIR="/opt/openoffice.org/basis${OOOBASEVERSION}"
+
+case "$1" in
+'start')
+ EXTENSIONDIR=/opt/openoffice.org${OOOBRANDPACKAGEVERSION}/share/extension/install
+ for FILE in $EXTENSIONDIR/*.oxt
+ do
+ #We check if the file exist, because if there is no extension
+ #then $FILE will contain "<..>/*.oxt"
+ if [ -f "$FILE" ]; then
+ #Determine if this extension is already installed. We do
+ #that by checking the file "installed" which contains a
+ #list of all installed extensions including the full path
+ EXTENSIONFILE=`basename $FILE`
+ INSTALLED=`sed -n "/$EXTENSIONFILE/p" $EXTENSIONDIR/installed`
+
+ if [ -z "$INSTALLED" ]; then
+ #We have not found the name of the extension in the
+ #list. That is, it has not been installed (with unopkg) yet.
+ #Therefore we do it now.
+ echo installing $FILE
+ /opt/openoffice.org${OOOBRANDPACKAGEVERSION}/program/unopkg add --shared --bundled "$FILE" '-env:UserInstallation=file://$INSTDIR' '-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ #Let us remember that this extensions has been installed
+ #by adding the path name of the extension to the file
+ #installed
+ echo $FILE >> $EXTENSIONDIR/installed
+ fi
+ fi
+ done
+
+ #Now check for extensions which need to be uninstalled
+ #(unopkg). This is the case if the list of extensions in the file
+ #installed contains the name of an extension which does not exist
+ #in the the folder <..>/share/extension/install.
+# LINE=""
+# NEWCONTENT=""
+# REMOVED=""
+# LIST=`cat $EXTENSIONDIR/installed`
+# #remove blank lines
+# LIST=`echo "$LIST" | sed '/^[:blank:]*$/d'`
+
+# echo "$LIST" | while [ 1 ]
+# do
+# read LINE || break
+# if [ ! -f "$LINE" ]; then
+# #The extension file has been removed from
+# #share/extension/install. Now we remove the installed
+# #extension
+# echo removing `basename $LINE`
+# /opt/openoffice.org${OOOBRANDPACKAGEVERSION}/program/unopkg remove --shared --bundled "`basename $LINE`" '-env:UserInstallation=file://$INSTDIR' '-env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+# REMOVED=1
+# else
+# NEWCONTENT+=$LINE
+# NEWCONTENT+="\n"
+# fi
+# done
+
+# #Write the new list to the file "installed". It now has all names
+# #remove which refered to previously removed extensions (removed
+# #from .../share/extension/install)
+# if [ "$REMOVED" ]; then
+# #remove the last empty line
+# NEWCONTENT=`echo "$NEWCONTENT" | sed '/^[:space:]*$/d'`
+# echo "$NEWCONTENT" > $EXTENSIONDIR/installed
+# fi
+
+ ;;
+ 'stop')
+ echo "#### stop ####"
+ ;;
+ *)
+ echo "Usage: $0 { start | stop }"
+ exit 1
+ ;;
+esac
+
+exit $SMF_EXIT_OK
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index b3e68ac17bff..d4ba6e1be452 100755
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -508,6 +508,22 @@ packageversion = "%PACKAGEVERSION"
End
Start
+module = "gid_Module_Root_Extension_Dictionary_Ca"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ca"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ca"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "Ca dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
module = "gid_Module_Root_Extension_Dictionary_Cs"
script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-cs"
@@ -540,17 +556,49 @@ packageversion = "%PACKAGEVERSION"
End
Start
-module = "gid_Module_Root_Extension_Dictionary_De"
+module = "gid_Module_Root_Extension_Dictionary_De_AT"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-AT"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-AT"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "De-AT dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
+module = "gid_Module_Root_Extension_Dictionary_De_CH"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-CH"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-CH"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "De-CH dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
+module = "gid_Module_Root_Extension_Dictionary_De_DE"
script = "shellscripts_extensions.txt"
-solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-DE"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
-packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-DE"
requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
linuxpatchrequires = ""
copyright = "1999-2009 by Sun Microsystems"
solariscopyright = "solariscopyrightfile"
vendor = "Sun Microsystems, Inc."
-description = "De dictionary for %PRODUCTNAME %PRODUCTVERSION"
+description = "De-DE dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
End
@@ -732,6 +780,22 @@ packageversion = "%PACKAGEVERSION"
End
Start
+module = "gid_Module_Root_Extension_Dictionary_No"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-no"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-no"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "No dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
module = "gid_Module_Root_Extension_Dictionary_Pl"
script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-pl"
@@ -764,6 +828,22 @@ packageversion = "%PACKAGEVERSION"
End
Start
+module = "gid_Module_Root_Extension_Dictionary_Ro"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ro"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ro"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "Ro dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
module = "gid_Module_Root_Extension_Dictionary_Ru"
script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ru"
diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt
index 2abcc10db890..03d741b0afbb 100644
--- a/setup_native/source/packinfo/spellchecker_selection.txt
+++ b/setup_native/source/packinfo/spellchecker_selection.txt
@@ -4,34 +4,38 @@
# Second column: Assigned spellchecker languages. Comma separated list.
af = "af,en-US"
-ca = "ca,es,en,fr"
+ar = "en-US"
+ca = "ca,es,en-US,fr"
cs = "cs,en-US"
-da = "da,de,en-US"
-de = "de,en-US,fr,it"
+da = "da,de-DE,en-US"
+de = "de-AT,de-CH,de-DE,en-US,fr,it"
en-US = "en-US,es,fr"
+en-GB = "en-US,es,fr"
es = "en-US,es,fr,pt"
et = "en-US,et"
fr = "en-US,es,fr"
gl = "en-US,pt,es,gl"
he = "en-US,he"
-hu = "de,en-US,hu"
-it = "de,en-US,fr,it"
+hu = "de-DE,en-US,hu"
+it = "de-DE,en-US,fr,it"
ja = "en-US"
ko = "en-US"
lt = "en-US,lt"
-nb = "no,en,fr,de,es"
+nb = "no,en-US,fr,de-DE,es"
ne = "en-US,ne"
-nl = "en-US,fr,de,nl"
-nn = "no,en,fr,de,es"
-pl = "de,en-US,pl,ru"
+nl = "en-US,fr,de-DE,nl"
+nn = "no,en-US,fr,de-DE,es"
+pl = "de-DE,en-US,pl,ru"
pt-BR = "en-US,es,pt"
-ro = "ro,en,de,hu"
-ru = "de,en-US,ru"
+pt = "en-US,es,pt"
+ro = "ro,en-US,de-DE,hu"
+ru = "de-DE,en-US,ru"
sk = "en-US,sk"
sl = "en-US,sl"
-sv = "de,en-US,sv"
+sv = "de-DE,en-US,sv"
sr = "sr,en-US"
-sh = "sh,en-US"
+# ! Note the package 'sr' also holds the dictionaries for 'sh' !
+sh = "sr,en-US"
sw = "en-US,sw"
th = "en-US,th"
vi = "en-US,fr,vi"
diff --git a/setup_native/source/ulfconv/ulfconv.cxx b/setup_native/source/ulfconv/ulfconv.cxx
index 6ca6834461f9..7a345f8b365a 100644
--- a/setup_native/source/ulfconv/ulfconv.cxx
+++ b/setup_native/source/ulfconv/ulfconv.cxx
@@ -199,6 +199,8 @@ void read_encoding_table(char * file, EncodingMap& aEncodingMap)
aEncodingMap.insert( EncodingMap::value_type(language, encoding->value) );
}
}
+
+ fclose(fp);
}
/************************************************************************
@@ -311,6 +313,7 @@ int main( int argc, char * const argv[] )
ostream = fopen(outfile, "w");
if ( ostream == NULL ) {
fprintf(stderr, "ulfconv: %s : %s\n", outfile, strerror(errno));
+ fclose(istream);
exit(2);
}
}
@@ -351,4 +354,7 @@ int main( int argc, char * const argv[] )
fputs(buffer, ostream);
}
}
+
+ fclose(ostream);
+ fclose(istream);
}
diff --git a/setup_native/source/win32/customactions/reg64/exports.dxp b/setup_native/source/win32/customactions/reg64/exports.dxp
new file mode 100755
index 000000000000..3282da1eeac0
--- /dev/null
+++ b/setup_native/source/win32/customactions/reg64/exports.dxp
@@ -0,0 +1,2 @@
+InstallReg64
+DeinstallReg64
diff --git a/setup_native/source/win32/customactions/reg64/makefile.mk b/setup_native/source/win32/customactions/reg64/makefile.mk
new file mode 100755
index 000000000000..17c56716af14
--- /dev/null
+++ b/setup_native/source/win32/customactions/reg64/makefile.mk
@@ -0,0 +1,112 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.20 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..$/..
+PRJNAME=setup_native
+TARGET=reg64msi
+
+# --- Settings -----------------------------------------------------
+
+ENABLE_EXCEPTIONS=TRUE
+NO_DEFAULT_STL=TRUE
+DYNAMIC_CRT=
+USE_DEFFILE=TRUE
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+.INCLUDE : settings.mk
+
+.IF "$(USE_SYSTEM_STL)" != "YES"
+CFLAGS+=-D_STLP_USE_STATIC_LIB
+.ENDIF
+
+#Disable precompiled header
+CDEFS+=-Dnot_used_define_to_disable_pch
+
+# --- Files --------------------------------------------------------
+
+.IF "$(GUI)"=="WNT"
+
+UWINAPILIB=
+
+SLOFILES = \
+ $(SLO)$/reg64.obj
+
+STDSHL += \
+ $(KERNEL32LIB)\
+ $(USER32LIB)\
+ $(ADVAPI32LIB)\
+ $(SHELL32LIB)\
+ $(MSILIB)\
+ $(SHLWAPILIB)\
+
+# msvcprt.lib
+
+SHL1TARGET = $(TARGET)
+SHL1IMPLIB = i$(TARGET)
+
+SHL1OBJS=$(SLOFILES)
+SHL1DEF = $(MISC)$/$(SHL1TARGET).def
+SHL1DEPN = $(SLB)$/$(TARGET).lib
+DEF1NAME=$(SHL1TARGET)
+DEF1EXPORTFILE=exports.dxp
+
+.ENDIF
+
+
+# --- mapimailer --------------------------------------------------------
+
+#TARGETTYPE=CUI
+
+#OBJFILES= $(OBJ)$/reg64.obj
+
+#APP1TARGET=reg64
+#APP1OBJS=$(OBJFILES)
+#APP1STDLIBS=$(KERNEL32LIB)\
+# $(ADVAPI32LIB)\
+# $(MSILIB)\
+# $(SHELL32LIB)\
+# msvcprt.lib\
+# $(OLE32LIB)\
+# $(COMCTL32LIB)\
+# $(UUIDLIB)
+
+
+#APP1DEF=$(MISC)$/$(APP1TARGET).def
+
+# --- Targets --------------------------------------------------------------
+
+.INCLUDE : target.mk
+INCLUDE!:=$(subst,/stl, $(INCLUDE))
+.EXPORT : INCLUDE
+
+# -------------------------------------------------------------------------
+
+
diff --git a/setup_native/source/win32/customactions/reg64/reg64.cxx b/setup_native/source/win32/customactions/reg64/reg64.cxx
new file mode 100755
index 000000000000..ffa225791ead
--- /dev/null
+++ b/setup_native/source/win32/customactions/reg64/reg64.cxx
@@ -0,0 +1,476 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shellextensions.cxx,v $
+* $Revision: 1.7 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+/*
+
+*/
+
+
+#define UNICODE
+
+#ifdef _MSC_VER
+#pragma warning(push, 1) /* disable warnings within system headers */
+#endif
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <msiquery.h>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#include <malloc.h>
+//#include <string>
+//#include <map>
+#include <strsafe.h>
+
+// 10.11.2009 tkr: MinGW doesn't know anything about RegDeleteKeyExW if WINVER < 0x0502.
+extern "C" {
+WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
+}
+
+// 06.11.2009 tkr: to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY
+// in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems.
+// Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and
+// extensions\source\activex\main\so_activex.cpp
+#ifndef KEY_WOW64_64KEY
+ #define KEY_WOW64_64KEY (0x0100)
+#endif
+
+
+#define TABLE_NAME L"Reg64"
+#define BASISINSTALLLOCATION L"[BASISINSTALLLOCATION]"
+
+bool isInstall4AllUsers;
+wchar_t * sBasisInstallLocation;
+
+
+enum OPERATION {
+ SET,
+ REMOVE
+};
+
+#ifdef DEBUG
+inline void OutputDebugStringFormat( const wchar_t* pFormat, ... )
+{
+ wchar_t buffer[1024];
+ va_list args;
+
+ va_start( args, pFormat );
+ StringCchVPrintf( buffer, sizeof(buffer), pFormat, args );
+ OutputDebugString( buffer );
+}
+#else
+static inline void OutputDebugStringFormat( const wchar_t*, ... )
+{
+}
+#endif
+
+bool WriteRegistry( MSIHANDLE & hMSI, OPERATION op, const wchar_t* componentName)
+{
+ INSTALLSTATE current_state;
+ INSTALLSTATE comp_state;
+ UINT ret = MsiGetComponentState( hMSI, componentName, &current_state, &comp_state );
+ if ( ERROR_SUCCESS == ret )
+ {
+ if (current_state == INSTALLSTATE_ABSENT)
+ OutputDebugStringFormat(L"WriteRegistry - current_state: INSTALLSTATE_ABSENT");
+ else if (current_state == INSTALLSTATE_DEFAULT)
+ OutputDebugStringFormat(L"WriteRegistry - current_state: INSTALLSTATE_DEFAULT");
+ else if (current_state == INSTALLSTATE_LOCAL)
+ OutputDebugStringFormat(L"WriteRegistry - current_state: INSTALLSTATE_LOCAL");
+ else if (current_state == INSTALLSTATE_REMOVED)
+ OutputDebugStringFormat(L"WriteRegistry - current_state: INSTALLSTATE_REMOVED");
+ else if (current_state == INSTALLSTATE_SOURCE)
+ OutputDebugStringFormat(L"WriteRegistry - current_state: INSTALLSTATE_SOURCE");
+ else if (current_state == INSTALLSTATE_UNKNOWN)
+ OutputDebugStringFormat(L"WriteRegistry - current_state: INSTALLSTATE_UNKNOWN");
+
+ if (comp_state == INSTALLSTATE_ABSENT)
+ OutputDebugStringFormat(L"WriteRegistry - comp_state: INSTALLSTATE_ABSENT");
+ else if (comp_state == INSTALLSTATE_DEFAULT)
+ OutputDebugStringFormat(L"WriteRegistry - comp_state: INSTALLSTATE_DEFAULT");
+ else if (comp_state == INSTALLSTATE_LOCAL)
+ OutputDebugStringFormat(L"WriteRegistry - comp_state: INSTALLSTATE_LOCAL");
+ else if (comp_state == INSTALLSTATE_REMOVED)
+ OutputDebugStringFormat(L"WriteRegistry - comp_state: INSTALLSTATE_REMOVED");
+ else if (comp_state == INSTALLSTATE_SOURCE)
+ OutputDebugStringFormat(L"WriteRegistry - comp_state: INSTALLSTATE_SOURCE");
+ else if (comp_state == INSTALLSTATE_UNKNOWN)
+ OutputDebugStringFormat(L"WriteRegistry - comp_state: INSTALLSTATE_UNKNOWN");
+
+ switch (op)
+ {
+ case SET :
+ if ( comp_state == INSTALLSTATE_LOCAL || ( current_state == INSTALLSTATE_LOCAL && comp_state == INSTALLSTATE_UNKNOWN ) )
+ {
+ return true;
+ }
+ break;
+ case REMOVE:
+ OutputDebugStringFormat(L"WriteRegistry - Remove\n" );
+ if ( current_state == INSTALLSTATE_LOCAL && (comp_state == INSTALLSTATE_ABSENT || comp_state == INSTALLSTATE_REMOVED) )
+ {
+ OutputDebugStringFormat(L"WriteRegistry - To be removed\n" );
+ return true;
+ }
+ }
+ } else
+ {
+ if (ERROR_INVALID_HANDLE == ret) OutputDebugStringFormat(L"WriteRegistry - Invalid handle");
+ if (ERROR_UNKNOWN_FEATURE == ret) OutputDebugStringFormat(L"WriteRegistry - Unknown feature");
+ }
+
+ return false;
+}
+
+BOOL UnicodeEquals( wchar_t* pStr1, wchar_t* pStr2 )
+{
+ if ( pStr1 == NULL && pStr2 == NULL )
+ return TRUE;
+ else if ( pStr1 == NULL || pStr2 == NULL )
+ return FALSE;
+
+ while( *pStr1 == *pStr2 && *pStr1 && *pStr2 )
+ pStr1++, pStr2++;
+
+ return ( *pStr1 == 0 && *pStr2 == 0 );
+}
+
+BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
+{
+ OutputDebugStringFormat(L"GetMsiProp - START\n" );
+ DWORD sz = 0;
+ UINT ret = MsiGetProperty( hMSI, pPropName, L"", &sz );
+ if ( ret == ERROR_MORE_DATA )
+ {
+ sz++;
+ DWORD nbytes = sz * sizeof( wchar_t );
+ wchar_t* buff = reinterpret_cast<wchar_t*>( malloc( nbytes ) );
+ ZeroMemory( buff, nbytes );
+ MsiGetProperty( hMSI, pPropName, buff, &sz );
+
+ OutputDebugStringFormat(L"GetMsiProp - Value" );
+ OutputDebugStringFormat( buff );
+ *ppValue = buff;
+
+ return TRUE;
+ } else if (ret == ERROR_INVALID_HANDLE)
+ {
+ OutputDebugStringFormat(L"GetMsiProp - ERROR_INVALID_HANDLE" );
+ } else if (ret == ERROR_INVALID_PARAMETER)
+ {
+ OutputDebugStringFormat(L"GetMsiProp - ERROR_INVALID_PARAMETER" );
+ } else if (ret == ERROR_SUCCESS)
+ {
+ OutputDebugStringFormat(L"GetMsiProp - ERROR_SUCCESS" );
+ }
+
+
+ OutputDebugStringFormat(L"GetMsiProp - ENDE\n" );
+ return FALSE;
+}
+
+bool IsInstallForAllUsers( MSIHANDLE hMSI )
+{
+ OutputDebugStringFormat(L"IsInstallForAllUsers - START\n" );
+ bool bResult = FALSE;
+ wchar_t* pVal = NULL;
+ if ( GetMsiProp( hMSI, L"ALLUSERS", &pVal ) && pVal )
+ {
+ bResult = UnicodeEquals( pVal , L"1" );
+ free( pVal );
+ }
+
+ OutputDebugStringFormat(L"IsInstallForAllUsers - ENDE\n" );
+ return bResult;
+}
+
+wchar_t* GetBasisInstallLocation( MSIHANDLE hMSI )
+{
+ OutputDebugStringFormat(L"GetBasisInstallLocation - START\n" );
+ bool bResult = FALSE;
+ wchar_t* pVal = NULL;
+ GetMsiProp( hMSI, L"BASISINSTALLLOCATION", &pVal);
+
+ OutputDebugStringFormat(L"GetBasisInstallLocation - ENDE\n" );
+ return pVal;
+}
+
+
+bool QueryReg64Table(MSIHANDLE& rhDatabase, MSIHANDLE& rhView)
+{
+ OutputDebugStringFormat(L"QueryReg64Table - START\n" );
+ int const arraysize = 400;
+ wchar_t szSelect[arraysize];
+ StringCbPrintfW(szSelect, arraysize * sizeof(wchar_t), L"SELECT * FROM %s",TABLE_NAME);
+ OutputDebugStringFormat( szSelect );
+
+ UINT ret = MsiDatabaseOpenView(rhDatabase,szSelect,&rhView);
+ if (ret != ERROR_SUCCESS)
+ {
+ if ( ret == ERROR_BAD_QUERY_SYNTAX)
+ OutputDebugStringFormat(L"QueryReg64Table - MsiDatabaseOpenView - FAILED - ERROR_BAD_QUERY_SYNTAX\n" );
+ if ( ret == ERROR_INVALID_HANDLE)
+ OutputDebugStringFormat(L"QueryReg64Table - MsiDatabaseOpenView - FAILED - ERROR_INVALID_HANDLE\n" );
+ return false;
+ }
+ // execute query - not a parameter query so second parameter is NULL.
+ if (MsiViewExecute(rhView,NULL) != ERROR_SUCCESS)
+ {
+ OutputDebugStringFormat(L"QueryReg64Table - MsiViewExecute - FAILED\n" );
+ return false;
+ }
+
+ OutputDebugStringFormat(L"QueryReg64Table - ENDE\n" );
+ return true;
+}
+
+//---------------------------------------
+bool DeleteRegistryKey(HKEY RootKey, const wchar_t* KeyName)
+{
+ int rc = RegDeleteKeyExW(
+ RootKey, KeyName, KEY_WOW64_64KEY, 0);
+
+ return (ERROR_SUCCESS == rc);
+}
+
+
+
+
+//---------------------------------------
+//
+//---------------------------------------
+
+bool SetRegistryKey(HKEY RootKey, const wchar_t* KeyName, const wchar_t* ValueName, const wchar_t* Value)
+{
+ HKEY hSubKey;
+
+ // open or create the desired key
+ int rc = RegCreateKeyEx(
+ RootKey, KeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE | KEY_WOW64_64KEY, 0, &hSubKey, 0);
+
+ if (ERROR_SUCCESS == rc)
+ {
+ OutputDebugStringFormat(L"SetRegistryKey - Created\n" );
+ rc = RegSetValueEx(
+ hSubKey, ValueName, 0, REG_SZ, reinterpret_cast<const BYTE*>(Value), (wcslen(Value) + 1) * sizeof(wchar_t));
+
+ RegCloseKey(hSubKey);
+ } else {
+ OutputDebugStringFormat(L"SetRegistryKey - FAILED\n" );
+ }
+
+
+ return (ERROR_SUCCESS == rc);
+}
+
+bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView)
+{
+ OutputDebugStringFormat(L"DoRegEntries - START\n" );
+
+ MSIHANDLE hRecord;
+
+ long lRoot;
+ wchar_t szKey[255];
+ wchar_t szName[255];
+ wchar_t szValue[1024];
+ wchar_t szComponent[255];
+
+ /// read records until there are no more records
+ while (MsiViewFetch(rhView,&hRecord) == ERROR_SUCCESS)
+ {
+ DWORD dwKey = 255;
+ DWORD dwName = 255;
+ DWORD dwValue = 1024;
+ DWORD dwComponent = 255;
+
+ szKey[0] = '\0';
+ szName[0] = '\0';
+ szValue[0] = '\0';
+ szComponent[0] = '\0';
+
+ lRoot = MsiRecordGetInteger(hRecord,2);
+ MsiRecordGetString(hRecord,3,szKey,&dwKey);
+
+ if (!MsiRecordIsNull(hRecord, 4))
+ MsiRecordGetString(hRecord,4,szName,&dwName);
+
+ if (!MsiRecordIsNull(hRecord, 5))
+ {
+ MsiRecordGetString(hRecord,5,szValue,&dwValue);
+
+
+
+ wchar_t* nPos = wcsstr(szValue , BASISINSTALLLOCATION);
+ if ( NULL != nPos)
+ {
+
+ DWORD nPrefixSize = nPos - szValue;
+
+ DWORD nPropSize = wcslen(sBasisInstallLocation);
+ DWORD nPostfixSize = dwValue - wcslen( BASISINSTALLLOCATION );
+
+ DWORD nNewValueBytes = (nPropSize + nPostfixSize + 1) * sizeof( wchar_t );
+ wchar_t* newValue = reinterpret_cast<wchar_t*>( malloc( nNewValueBytes ) );
+ ZeroMemory( newValue, nNewValueBytes );
+
+ // prefix
+ wcsncpy(newValue, szValue, nPrefixSize);
+
+ // basis location
+ wcsncat(newValue, sBasisInstallLocation, nPropSize * sizeof( wchar_t ));
+
+ // postfix
+ wcsncat(newValue, nPos + ( wcslen( BASISINSTALLLOCATION ) ), nPropSize * sizeof( wchar_t ));
+
+ wcsncpy(szValue, newValue, nNewValueBytes <=1024? nNewValueBytes: 1024);
+
+ free(newValue);
+ }
+
+ }
+
+
+ MsiRecordGetString(hRecord,6,szComponent,&dwComponent);
+
+ OutputDebugStringFormat(L"****** DoRegEntries *******" );
+ OutputDebugStringFormat(L"Root:" );
+ HKEY key = HKEY_CURRENT_USER;
+ switch (lRoot)
+ {
+ case(-1):
+ if (isInstall4AllUsers)
+ {
+ key = HKEY_CURRENT_USER;
+ OutputDebugStringFormat(L"HKEY_CURRENT_USER" );
+ }
+ else
+ {
+ key = HKEY_LOCAL_MACHINE;
+ OutputDebugStringFormat(L"HKEY_LOCAL_MACHINE" );
+ }
+ break;
+ case(0):
+ key = HKEY_CLASSES_ROOT;
+ OutputDebugStringFormat(L"HKEY_CLASSES_ROOT" );
+ break;
+ case(1):
+ key = HKEY_CURRENT_USER;
+ OutputDebugStringFormat(L"HKEY_CURRENT_USER" );
+ break;
+ case(2):
+ key = HKEY_LOCAL_MACHINE;
+ OutputDebugStringFormat(L"HKEY_LOCAL_MACHINE" );
+ break;
+ case(3):
+ key = HKEY_USERS;
+ OutputDebugStringFormat(L"HKEY_USERS" );
+ break;
+
+ }
+
+ OutputDebugStringFormat(L"Key:");
+ OutputDebugStringFormat( szKey );
+ OutputDebugStringFormat(L"Name:");
+ OutputDebugStringFormat( szName );
+ OutputDebugStringFormat(L"Value:");
+ OutputDebugStringFormat( szValue);
+ OutputDebugStringFormat(L"Component:");
+ OutputDebugStringFormat( szComponent );
+ OutputDebugStringFormat(L"*******************" );
+ switch (op)
+ {
+ case SET:
+
+ if (WriteRegistry(rhMSI, SET, szComponent))
+ {
+ OutputDebugStringFormat(L"DoRegEntries - Write\n" );
+ SetRegistryKey(key, szKey, szName, szValue);
+ }
+ break;
+ case REMOVE:
+ OutputDebugStringFormat(L"DoRegEntries - PreRemove\n" );
+ if (WriteRegistry(rhMSI, REMOVE, szComponent))
+ {
+ OutputDebugStringFormat(L"DoRegEntries - Remove\n" );
+ DeleteRegistryKey(key, szKey);
+ }
+ break;
+ }
+ }
+
+ MsiCloseHandle(rhView);
+
+
+ OutputDebugStringFormat(L"DoRegEntries - ENDE\n" );
+
+ return true;
+}
+
+
+bool Reg64(MSIHANDLE& rhMSI, OPERATION op)
+{
+ isInstall4AllUsers = IsInstallForAllUsers(rhMSI);
+ sBasisInstallLocation = GetBasisInstallLocation(rhMSI);
+
+ if (NULL == sBasisInstallLocation)
+ {
+ OutputDebugStringFormat(L"BASISINSTALLLOCATION is NULL\n" );
+ return false;
+ }
+
+ MSIHANDLE hView;
+ MSIHANDLE hDatabase = MsiGetActiveDatabase(rhMSI);
+
+ QueryReg64Table(hDatabase, hView);
+ OutputDebugStringFormat(L"Do something\n" );
+ DoRegEntries( rhMSI, op, hView);
+ OutputDebugStringFormat(L"Something done\n" );
+
+ MsiCloseHandle(hView);
+ MsiCloseHandle(hDatabase);
+ free(sBasisInstallLocation);
+
+ return true;
+}
+
+extern "C" UINT __stdcall InstallReg64(MSIHANDLE hMSI)
+{
+ OutputDebugStringFormat(L"InstallReg64\n" );
+ Reg64(hMSI, SET);
+ return ERROR_SUCCESS;
+}
+
+extern "C" UINT __stdcall DeinstallReg64(MSIHANDLE hMSI)
+{
+ OutputDebugStringFormat(L"DeinstallReg64\n" );
+ Reg64(hMSI, REMOVE);
+ return ERROR_SUCCESS;
+} \ No newline at end of file
diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
index c2a70b66b761..8c64fe784e6e 100644
--- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx
+++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
@@ -51,8 +51,8 @@
// #define OWN_DEBUG_PRINT
-typedef int ( __stdcall * DllNativeRegProc ) ( int, BOOL, const char* );
-typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL );
+typedef int ( __stdcall * DllNativeRegProc ) ( int, BOOL, BOOL, const char* );
+typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL, BOOL );
BOOL UnicodeEquals( wchar_t* pStr1, wchar_t* pStr2 )
{
@@ -90,7 +90,7 @@ void WarningMessageInt( wchar_t* pWarning, unsigned int nValue )
#endif
//----------------------------------------------------------
-void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser )
+void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
{
#ifdef OWN_DEBUG_PRINT
MessageBoxW(NULL, L"RegisterActiveXNative", L"Information", MB_OK | MB_ICONINFORMATION);
@@ -112,7 +112,18 @@ void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallFor
#ifdef OWN_DEBUG_PRINT
MessageBoxA(NULL, pActiveXPath, "Library Path", MB_OK | MB_ICONINFORMATION);
#endif
- ( *pNativeProc )( nMode, InstallForAllUser, pActiveXPath );
+ int nLen = strlen( pActiveXPath );
+ int nRemoveLen = strlen( "\\so_activex.dll" );
+ if ( nLen > nRemoveLen )
+ {
+ char* pProgramPath = reinterpret_cast<char*>( malloc( nLen - nRemoveLen + 1 ) );
+ strncpy( pProgramPath, pActiveXPath, nLen - nRemoveLen );
+ pProgramPath[ nLen - nRemoveLen ] = 0;
+
+ ( *pNativeProc )( nMode, InstallForAllUser, InstallFor64Bit, pProgramPath );
+
+ free( pProgramPath );
+ }
}
FreeLibrary( hModule );
@@ -120,7 +131,7 @@ void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallFor
}
//----------------------------------------------------------
-void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser )
+void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
{
// For Win98/WinME the values should be written to the local machine
OSVERSIONINFO aVerInfo;
@@ -133,7 +144,7 @@ void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallF
{
DllNativeUnregProc pNativeProc = ( DllNativeUnregProc )GetProcAddress( hModule, "DllUnregisterServerNative" );
if( pNativeProc!=NULL )
- ( *pNativeProc )( nMode, InstallForAllUser );
+ ( *pNativeProc )( nMode, InstallForAllUser, InstallFor64Bit );
FreeLibrary( hModule );
}
@@ -162,7 +173,7 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
BOOL GetActiveXControlPath( MSIHANDLE hMSI, char** ppActiveXPath )
{
wchar_t* pProgPath = NULL;
- if ( GetMsiProp( hMSI, L"BASISINSTALLLOCATION", &pProgPath ) && pProgPath )
+ if ( GetMsiProp( hMSI, L"OFFICEINSTALLLOCATION", &pProgPath ) && pProgPath )
{
char* pCharProgPath = UnicodeToAnsiString( pProgPath );
#ifdef OWN_DEBUG_PRINT
@@ -313,6 +324,19 @@ BOOL MakeInstallForAllUsers( MSIHANDLE hMSI )
}
//----------------------------------------------------------
+BOOL MakeInstallFor64Bit( MSIHANDLE hMSI )
+{
+ BOOL bResult = FALSE;
+ wchar_t* pVal = NULL;
+ if ( GetMsiProp( hMSI, L"VersionNT64", &pVal ) && pVal )
+ {
+ bResult = TRUE;
+ free( pVal );
+ }
+
+ return bResult;
+}
+//----------------------------------------------------------
extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
{
int nOldInstallMode = 0;
@@ -333,6 +357,8 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
#endif
BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI );
+ BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
+
char* pActiveXPath = NULL;
if ( GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath
&& GetDelta( hMSI, nOldInstallMode, nInstallMode, nDeinstallMode ) )
@@ -351,10 +377,10 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
// the control is installed in the new selected configuration
if ( current_state == INSTALLSTATE_LOCAL && nDeinstallMode )
- UnregisterActiveXNative( pActiveXPath, nDeinstallMode, bInstallForAllUser );
+ UnregisterActiveXNative( pActiveXPath, nDeinstallMode, bInstallForAllUser, bInstallFor64Bit );
if ( nInstallMode )
- RegisterActiveXNative( pActiveXPath, nInstallMode, bInstallForAllUser );
+ RegisterActiveXNative( pActiveXPath, nInstallMode, bInstallForAllUser, bInstallFor64Bit );
}
else if ( current_state == INSTALLSTATE_LOCAL && future_state == INSTALLSTATE_ABSENT )
{
@@ -362,7 +388,7 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
MessageBox(NULL, L"InstallActiveXControl, removing", L"Information", MB_OK | MB_ICONINFORMATION);
#endif
if ( nOldInstallMode )
- UnregisterActiveXNative( pActiveXPath, nOldInstallMode, bInstallForAllUser );
+ UnregisterActiveXNative( pActiveXPath, nOldInstallMode, bInstallForAllUser, bInstallFor64Bit );
}
}
@@ -393,6 +419,7 @@ extern "C" UINT __stdcall DeinstallActiveXControl( MSIHANDLE hMSI )
if ( current_state == INSTALLSTATE_LOCAL && GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath )
{
BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI );
+ BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
{
UnregisterActiveXNative( pActiveXPath,
@@ -402,7 +429,8 @@ extern "C" UINT __stdcall DeinstallActiveXControl( MSIHANDLE hMSI )
| CALC_COMPONENT
| WRITER_COMPONENT
| MATH_COMPONENT,
- bInstallForAllUser );
+ bInstallForAllUser,
+ bInstallFor64Bit );
}
free( pActiveXPath );
diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
index 1fe1d2335b88..70c0d9fef1e6 100755
--- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
@@ -257,6 +257,9 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
// When there is no program folder, there could be no running office
if ( dwError == ERROR_FILE_NOT_FOUND )
return ERROR_SUCCESS;
+ if ( dwError == ERROR_PATH_NOT_FOUND )
+ return ERROR_SUCCESS;
+
// The destination folder should never exist, don't know what to do here
if ( dwError == ERROR_ALREADY_EXISTS )
return ERROR_SUCCESS;
diff --git a/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx b/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx
index 2a5d775eba5e..c6c807241c74 100644
--- a/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx
@@ -102,22 +102,95 @@ RegistryEntry InfotipHandler = { TEXT("{087B3AE3-E237-4467-B8DB-5A38AB959AC9}"),
RegistryEntry PropHandler = { TEXT("{63542C48-9552-494A-84F7-73AA6A7C99C1}"), TEXT("OpenOffice.org Property Sheet Handler") };
RegistryEntry ThumbViewer = { TEXT("{3B092F0C-7696-40E3-A80F-68D74DA84210}"), TEXT("OpenOffice.org Thumbnail Viewer") };
+BOOL GetMsiProp( MSIHANDLE hMSI, const char* pPropName, char** ppValue )
+{
+ DWORD sz = 0;
+ if ( MsiGetProperty( hMSI, pPropName, 0, &sz ) == ERROR_MORE_DATA )
+ {
+ sz++;
+ DWORD nbytes = sz * sizeof( char );
+ char* buff = reinterpret_cast<char*>( malloc( nbytes ) );
+ ZeroMemory( buff, nbytes );
+ MsiGetProperty( hMSI, pPropName, buff, &sz );
+ *ppValue = buff;
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+bool IsVersionNT64( MSIHANDLE hMSI )
+{
+ char* pVal = NULL;
+
+ if ( GetMsiProp( hMSI, "VersionNT64", &pVal ) && pVal )
+ {
+ free( pVal );
+ return true;
+ }
+
+ return false;
+}
+
+
+
+
/*
Called during installation when the module "Windows Explorer Extensions" is
selected.
*/
-extern "C" UINT __stdcall InstallExecSequenceEntry(MSIHANDLE)
+extern "C" UINT __stdcall InstallExecSequenceEntry(MSIHANDLE hMSI)
{
//MessageBox(NULL, TEXT("InstallExecSequenceEntry"), TEXT("Pythonmsi"), MB_OK | MB_ICONINFORMATION);
HKEY hKey;
- if (RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), &hKey) == ERROR_SUCCESS)
+
+
+// 06.11.2009 tkr: to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY
+// in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems.
+// Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and
+// extensions\source\activex\main\so_activex.cpp
+#ifndef KEY_WOW64_64KEY
+ #define KEY_WOW64_64KEY (0x0100)
+#endif
+
+ if (IsVersionNT64(hMSI))
{
- RegSetValueEx(hKey, ColumnHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ColumnHandler.Value), _tcslen(ColumnHandler.Value) + 1);
- RegSetValueEx(hKey, InfotipHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(InfotipHandler.Value), _tcslen(InfotipHandler.Value) + 1);
- RegSetValueEx(hKey, PropHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(PropHandler.Value), _tcslen(PropHandler.Value) + 1);
- RegSetValueEx(hKey, ThumbViewer.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ThumbViewer.Value), _tcslen(ThumbViewer.Value) + 1);
+ // Open Windows 64 Bit Registry
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"),0, KEY_WRITE | KEY_WOW64_64KEY, &hKey) == ERROR_SUCCESS)
+ {
+ RegSetValueEx(hKey, ColumnHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ColumnHandler.Value), _tcslen(ColumnHandler.Value) + 1);
+ RegSetValueEx(hKey, InfotipHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(InfotipHandler.Value), _tcslen(InfotipHandler.Value) + 1);
+ RegSetValueEx(hKey, PropHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(PropHandler.Value), _tcslen(PropHandler.Value) + 1);
+ RegSetValueEx(hKey, ThumbViewer.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ThumbViewer.Value), _tcslen(ThumbViewer.Value) + 1);
- RegCloseKey(hKey);
+ RegCloseKey(hKey);
+ }
+
+ // Open Windows 32 Bit Registry on Win64 maschine
+
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"),0, KEY_WRITE, &hKey ) == ERROR_SUCCESS)
+ {
+ RegSetValueEx(hKey, ColumnHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ColumnHandler.Value), _tcslen(ColumnHandler.Value) + 1);
+ RegSetValueEx(hKey, InfotipHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(InfotipHandler.Value), _tcslen(InfotipHandler.Value) + 1);
+ RegSetValueEx(hKey, PropHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(PropHandler.Value), _tcslen(PropHandler.Value) + 1);
+ RegSetValueEx(hKey, ThumbViewer.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ThumbViewer.Value), _tcslen(ThumbViewer.Value) + 1);
+
+ RegCloseKey(hKey);
+ }
+
+
+ } else
+ {
+ if (RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), &hKey) == ERROR_SUCCESS)
+ {
+ RegSetValueEx(hKey, ColumnHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ColumnHandler.Value), _tcslen(ColumnHandler.Value) + 1);
+ RegSetValueEx(hKey, InfotipHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(InfotipHandler.Value), _tcslen(InfotipHandler.Value) + 1);
+ RegSetValueEx(hKey, PropHandler.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(PropHandler.Value), _tcslen(PropHandler.Value) + 1);
+ RegSetValueEx(hKey, ThumbViewer.Key, 0, REG_SZ, reinterpret_cast<const BYTE*>(ThumbViewer.Value), _tcslen(ThumbViewer.Value) + 1);
+
+ RegCloseKey(hKey);
+ }
}
return ERROR_SUCCESS;
}
diff --git a/setup_native/source/win32/msi-encodinglist.txt b/setup_native/source/win32/msi-encodinglist.txt
index ad3f1fb15824..81258d61f38b 100644
--- a/setup_native/source/win32/msi-encodinglist.txt
+++ b/setup_native/source/win32/msi-encodinglist.txt
@@ -4,6 +4,8 @@ af 1252 1078 # Afrikaans
ar 1256 1025
ar-SA 1256 1025
as-IN 0 1101 # Assamese
+as 0 1101 # Assamese
+ast 1252 1610
be-BY 1251 1059 # Belarusian
bg 1251 1026 # Bulgarian
bn 0 2117 # Bengali
@@ -12,6 +14,7 @@ bn-IN 0 1093 # Bengali India
br 1252 1150 # Breton
brx 0 1603 # Bodo (India)
bs 0 5146 # bosnian
+bo 0 2121
ca 1252 1027 # Catalan
cs 1250 1029 # Czech
cy 1252 1106 # Welsh
@@ -55,12 +58,15 @@ ko 949 1042
kok 0 1111 # Konkani
ks 0 1120 # Kashmiri
ku 0 1574
+kid 1252 1033 # key id pseudo language
+ky 0 2100
lo 0 1108 # Lao
lt 1257 1063 # Lithuanian
lv 1257 1062 # Latvian
mai 0 1605 # Maithili (India)
mk 1251 1071 # Macedonian
ml-IN 0 1100
+ml 0 1100
mn 0 1104 # Mongolian
mni 0 1112 # Manipuri
mn-TR 0 2128 # Mongolian Classical/traditional
@@ -80,10 +86,13 @@ or 0 1096 # Oriya
oc 1252 1154 # Occitan-lengadocian
or-IN 0 1096
pa-IN 0 1094 # Punjabi
+pap 0 2171
+om 0 2162
pl 1250 1045
pt 1252 2070
pt-BR 1252 1046
pt-PT 1252 2070
+ps 0 2171
rm 0 1047 # Raeto-Romance
ro 1250 1048 # Romanian
ru 1251 1049
@@ -91,6 +100,7 @@ rw 0 1569 # Kinyarwanda
sa-IN 0 1103 # Sanskrit
sat 0 1606 # Santali
sb 0 1070 # Sorbian
+sc 0 3047
sd 0 1113 # Sindhi
sh 1250 2074 # Serbian Latin
sk 1250 1051 # Slovak
@@ -103,9 +113,11 @@ st 0 1072 # Southern Sotho, Sutu
sv 1252 1053
sw 1252 1089 # Swahili
sw-TZ 1252 1089 # Swahili
+si 0 2133
ta 0 1097 # Tamil
ta-IN 0 1097 # Tamil
te-IN 0 1098
+te 0 1098
tg 0 1064 # Tajik
th 874 1054
ti-ER 0 1139
@@ -117,6 +129,7 @@ uk 1251 1058 # Ukrainian
ur 1256 1056 # Urdu
ur-IN 0 2080
uz 0 1091 # Uzbek (Latin)
+ug 0 2200
ve 0 1075 # Venda
vi 1258 1066 # Vietnamese
xh 0 1076 # Xhosa
diff --git a/setup_native/tests/opensolaris/bundledextensions/send_ooo b/setup_native/tests/opensolaris/bundledextensions/send_ooo
new file mode 100644
index 000000000000..669e63ceda1b
--- /dev/null
+++ b/setup_native/tests/opensolaris/bundledextensions/send_ooo
@@ -0,0 +1,32 @@
+#! /bin/bash
+
+
+if [ $# = 0 ]
+then
+echo "usage: send_ooo path_to_pkg_folder
+
+The files
+installed,
+ooo_bundled_extension.xml,
+svc-ooo_bundled_extension
+must be in the current directory. The pkg.depotd or the service
+application/pkg/server must listen to port 80"
+
+exit
+fi
+
+
+EXTENSIONPATH=/opt/openoffice.org3/share/extension/install
+
+eval `pkgsend -s http://localhost:80 open ooo_test@3.2-1`
+pkgsend -s http://localhost:80 import $1/openofficeorg-ure
+pkgsend -s http://localhost:80 import $1/ooobasis*
+pkgsend -s http://localhost:80 import $1/openofficeorg3*
+
+pkgsend -s http://localhost:80 add file installed mode=644 owner=root group=bin path=${EXTENSIONPATH}/installed restart_fmri=svc:/application/ooo_bundled_extensions:default
+pkgsend -s http://localhost:80 add file svc-ooo_bundled_extensions mode=744 owner=root group=bin path=/lib/svc/method/svc-ooo_bundled_extensions
+pkgsend -s http://localhost:80 add file ooo_bundled_extensions.xml mode=644 owner=root group=bin path=/var/svc/manifest/application/ooo_bundled_extensions.xml restart_fmri=svc:/system/manifest-import:default
+
+pkgsend -s http://localhost:80 add set name=description value="OOo 3.2 with dictionaries: en fr es da de"
+pkgsend -s http://localhost:80 close
+