[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - scp2/source setup_native/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Sat Jan 11 15:20:41 UTC 2020


 scp2/source/spsupp/module_spsupp.scp                          |   19 +++++++---
 setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx |    9 ++++
 2 files changed, 24 insertions(+), 4 deletions(-)

New commits:
commit 91d692aef10c57bfa3c64ca7ea3ab57601d08e25
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Jan 11 13:32:00 2020 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Jan 11 16:20:23 2020 +0100

    Use registry key to track installed state of gm_SharePointSupport_SubstMSO
    
    Without that, after initial installation, the state of the feature is
    undefined, and following uninstallation can't define that it needs to
    be uninstalled, unregistering SharePoint.OpenDocuments class.
    
    Change-Id: Ib7455833fb397c332735eb4c8ab63f763b4e469b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86598
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 01fa2b022e4d5b7392b02181d9bb9bfc76272d62)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86601
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/scp2/source/spsupp/module_spsupp.scp b/scp2/source/spsupp/module_spsupp.scp
index b97a84a699d5..ba1ec4602028 100644
--- a/scp2/source/spsupp/module_spsupp.scp
+++ b/scp2/source/spsupp/module_spsupp.scp
@@ -23,10 +23,10 @@ Module gid_Module_Optional_SharePointSupport
 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
+ * This is a feature with a single registry item, 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 a non-0 value below INSTALLLEVEL, or a command line like
  *
  *     msiexec.exe /i path-to-msi ADDLOCAL=gm_SharePointSupport_SubstMSO
  */
@@ -40,5 +40,16 @@ Module gid_Module_SharePointSupport_SubstMSO
     Styles = (HIDDEN_ROOT);
 End
 
+/*
+ * Create a component for the feature, with key path in registry, to track feature installed state
+ */
+RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_SharePointSupport_SubstMSO_Registered
+    ModuleID = gid_Module_SharePointSupport_SubstMSO;
+    ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
+    Subkey = "Software\%MANUFACTURER\%PRODUCTNAME\%PRODUCTVERSION\SharePointSupport\SubstMSO";
+    Name = "Registered";
+    Value = "1";
+End
+
 #endif
 
commit 0eecbbf72701a82747e68e85f7c2a93fba8aceea
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Jan 10 14:51:05 2020 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Jan 11 16:20:10 2020 +0100

    Improve logging of feature states
    
    Change-Id: I8b304bbefe861abd7503204f0ae8efb0aea203ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86528
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 2bb064943444cd5bac155ad367378b674bceb11a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86545
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx b/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx
index 250a81bd0fa0..c2840eeccaf1 100644
--- a/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx
+++ b/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx
@@ -236,12 +236,21 @@ extern "C" __declspec(dllexport) UINT __stdcall PrepRegUnregDLLs(MSIHANDLE hInst
         CheckWin32Error("MsiGetFeatureStateW",
                         MsiGetFeatureStateW(hInstall, L"gm_SharePointSupport_SubstMSO",
                                             &current_state_SubstMSO, &future_state_SubstMSO));
+
+        WriteLog(hInstall, "gm_SharePointSupport_SubstMSO state:", //
+                 "current", std::to_string(current_state_SubstMSO), //
+                 "future", std::to_string(future_state_SubstMSO)); //
+
         INSTALLSTATE current_state_Main;
         INSTALLSTATE future_state_Main;
         CheckWin32Error("MsiGetFeatureStateW",
                         MsiGetFeatureStateW(hInstall, L"gm_o_SharePointSupport",
                                             &current_state_Main, &future_state_Main));
 
+        WriteLog(hInstall, "gm_o_SharePointSupport state:", //
+                 "current", std::to_string(current_state_Main), //
+                 "future", std::to_string(future_state_Main)); //
+
         const bool bUnregSubstMSO = current_state_SubstMSO == INSTALLSTATE_LOCAL
                                     && future_state_SubstMSO == INSTALLSTATE_ABSENT;
         const bool bUnregMain


More information about the Libreoffice-commits mailing list