Kaydet (Commit) d7180aea authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Andras Timar

Generalize CONFIGURATION_LAYERS "winreg:" notation

...after 097292fe "Add HKEY_CURRENT_USER
registry integration" added "winuserreg:".

Even though changing from the exisiting "winreg:" to "winreg:LOCAL_MACHINE"
should be compatible, as it only ends up in fundamental.ini included in the LO
inst set, play it safe it keep treating "winreg" the same as
"winreg:LOCAL_MACHINE".

("url" is a misnomer now in configmgr's Components ctor, and should eventually
be renamed to something more accurate.)

Reviewed-on: https://gerrit.libreoffice.org/17891Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>

(cherry picked from commit 53e3fb1d, including
fixes for the apparently inadvertent differences between
097292fe "Add HKEY_CURRENT_USER registry
integration" and its unfaithful backport
1b8812e7 "tdf#93546 -Add HKEY_CURRENT_USER
registry integration")
Conflicts:
	configmgr/source/components.cxx
	instsetoo_native/CustomTarget_setup.mk
	scp2/source/ooo/common_brand.scp

Change-Id: Ifbcf3284d904490891642599468470d03547f92a
Reviewed-on: https://gerrit.libreoffice.org/17905Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 4363606f
...@@ -532,18 +532,19 @@ Components::Components( ...@@ -532,18 +532,19 @@ Components::Components(
modificationFileUrl_ = url; modificationFileUrl_ = url;
parseModificationLayer(url); parseModificationLayer(url);
} }
#ifdef WNT #if defined WNT
else if (type == "winreg" || type == "winuserreg") else if (type == "winreg") {
{ WinRegType eType;
if (!url.isEmpty()) { if (url == "LOCAL_MACHINE" || url.isEmpty()/*backwards comp.*/) {
SAL_WARN( eType = WinRegType::LOCAL_MACHINE;
"configmgr", } else if (url == "CURRENT_USER") {
"winreg URL is not empty, URL handling is not implemented for winreg"); eType = WinRegType::CURRENT_USER;
} else {
throw css::uno::RuntimeException(
"CONFIGURATION_LAYERS: unknown \"winreg\" kind \"" + url
+ "\"");
} }
OUString aTempFileURL; OUString aTempFileURL;
WinRegType eType = WinRegType::LOCAL_MACHINE;
if (type == "winuserreg")
eType = WinRegType::CURRENT_USER;
if (dumpWindowsRegistry(&aTempFileURL, eType)) { if (dumpWindowsRegistry(&aTempFileURL, eType)) {
parseFileLeniently(&parseXcuFile, aTempFileURL, layer, data_, 0, 0, 0); parseFileLeniently(&parseXcuFile, aTempFileURL, layer, data_, 0, 0, 0);
layer++; layer++;
......
...@@ -52,7 +52,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_ ...@@ -52,7 +52,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'BRAND_BASE_DIR=$${ORIGIN}/..' \ && echo 'BRAND_BASE_DIR=$${ORIGIN}/..' \
&& echo 'BRAND_INI_DIR=$${ORIGIN}' \ && echo 'BRAND_INI_DIR=$${ORIGIN}' \
&& echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \ && echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
&& echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu' \ && echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry $(if $(filter WNT,$(OS)),winreg:LOCAL_MACHINE )bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini $(if $(filter WNT,$(OS)),winreg:CURRENT_USER )user:$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu' \
&& echo 'LO_JAVA_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)' \ && echo 'LO_JAVA_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)' \
&& echo 'LO_LIB_DIR=$${BRAND_BASE_DIR}/$(LIBO_LIB_FOLDER)' \ && echo 'LO_LIB_DIR=$${BRAND_BASE_DIR}/$(LIBO_LIB_FOLDER)' \
&& echo 'BAK_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \ && echo 'BAK_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \
......
...@@ -1117,17 +1117,21 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Ure_Bin_Dir ...@@ -1117,17 +1117,21 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Ure_Bin_Dir
Value = "${BRAND_BASE_DIR}/" LIBO_URE_BIN_FOLDER; Value = "${BRAND_BASE_DIR}/" LIBO_URE_BIN_FOLDER;
End End
#if defined WNT
#define CONFIGURATION_LAYERS_WINREG " winreg:LOCAL_MACHINE"
#define CONFIGURATION_LAYERS_WINUSERREG " winreg:CURRENT_USER"
#else
#define CONFIGURATION_LAYERS_WINREG
#define CONFIGURATION_LAYERS_WINUSERREG
#endif
ProfileItem gid_Brand_Profileitem_Fundamental_Configuration_Layers ProfileItem gid_Brand_Profileitem_Fundamental_Configuration_Layers
ProfileID = gid_Brand_Profile_Fundamental_Ini; ProfileID = gid_Brand_Profile_Fundamental_Ini;
ModuleID = gid_Module_Root_Brand; ModuleID = gid_Module_Root_Brand;
Section = "Bootstrap"; Section = "Bootstrap";
Key = "CONFIGURATION_LAYERS"; Key = "CONFIGURATION_LAYERS";
#if defined WNT Value = "xcsxcu:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry res:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry" CONFIGURATION_LAYERS_WINREG " bundledext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " CONFIGURATION_LAYERS_WINUSERREG " user:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/user/registrymodifications.xcu";
Value = "xcsxcu:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry winreg: winuserreg: res:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry bundledext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/user/registrymodifications.xcu";
#else
Value = "xcsxcu:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry res:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry bundledext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini userext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/" PROFILENAME(louno) ":UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/user/registrymodifications.xcu";
#endif
End End
#undef CONFIGURATION_LAYERS_WINREG
#if !defined MACOSX #if !defined MACOSX
ProfileItem gid_Brand_Profileitem_Redirect_Ure_Bootstrap ProfileItem gid_Brand_Profileitem_Redirect_Ure_Bootstrap
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment