summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-30 13:32:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-30 13:47:11 +0100
commit53927349241643abc2a083f1983c46ec793e6ff1 (patch)
tree36728b60343a0c8fe95710ac52887c5390974005 /vcl
parentd3c72662488cd2fad1876e8f4c17d54f26245a7a (diff)
Setting env vars in aqua's InitSalMain should long be unnecessary
...see the comment at the start of InitSalMain in 95548c7b5ad2b388f077bf9bf2031ac5f6121d0e "Implemented InitSalMain() and DeInitSalMain() functions" for why this was relevant back in 2001. Change-Id: I2b2e5f261065d3b801ef20cca592009fa6b3f558
Diffstat (limited to 'vcl')
-rw-r--r--vcl/aqua/source/app/salinst.cxx48
1 files changed, 0 insertions, 48 deletions
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index cb715cad6e09..7c3009fc18f4 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -20,8 +20,6 @@
#include <stdio.h>
-#include "tools/fsys.hxx"
-#include "tools/getprocessworkingdir.hxx"
#include <tools/solarmutex.hxx>
#include "osl/process.h"
@@ -295,52 +293,6 @@ extern "C" {
void InitSalMain()
{
- rtl::OUString urlWorkDir;
- rtl_uString *sysWorkDir = NULL;
- if (tools::getProcessWorkingDir(urlWorkDir))
- {
- oslFileError err2 = osl_getSystemPathFromFileURL(urlWorkDir.pData, &sysWorkDir);
- if (err2 == osl_File_E_None)
- {
- rtl::OString aPath( getenv( "PATH" ) );
- rtl::OString aResPath( getenv( "STAR_RESOURCEPATH" ) );
- rtl::OString aLibPath( getenv( "DYLD_LIBRARY_PATH" ) );
- rtl::OString aCmdPath( OUStringToOString(OUString(sysWorkDir), RTL_TEXTENCODING_UTF8).getStr() );
- // Get absolute path of command's directory
- if ( !aCmdPath.isEmpty() ) {
- DirEntry aCmdDirEntry( aCmdPath );
- aCmdDirEntry.ToAbs();
- aCmdPath = rtl::OUStringToOString( aCmdDirEntry.GetPath().GetFull(), RTL_TEXTENCODING_ASCII_US );
- }
- // Assign to PATH environment variable
- if ( !aCmdPath.isEmpty() )
- {
- rtl::OString aTmpPath( aCmdPath );
- if ( !aPath.isEmpty() )
- aTmpPath += rtl::OUStringToOString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
- aTmpPath += aPath;
- setenv( "PATH", aTmpPath.getStr(), 1 );
- }
- // Assign to STAR_RESOURCEPATH environment variable
- if ( !aCmdPath.isEmpty() )
- {
- rtl::OString aTmpPath( aCmdPath );
- if ( !aResPath.isEmpty() )
- aTmpPath += rtl::OUStringToOString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
- aTmpPath += aResPath;
- setenv( "STAR_RESOURCEPATH", aTmpPath.getStr(), 1 );
- }
- // Assign to DYLD_LIBRARY_PATH environment variable
- if ( !aCmdPath.isEmpty() )
- {
- rtl::OString aTmpPath( aCmdPath );
- if ( !aLibPath.isEmpty() )
- aTmpPath += rtl::OUStringToOString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
- aTmpPath += aLibPath;
- setenv( "DYLD_LIBRARY_PATH", aTmpPath.getStr(), 1 );
- }
- }
- }
}
// -----------------------------------------------------------------------