diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-02 18:31:17 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-02 18:31:17 +0000 |
commit | 383dcc1caf0cd438e4fcf3f3a1411ac7ae07b626 (patch) | |
tree | 3136bbbce7514be743fb0b92ef00d954c0655fe9 /pyuno/source | |
parent | deebfd1738c2676198023f1511eb0c23f8fb3e47 (diff) |
INTEGRATION: CWS geordi2q14 (1.2.34); FILE MERGED
2004/01/29 18:09:59 hr 1.2.34.1: #111934#: merge CWS ooo111fix2
Diffstat (limited to 'pyuno/source')
-rw-r--r-- | pyuno/source/module/unohelper.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pyuno/source/module/unohelper.py b/pyuno/source/module/unohelper.py index 3cc2dcd75a76..f09fbc42cc0e 100644 --- a/pyuno/source/module/unohelper.py +++ b/pyuno/source/module/unohelper.py @@ -2,9 +2,9 @@ # # $RCSfile: unohelper.py,v $ # -# $Revision: 1.2 $ +# $Revision: 1.3 $ # -# last change: $Author: jbu $ $Date: 2003-05-24 23:23:38 $ +# last change: $Author: hr $ $Date: 2004-02-02 19:31:17 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -60,6 +60,7 @@ import uno import pyuno import os +import sys from com.sun.star.lang import XTypeProvider, XSingleComponentFactory, XServiceInfo from com.sun.star.uno import RuntimeException @@ -229,12 +230,17 @@ def addComponentsToContext( toBeExtendedContext, contextRuntime, componentUrls, implReg = smgr.createInstanceWithContext( "com.sun.star.registry.ImplementationRegistration",contextRuntime) isWin = os.name == 'nt' or os.name == 'dos' + isMac = sys.platform == 'darwin' # create a temporary registry for componentUrl in componentUrls: reg = smgr.createInstanceWithContext( "com.sun.star.registry.SimpleRegistry", contextRuntime ) reg.open( "", 0, 1 ) if not isWin and componentUrl.endswith( ".uno" ): # still allow platform independent naming - componentUrl = componentUrl + ".so" + if isMac: + componentUrl = componentUrl + ".dylib" + else: + componentUrl = componentUrl + ".so" + implReg.registerImplementation( loaderName,componentUrl, reg ) rootKey = reg.getRootKey() implementationKey = rootKey.openKey( "IMPLEMENTATIONS" ) |