summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configmgr/source/inc/bootstrap.hxx1
-rw-r--r--configmgr/source/misc/bootstrap.cxx23
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx7
-rw-r--r--desktop/win32/source/extendloaderenvironment.cxx9
-rw-r--r--shell/source/win32/simplemail/smplmailclient.cxx12
5 files changed, 22 insertions, 30 deletions
diff --git a/configmgr/source/inc/bootstrap.hxx b/configmgr/source/inc/bootstrap.hxx
index 5ffb2cb97756..5a9ade491ee7 100644
--- a/configmgr/source/inc/bootstrap.hxx
+++ b/configmgr/source/inc/bootstrap.hxx
@@ -34,7 +34,6 @@
#include "bootstrapcontext.hxx"
// ---------------------------------------------------------------------------------------
-#define CONFIGMGR_INIFILE SAL_CONFIGFILE("configmgr")
#define BOOTSTRAP_ITEM_INIFILE "CFG_INIFILE"
// ---------------------------------------------------------------------------------------
// standard settings
diff --git a/configmgr/source/misc/bootstrap.cxx b/configmgr/source/misc/bootstrap.cxx
index 809d992c5ec4..4e747153d32c 100644
--- a/configmgr/source/misc/bootstrap.cxx
+++ b/configmgr/source/misc/bootstrap.cxx
@@ -47,7 +47,6 @@
#include <rtl/ustrbuf.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
-#include <osl/module.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/configuration/MissingBootstrapFileException.hpp>
@@ -238,27 +237,15 @@ void BootstrapContext::initialize()
ComponentContext::initialize(sURL);
}
-// ---------------------------------------------------------------------------
-
-static rtl::OUString getCurrentModuleDirectory() // URL including terminating slash
-{
- rtl::OUString aFileURL;
- if ( !osl::Module::getUrlFromAddress(reinterpret_cast< oslGenericFunction >( &getCurrentModuleDirectory ),aFileURL) )
- {
- OSL_TRACE(false, "Cannot locate current module - using executable instead");
-
- OSL_VERIFY(osl_Process_E_None == osl_getExecutableFile(&aFileURL.pData));
- }
-
- OSL_ENSURE(0 < aFileURL.lastIndexOf('/'), "Cannot find directory for module URL");
-
- return aFileURL.copy(0, aFileURL.lastIndexOf('/') + 1);
-}
// ---------------------------------------------------------------------------------------
rtl::OUString BootstrapContext::getDefaultConfigurationBootstrapURL()
{
- return getCurrentModuleDirectory() + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CONFIGMGR_INIFILE));
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$OOO_BASE_DIR/program/" SAL_CONFIGFILE("configmgr")));
+ rtl::Bootstrap::expandMacros(url); //TODO: detect failure
+ return url;
}
// ---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx
index 8c03770afd80..ee983a005920 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx
@@ -130,7 +130,12 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists)
nsCOMPtr<nsILocalFile> binDir;
// Note: if path3 construction fails, mozilla will default to using MOZILLA_FIVE_HOME in the NS_InitXPCOM2()
rtl::OUString path1(
- RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/program"));
+#if defined WNT
+ RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")
+#else
+ RTL_CONSTASCII_USTRINGPARAM("$OOO_BASE_DIR/program")
+#endif
+ );
rtl::Bootstrap::expandMacros(path1);
rtl::OString path2;
if ((osl::FileBase::getSystemPathFromFileURL(path1, path1) ==
diff --git a/desktop/win32/source/extendloaderenvironment.cxx b/desktop/win32/source/extendloaderenvironment.cxx
index 4c8ae784acf7..e5b33f5aa2be 100644
--- a/desktop/win32/source/extendloaderenvironment.cxx
+++ b/desktop/win32/source/extendloaderenvironment.cxx
@@ -135,18 +135,21 @@ void extendLoaderEnvironment(WCHAR * binPath, WCHAR * iniDirectory) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
fail();
}
+ // This path is only taken by testtool.exe in basis program directory;
+ // its PATH needs to include the brand program directory:
pathEnd = tools::buildPath(
path, iniDirectory, iniDirEnd, MY_STRING(L".."));
if (pathEnd == NULL) {
fail();
}
- exclude1 = true;
- } else {
- padEnd = tools::buildPath(pad, path, pathEnd, MY_STRING(L"\\program"));
+ padEnd = tools::buildPath(
+ pad, path, pathEnd, MY_STRING(L"\\..\\program"));
if (padEnd == NULL) {
fail();
}
exclude1 = contains(env, pad, padEnd);
+ } else {
+ exclude1 = true;
}
WCHAR * pad2 = exclude1 ? pad : padEnd + 1;
pathEnd = tools::buildPath(path, path, pathEnd, MY_STRING(L"\\ure-link"));
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx
index acb113450e7f..82968b747d95 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -32,7 +32,7 @@
#include "precompiled_shell.hxx"
#include <osl/diagnose.h>
#include <osl/process.h>
-#include <osl/module.hxx>
+#include <rtl/bootstrap.hxx>
#include "smplmailclient.hxx"
#include "smplmailmsg.hxx"
#include <com/sun/star/system/SimpleMailClientFlags.hpp>
@@ -112,12 +112,10 @@ namespace /* private */
if (senddocUrl.getLength() == 0)
{
- rtl::OUString baseUrl;
- if (!osl::Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(getSenddocUrl), baseUrl))
- return rtl::OUString();
-
- senddocUrl = baseUrl.copy(0, baseUrl.lastIndexOf('/') + 1);
- senddocUrl += rtl::OUString::createFromAscii("senddoc.exe");
+ senddocUrl = rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$OOO_BASE_DIR/program/senddoc.exe"));
+ rtl::Bootstrap::expandMacros(senddocUrl); //TODO: detect failure
}
return senddocUrl;
}