diff options
-rw-r--r-- | i18npool/source/languagetag/languagetag.cxx | 29 | ||||
-rw-r--r-- | liblangtag/ExternalPackage_langtag_data.mk | 6 | ||||
-rw-r--r-- | shell/CustomTarget_shlxthdl_res.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 2 |
4 files changed, 17 insertions, 22 deletions
diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 7f3c15e77d3a..8ec730c292ec 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -123,24 +123,19 @@ void LiblantagDataRef::presetDataPath( const rtl::OUString& rPath ) void LiblantagDataRef::setupDataPath() { // maDataPath is assumed to be empty here. - OUString aURL; - - if (!rtl::Bootstrap::get("BRAND_BASE_DIR", aURL) && !rtl::Bootstrap::get("LIBLANGTAG_SHARE", aURL)) - OSL_FAIL( "LiblantagDataRef: can't get BRAND_BASE_DIR"); - else + OUString aURL("$BRAND_BASE_DIR/share/liblangtag"); + rtl::Bootstrap::expandMacros(aURL); //TODO: detect failure + + // Check if data is in our own installation, else assume system + // installation. + OUString aData( aURL); + aData += "/language-subtag-registry.xml"; + osl::DirectoryItem aDirItem; + if (osl::DirectoryItem::get( aData, aDirItem) == osl::DirectoryItem::E_None) { - // Check if data is in our own installation, else assume system - // installation. - aURL += "/share/liblangtag"; - OUString aData( aURL); - aData += "/language-subtag-registry.xml"; - osl::DirectoryItem aDirItem; - if (osl::DirectoryItem::get( aData, aDirItem) == osl::DirectoryItem::E_None) - { - OUString aPath; - if (osl::FileBase::getSystemPathFromFileURL( aURL, aPath) == osl::FileBase::E_None) - maDataPath = OUStringToOString( aPath, RTL_TEXTENCODING_UTF8); - } + OUString aPath; + if (osl::FileBase::getSystemPathFromFileURL( aURL, aPath) == osl::FileBase::E_None) + maDataPath = OUStringToOString( aPath, RTL_TEXTENCODING_UTF8); } if (maDataPath.isEmpty()) maDataPath = "|"; // assume system diff --git a/liblangtag/ExternalPackage_langtag_data.mk b/liblangtag/ExternalPackage_langtag_data.mk index 4b9fb2516235..f238a2450967 100644 --- a/liblangtag/ExternalPackage_langtag_data.mk +++ b/liblangtag/ExternalPackage_langtag_data.mk @@ -27,8 +27,8 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,langtag_data,langtag)) -$(eval $(call gb_ExternalPackage_add_files,langtag_data,share/liblangtag,data/language-subtag-registry.xml)) -$(eval $(call gb_ExternalPackage_add_files,langtag_data,share/liblangtag/common/bcp47,\ +$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/installation/share/liblangtag,data/language-subtag-registry.xml)) +$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/installation/share/liblangtag/common/bcp47,\ data/common/bcp47/calendar.xml \ data/common/bcp47/collation.xml \ data/common/bcp47/currency.xml \ @@ -41,6 +41,6 @@ $(eval $(call gb_ExternalPackage_add_files,langtag_data,share/liblangtag/common/ data/common/bcp47/transform_private_use.xml \ data/common/bcp47/variant.xml \ )) -$(eval $(call gb_ExternalPackage_add_files,langtag_data,share/liblangtag/common/supplemental,data/common/supplemental/likelySubtags.xml)) +$(eval $(call gb_ExternalPackage_add_files,langtag_data,unittest/installation/share/liblangtag/common/supplemental,data/common/supplemental/likelySubtags.xml)) # vim: set shiftwidth=4 tabstop=4 noexpandtab: diff --git a/shell/CustomTarget_shlxthdl_res.mk b/shell/CustomTarget_shlxthdl_res.mk index 78f6d32054ec..92b61854257d 100644 --- a/shell/CustomTarget_shlxthdl_res.mk +++ b/shell/CustomTarget_shlxthdl_res.mk @@ -42,7 +42,7 @@ $(call gb_CustomTarget_get_workdir,shell/source/win32/shlxthandler/res)/shlxthdl $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),LCX,1) $(call gb_Helper_abbreviate_dirs,\ cd $(SRCDIR)/shell/source/win32/shlxthandler/res && \ - LIBLANGTAG_SHARE=$(call gb_Helper_make_url,$(OUTDIR)) \ + BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/installation) \ $(call gb_Executable_get_target_for_build,lngconvex) \ -ulf shlxthdl.ulf \ -rc $@ \ diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 0f81a4dea1d8..2d8adad0e3d1 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -59,7 +59,7 @@ gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filen define gb_CppunitTest__make_args --headless \ -"-env:LIBLANGTAG_SHARE=$(call gb_Helper_make_url,$(OUTDIR))" \ +"-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/installation)" \ $(if $(URE),\ $(if $(strip $(CONFIGURATION_LAYERS)),\ "-env:CONFIGURATION_LAYERS=$(strip $(CONFIGURATION_LAYERS))") \ |