[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 2 commits - desktop/source pyuno/zipcore vcl/unx
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Fri Jun 22 03:16:30 PDT 2012
desktop/source/app/cmdlineargs.cxx | 3 +++
pyuno/zipcore/python.sh | 9 +++++----
vcl/unx/generic/app/sm.cxx | 8 ++++----
3 files changed, 12 insertions(+), 8 deletions(-)
New commits:
commit b4ba164264de30735941bfbb87f36ec5ca81ea36
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 22 11:57:12 2012 +0200
fdo#50682: Setting DYLD_LIBRARY_PATH in python script appears unnecessary
...and apparently has negative consequences (system CFNetwork framework picking
up LO libsqlite3.dylib instead of system one, as DYLD_LIBRARY_PATH overrides
recorded installnames).
Contrary to the old comment ("so that 'import pyuno' finds libpyuno.so"), what
setting LD_LIBRARY_PATH on Linux is still necessary for is so that python.bin
(a stripped version of the python executable from external python module) finds
libpython2.6.so, as it lacks an RPATH. ('import pyuno' finds pyuno.so
apparently on PYTHONPATH, anyway, and pyuno.so in turn dlopen's
libpython.{dylib,so} with full path.)
(This might make dc82cf021f76ea83ff7a4bcb2d7525f2e111f0cc "Make PyUNO work
--with-macox-version-min-required=10.6" irrelevant.)
Change-Id: I1c3a6c61d4cc976d85956e587497a13a77689128
(cherry picked from commit a164d246f2ed941fbdef19ec5b47dac1bab25509)
diff --git a/pyuno/zipcore/python.sh b/pyuno/zipcore/python.sh
index 22edea8..6626e3e 100644
--- a/pyuno/zipcore/python.sh
+++ b/pyuno/zipcore/python.sh
@@ -43,10 +43,6 @@ cd "$sd_cwd"
PATH=$sd_prog${PATH+:$PATH}
export PATH
-# Set %%OOO_LIBRARY_PATH_VAR%% so that "import pyuno" finds libpyuno.so:
-%%OOO_LIBRARY_PATH_VAR%%=$sd_prog:$sd_prog/../ure-link/lib${%%OOO_LIBRARY_PATH_VAR%%:+:$%%OOO_LIBRARY_PATH_VAR%%}
-export %%OOO_LIBRARY_PATH_VAR%%
-
# Set UNO_PATH so that "officehelper.bootstrap()" can find soffice executable:
: ${UNO_PATH=$sd_prog}
export UNO_PATH
@@ -57,6 +53,11 @@ export UNO_PATH
export URE_BOOTSTRAP
NONMACSECTION
+# Set %%OOO_LIBRARY_PATH_VAR%% so that python.bin finds libpython2.6.so (this
+# can go once python.bin contains a proper RPATH):
+%%OOO_LIBRARY_PATH_VAR%%=$sd_prog${%%OOO_LIBRARY_PATH_VAR%%:+:$%%OOO_LIBRARY_PATH_VAR%%}
+export %%OOO_LIBRARY_PATH_VAR%%
+
PYTHONPATH=$sd_prog:$sd_prog/python-core-%%PYVERSION%%/lib:$sd_prog/python-core-%%PYVERSION%%/lib/lib-dynload:$sd_prog/python-core-%%PYVERSION%%/lib/lib-tk:$sd_prog/python-core-%%PYVERSION%%/lib/site-packages${PYTHONPATH+:$PYTHONPATH}
export PYTHONPATH
PYTHONHOME=$sd_prog/python-core-%%PYVERSION%%
commit 83422f88d79272e6429e148b7d383b3fc84be443
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 21 13:20:22 2012 +0200
Fix X Session Management support
...passing -session= into soffice was no longer supported.
The way I tested this with Gnome 3.4 (Fedora 17) is with:
* Run gnome-session-properties to select "Options - Automatically remember
running applications when logging out"
* Create ~/.local/share/applications/lodev.desktop:
[Desktop Entry]
Exec=.../core/solver/unxlngx6/installation/opt/program/soffice
Icon=libreoffice-startcenter
Name=LOdev
Type=Application
* Run "startx /usr/bin/gnome-session -- /usr/bin/Xephyr :1"
Change-Id: Id8a6e431e4c355caafa6c7111a435ebc0d35f78a
(cherry picked from commit 0f12c5de67869593cfbc36760957467a122bf81a)
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index cbfc4ed..af7ee26 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -293,6 +293,9 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
if (!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("backtrace")) &&
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("strace")) &&
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("valgrind")) &&
+ // for X Session Management, handled in
+ // vcl/unx/generic/app/sm.cxx:
+ !oArg.match("session=") &&
//ignore additional legacy options that don't do anything anymore
!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("nocrashreport")))
{
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index 82fd4b1..af07f3c 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -202,11 +202,11 @@ static void BuildSmPropertyList()
pSmProps[ 2 ].vals[0].length = aExec.getLength()+1;
pSmProps[ 2 ].vals[0].value = strdup( aExec.getStr() );
rtl::OStringBuffer aRestartOption;
- aRestartOption.append(RTL_CONSTASCII_STRINGPARAM("-session="));
+ aRestartOption.append(RTL_CONSTASCII_STRINGPARAM("--session="));
aRestartOption.append(SessionManagerClient::getSessionID());
pSmProps[ 2 ].vals[1].length = aRestartOption.getLength()+1;
pSmProps[ 2 ].vals[1].value = strdup(aRestartOption.getStr());
- rtl::OString aRestartOptionNoLogo(RTL_CONSTASCII_STRINGPARAM("-nologo"));
+ rtl::OString aRestartOptionNoLogo(RTL_CONSTASCII_STRINGPARAM("--nologo"));
pSmProps[ 2 ].vals[2].length = aRestartOptionNoLogo.getLength()+1;
pSmProps[ 2 ].vals[2].value = strdup(aRestartOptionNoLogo.getStr());
@@ -553,10 +553,10 @@ const rtl::OString& SessionManagerClient::getPreviousSessionID()
{
::rtl::OUString aArg;
osl_getCommandArg( i, &aArg.pData );
- if(aArg.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("-session=")))
+ if(aArg.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("--session=")))
{
aPrevId = rtl::OUStringToOString(
- aArg.copy(RTL_CONSTASCII_LENGTH("-session=")),
+ aArg.copy(RTL_CONSTASCII_LENGTH("--session=")),
osl_getThreadTextEncoding());
break;
}
More information about the Libreoffice-commits
mailing list