summaryrefslogtreecommitdiff
path: root/scp2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-05-22 19:17:44 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-01-09 07:23:48 +0100
commitf480617ca3a4869c9afd4d3d68f8057a6067d489 (patch)
treea476f4630c2194596ebfa1d5a449672a002a8ed2 /scp2
parentd9fe1a661c6a76f0b122c82edf73ec9efbdff349 (diff)
Register spsupp*.dll during installation
This registers SharePoint integration libraries using regsvr.exe. Both 32-bit and 64-bit libraries are registered; registration of LOSPSupport.OpenDocuments is unconditional. This introduces a new hidden MSI feature, which is disabled for installation: gm_SharePointSupport_SubstMSO. When installed, it registers SharePoint.OpenDocuments class in registry, thus overriding registration of this component by MS Office, allowing LibreOffice to serve as MS Office replacement working in IE with SharePoint. To install the feature, either a transform is needed setting the feature's level <= 100, or a command line: msiexec path-to-msi ADDLOCAL=gm_SharePointSupport_SubstMSO Change-Id: I5517bbb68dcc6db8bcb2bbc2368394ee4a62d741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86452 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'scp2')
-rw-r--r--scp2/source/ooo/windowscustomaction_ooo.scp41
-rw-r--r--scp2/source/spsupp/module_spsupp.scp18
2 files changed, 59 insertions, 0 deletions
diff --git a/scp2/source/ooo/windowscustomaction_ooo.scp b/scp2/source/ooo/windowscustomaction_ooo.scp
index bc7201b9b2b4..116b437b1ed3 100644
--- a/scp2/source/ooo/windowscustomaction_ooo.scp
+++ b/scp2/source/ooo/windowscustomaction_ooo.scp
@@ -221,3 +221,44 @@ WindowsCustomAction gid_Customaction_RegisterSomeExtensions
End
#endif /* HAVE_WINDOWS_SDK */
+
+/* Deferred not-impersonated actions that will call regsvr32 to (un)register DLLs.
+ * Custom action type 1 (msidbCustomActionTypeDll + msidbCustomActionTypeBinaryData)
+ * + 64 (msidbCustomActionTypeContinue) + 1024 (msidbCustomActionTypeInScript)
+ * + 2048 (msidbCustomActionTypeNoImpersonate).
+ * Since deferred actions don't have access to current DB, the actions depend on
+ * immediate-executed action prep_reg_unreg_dlls (see below) that precedes it, and
+ * sets this action's CustomActionData property.
+ */
+
+WindowsCustomAction gid_Customaction_reg_dlls
+ Name = "reg_dlls";
+ Typ = "3137";
+ Source = "reg_dlls.dll";
+ Target = "RegDLLs";
+ Inbinarytable = 1;
+ Assignment1 = ("InstallExecuteSequence", "reg_dlls", "InstallFinalize");
+End
+
+WindowsCustomAction gid_Customaction_unreg_dlls
+ Name = "unreg_dlls";
+ Typ = "3137";
+ Source = "reg_dlls.dll";
+ Target = "UnregDLLs";
+ Inbinarytable = 1;
+ Assignment1 = ("InstallExecuteSequence", "unreg_dlls", "UnpublishComponents");
+End
+
+/* Immediately-executed action that adds registration command lines for spsupp_x*.dll
+ * to "[un]reg_dlls" properties.
+ * Custom action type 1 (msidbCustomActionTypeDll + msidbCustomActionTypeBinaryData)
+ * + 64 (msidbCustomActionTypeContinue).
+ */
+WindowsCustomAction gid_Customaction_prep_reg_dlls
+ Name = "prep_reg_unreg_dlls";
+ Typ = "65";
+ Source = "reg_dlls.dll";
+ Target = "PrepRegUnregDLLs";
+ Inbinarytable = 1;
+ Assignment1 = ("InstallExecuteSequence", "", "behind_CostFinalize");
+End
diff --git a/scp2/source/spsupp/module_spsupp.scp b/scp2/source/spsupp/module_spsupp.scp
index 39c547a5fa5c..b97a84a699d5 100644
--- a/scp2/source/spsupp/module_spsupp.scp
+++ b/scp2/source/spsupp/module_spsupp.scp
@@ -22,5 +22,23 @@ Module gid_Module_Optional_SharePointSupport
Files = (auto_spsuppfiles_ALL);
End
+/*
+ * This is an *empty* feature disabled by default, that controls custom action registering
+ * SharePoint.OpenDocuments class, which replaces registration of that class from MSO.
+ * It is disabled to allow co-existing with MS Office. To install, a transform must be
+ * used that would set its level to non-0 value, or a command line like
+ *
+ * msiexec.exe /i path-to-msi ADDLOCAL=gm_SharePointSupport_SubstMSO
+ */
+Module gid_Module_SharePointSupport_SubstMSO
+ ParentID = gid_Module_Optional_SharePointSupport;
+ Name = "gid_Module_SharePointSupport_SubstMSO";
+ Description = "Registration of SharePoint.OpenDocuments class";
+ Sortkey = "1305";
+ Default = NO;
+ Independent = YES;
+ Styles = (HIDDEN_ROOT);
+End
+
#endif