CWS-TOOLING: integrate CWS sb110
2009-08-05 15:28:43 +0200 sb r274677 : CWS-TOOLING: rebase CWS sb110 to trunk@274622 (milestone: DEV300:m54) 2009-08-05 11:46:36 +0200 sb r274646 : #i104018# fixed previous svn changeset 271712 (from issue 101244) 2009-07-20 14:41:56 +0200 sb r274138 : CWS-TOOLING: rebase CWS sb110 to trunk@273858 (milestone: DEV300:m52) 2009-06-02 11:42:17 +0200 sb r272489 : CWS-TOOLING: rebase CWS sb110 to trunk@272291 (milestone: DEV300:m49) 2009-05-08 12:46:51 +0200 sb r271712 : #i101244# after DLLs have been moved from basis to brand layer on Windows, code that used SvtPathOptions::GetModulePath to located libraries had to be adapted 2009-05-08 10:10:43 +0200 sb r271703 : #i101244# for performance reasons, on Windows move DLLs from basis to brand layer (i.e., next to executables); consequently eliminated some library duplications across the layers; adapted various code to the move 2009-05-08 09:54:44 +0200 sb r271702 : #i101244# hardwire Python dynamic libraries and script files into base layer (even if other dynamic libraries will move to brand layer on Windows), mainly because the pyuno dynamic library is both linked against from other dynamic libraries (pythonloader.uno) and accessed via "import pyuno" from Python scripts 2009-05-07 17:18:30 +0200 sb r271686 : #i101244# support NativeServicesURLPrefix on individual files; to implement that, changed meaning of global unomaxservices 2009-05-07 17:15:24 +0200 sb r271685 : #i101244# take legacy_binfilters.rdb explicitly from $OOO_BASE_DIR/program (instead of implicitly next to some dynamic library); cleaned up dead code 2009-05-07 17:12:12 +0200 sb r271684 : #i101244# take senddoc.exe explicitly from $OOO_BASE_DIR/program (instead of implicitly next to some dynamic library) 2009-05-07 17:11:33 +0200 sb r271683 : #i101244# take odbcconfig.exe explicitly from $OOO_BASE_DIR/program (instead of implicitly next to some dynamic library) 2009-05-07 17:09:44 +0200 sb r271682 : #i101244# read configmgr ini file explicitly from $OOO_BASE_DIR/program (instead of next to configmgr dynamic library)
This commit is contained in:
parent
91ea2262f7
commit
8a06f2b535
5 changed files with 22 additions and 30 deletions
|
@ -34,7 +34,6 @@
|
|||
#include "bootstrapcontext.hxx"
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
#define CONFIGMGR_INIFILE SAL_CONFIGFILE("configmgr")
|
||||
#define BOOTSTRAP_ITEM_INIFILE "CFG_INIFILE"
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// standard settings
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -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) ==
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue