diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-08-16 11:08:32 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-08-18 21:11:16 +0300 |
commit | c6a73009747814513ab5a7277c211449c7378870 (patch) | |
tree | 2adc961b3c83deffcea251c41744f2626e476f38 /desktop | |
parent | 18041138d3169d565755565bdbabd8de596b5ac7 (diff) |
Use subfolder names from <config_folders.h>
Change all instances of hardcoded "program", "share" etc subfolder names to
use those from <config_folders.h> instead. In normal builds, the end result
will not change.
Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 5 | ||||
-rw-r--r-- | desktop/source/app/check_ext_deps.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_dependencies.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_misc.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_update.cxx | 4 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 14 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 3 |
7 files changed, 25 insertions, 13 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index b436adea9dfe..c11909f9edd9 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_folders.h> #include "sal/config.h" @@ -240,10 +241,10 @@ void removeTree(OUString const & url) { // UserInstallation can be poisoned by old junk any more. bool cleanExtensionCache() { OUString buildId( - "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}"); + "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"); rtl::Bootstrap::expandMacros(buildId); //TODO: detect failure OUString extDir( - "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap") + "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user/extensions"); rtl::Bootstrap::expandMacros(extDir); //TODO: detect failure OUString buildIdFile(extDir + "/buildid"); diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index fbaf3e1eae63..4f834d32c6f4 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_folders.h> + #include "osl/file.hxx" #include "osl/mutex.hxx" @@ -346,7 +348,7 @@ static bool impl_needsCompatCheck() { bool bNeedsCheck = false; OUString aLastCheckBuildID; - OUString aCurrentBuildID( "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ); + OUString aCurrentBuildID( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}" ); rtl::Bootstrap::expandMacros( aCurrentBuildID ); try { diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 4b50f844f7c2..817c9b4684c1 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_folders.h> + #include "sal/config.h" #include "com/sun/star/uno/Reference.hxx" @@ -60,7 +62,7 @@ OUString getLibreOfficeMajorMinorMicro() { OUString getReferenceOpenOfficeOrgMajorMinor() { OUString v( - "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version") + "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":Version:ReferenceOOoMajorMinor}"); rtl::Bootstrap::expandMacros(v); //TODO: check for failure return v; diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index dadfe234e284..2f8eb55c679c 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_folders.h> + #include "dp_misc.h" #include "dp_version.hxx" #include "dp_interact.h" @@ -68,7 +70,7 @@ namespace { struct UnoRc : public rtl::StaticWithInit< boost::shared_ptr<rtl::Bootstrap>, UnoRc> { const boost::shared_ptr<rtl::Bootstrap> operator () () { - OUString unorc( "$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("uno") ); + OUString unorc( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("uno") ); ::rtl::Bootstrap::expandMacros( unorc ); ::boost::shared_ptr< ::rtl::Bootstrap > ret( new ::rtl::Bootstrap( unorc ) ); diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 0a078fd3e499..fd4a76a8f9ea 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_folders.h> + #include "dp_update.hxx" #include "dp_version.hxx" #include "dp_identifier.hxx" @@ -215,7 +217,7 @@ bool onlyBundledExtensions( OUString getExtensionDefaultUpdateURL() { OUString sUrl( - "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version") + "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":Version:ExtensionUpdateURL}"); ::rtl::Bootstrap::expandMacros(sUrl); return sUrl; diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index db958cbe831f..5d7e8c0b38a0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <config_folders.h> + #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -260,12 +262,12 @@ initialize_uno( const OUString &aAppURL ) rtl::Bootstrap::setIniFilename( aAppURL + "/fundamentalrc" ); rtl::Bootstrap::set( "CONFIGURATION_LAYERS", - "xcsxcu:${BRAND_BASE_DIR}/share/registry " - "res:${BRAND_BASE_DIR}/share/registry " -// "bundledext:${${BRAND_BASE_DIR}/program/unorc:BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " ); -// "sharedext:${${BRAND_BASE_DIR}/program/unorc:SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " -// "userext:${${BRAND_BASE_DIR}/program/unorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " -// "user:${$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}/user/registrymodifications.xcu" + "xcsxcu:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry " + "res:${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/registry " +// "bundledext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/unorc:BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " ); +// "sharedext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/unorc:SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " +// "userext:${${BRAND_BASE_DIR}/" LIBO_ETC_FOLDER "/unorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " +// "user:${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/bootstraprc:UserInstallation}/user/registrymodifications.xcu" ); xContext = cppu::defaultBootstrap_InitialComponentContext(); diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index d79161eb8d89..2a72df64d377 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_folders.h> #include "deployment.hrc" #include "unopkg_shared.h" @@ -421,7 +422,7 @@ Reference<XComponentContext> connectToOffice( OUString getLockFilePath() { OUString ret; - OUString sBootstrap("${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}"); + OUString sBootstrap("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}"); rtl::Bootstrap::expandMacros(sBootstrap); OUString sAbs; if (::osl::File::E_None == ::osl::File::getAbsoluteFileURL( |