summaryrefslogtreecommitdiffstats
path: root/pyuno
Commit message (Collapse)AuthorAgeFilesLines
* gbuild: set Package default target to INSTDIRMichael Stahl2013-10-283-4/+2
| | | | Change-Id: I2bc45e4ba63f5faaee7389bcd9d7b3f563503186
* sal: add special handling of argc==0 to osl_setCommandArgs()Michael Stahl2013-10-101-4/+1
| | | | | | | | | | | | | | | | | ... to set up a fake command line. This is used from pyuno, when invoked from the "python" executable as "import uno". On WNT there is an API to get the actual command line, so just use that even in the "fake" case; on UNX just fake something up. Just for the record the whole osl_setCommandArgs() is called exactly once assumption should work out _unless_ there is a program that uses SAL_MAIN _and_ does a python-level "import uno" _before_ it wants to create a python-based UNO service (via pyuno_loader::CreateInstance), since pyuno already takes care to call Runtime::initialize() at most once. Change-Id: Ifd23de733ea3e6b694d46ab039b6aa4fd3e7fc1b Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* pyuno: set up fake command line in getComponentContext()Michael Stahl2013-10-091-0/+8
| | | | | | | | | | Easy to trigger the assert in osl_getCommandArgCount(), just run instdir/*/program/python and "import unohelper". Avoid that by setting up a fake command line, hopefully nobody expects to be able to give relevant args to python... Change-Id: I0df6c23d6ecbb3c2bce81a9d5bcecdcb1729ddbb
* fdo#70196: Python 2 compatibility for UNO import error handlingDavid Bolen2013-10-071-8/+9
| | | | | | | | Add backwards compatibility support for Python 2 to the earlier change in fdo#66025 to improve import error handling under Python 3. Change-Id: I47bf8ef255c4c2a3e4a2754414977aaa8ed32483 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* WaE: unused variableTor Lillqvist2013-10-021-1/+0
| | | | Change-Id: Iea8461444c29de9968a5bfa85a2dabb186db47ca
* Start hacking --enable-canonical-installation-tree-structure back into shapeTor Lillqvist2013-09-251-1/+1
| | | | | | | | | | | | | | | | | Had been totaly broken by the recent changes. (Which is fine, it is just an experimental hack anyway, I am not sure whether it will ever be used in anger. Just a pet peeve of mine, I dislike seeing libraries, configuration files, resources etc mixed together in one "program" folder, especially on OS X, where the convention is to have app-specific dylibs and frameworks in "Frameworks", and resource files in "Resources". But this is not any requirement as such; there are apps in the Mac App Store that blatantly "break" this convention.) Basically, replace uses of gb_PROGRAMDIRNAME and gb_Package_PROGRAMDIRNAME with more specific LIBO_FOO_FOLDER, which for normal builds all expand to the same "program" anyway. Change-Id: I16c2b3351caa00e251e229aafbccb8346042d3c1
* Try to fix cross-compilationTor Lillqvist2013-09-232-2/+2
| | | | | | | | Add more FOO_FOR_BUILD variables and some gb_Foo_for_build functions. Get rid of gb_INSTROOT and gb_DEVINSTALLROOT, just use INSTROOT. Change-Id: Iee531b02d14fae41edb68ad589a5dec829a60255
* pyuno: rename the python wrapper executableMichael Stahl2013-09-221-4/+4
| | | | | | | Putting it in a subdirectory on solver is no longer necessary since python3 started delivering to INSTDIR, so lose the crazy naming. Change-Id: I17e924e5d872768a64f6a3112f1294f3def7120e
* gbuild: remove libraries from OUTDIR and WORKDIRMichael Stahl2013-09-221-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor everything to find and link libraries directly in INSTDIR. - add gb_LinkTarget_get_linksearchpath_for_layer, and use it to set up -L paths for T_LDFLAGS in such a way that only allowed libraries can be linked against; i.e. it's not possible to link URE linktargets against OOO or not-installed libraries - gb_Library_get_target is now same as the gb_LinkTarget_get_target (TODO: this needs cleanup) - since a pattern rule won't work for linking libraries in INSTDIR, add a separate per-file rule for every INSTDIR lib - pattern rule can't find link target in the clean target any more so add a LINKTARGET variable - disable gb_Library_add_auxtarget, no auxtargets need to be copied - tweak the call to gb_Library_Library_platform to pass in a path in sdk/lib for the versioned URE libs - fix the Library clean target - add LAYER parameter to gb_LinkTarget_LinkTarget - adjust platform link commands - MSVC link command now uses explicit -manifestfile and -pdb parameters to keep misc. files out of INSTDIR - remove gb_Helper_OUTDIR_FOR_BUILDLIBDIR - adjust Extension, CppunitTest, JunitTest, PythonTest, Gallery, various CustomTargets to search INSTDIR - remove SDK library symlinks and import libs from odk/Package_lib - on Mac OS X, put .dylib symlinks into sdk/lib even though those are not packaged and would be created by the SDK configury; we need these to be somewhere for linking anyway - add a (unfortunately cyclic) dependency on Package ure_install to sal Change-Id: I70d88742f8c8232ad7b9521416275c67b64fe6cf
* gbuild: remove gb_Rdb__get_final_targetMichael Stahl2013-09-121-3/+1
| | | | | | | | ... by replacing gb_Rdb_install with a separate constructor so the right target can be registered at the module. There is still an ugly special case for the ure/services. Change-Id: I81c004143f201aaf38daca99819888313ee24f49
* Towards a working instdir for Mac OS XStephan Bergmann2013-09-112-2/+2
| | | | | | | | | | | | | | | | | Introduced gb_INSTROOT, which is the same as $(INSTDIR) except for Mac OS X, where it is $(INSTDIR)/LibreOffice.app/Contents. Most stuff ends up there (so most occurrences of $(INSTDIR) have been replaced with $(gb_INSTROOT)), but SDK- related stuff goes to $(INSTDIR)/$(gb_Package_SDKDIRNAME). (And GeneratedPackage needed to be made more flexible, to allow for packages that go into either of those two places.) For Android and iOS, gb_INSTROOT probably still needs to be set. The most obvious missing thing yet to make instdir work for Mac OS X is the instdir/*/LibreOffice.app/Contents/ure/ vs. instdir/*/LibreOffice.app/Contents/ure-link/ split. Change-Id: I4478edd27b14c92c96d92d5169bdca3ec50d78f5
* gbuild: install rdb files directly in module they come fromMatúš Kukan2013-09-091-0/+2
| | | | Change-Id: I3a9cb4ce71cfb02b7378289a36aa0eb6e3a42f26
* pyuno: another filelist to make instdir betterMatúš Kukan2013-09-091-1/+3
| | | | Change-Id: Ieda9b3847de3de8989eaafc542e60216baa1af4d
* pyuno: this rc file seems to be unusedMatúš Kukan2013-09-093-36/+0
| | | | Change-Id: I98b6263a464b46075e69e363c3eb9e4ec4557c46
* pyuno: install python scripts using filelistsMatúš Kukan2013-09-093-35/+7
| | | | Change-Id: Ic7515acd14916cc36b59749059ed623cda906c23
* ENABLE_MACOSX_MACLIKE* Harmonize ENABLE_* variable to TRUE/<nothing>Norbert Thiebaud2013-08-301-1/+1
| | | | Change-Id: I0c51975c1c13dbd100bbd8e6103835ce8a8c3691
* finish deprecation of O(U)String::valueOf()Luboš Luňák2013-08-211-1/+1
| | | | | | | Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
* osl_getThreadIdentifier(0) -> osl::Thread::getCurrentIdentifier()Stephan Bergmann2013-08-211-1/+2
| | | | Change-Id: Ida9785c4b9fda0459769957734952e69d7a9de44
* Further work on the "Mac-like app structure" optionTor Lillqvist2013-08-183-2/+3
| | | | | | | Lots of stuff still either ended up in the wrong place, or was looked up from the wrong place, or both. Fix most cases. Change-Id: I06ebbce207c219f3cd82b4387dd9b3fdb83420d4
* Use subfolder names from <config_folders.h>Tor Lillqvist2013-08-183-1/+15
| | | | | | | | Change all instances of hardcoded "program", "share" etc subfolder names to use those from <config_folders.h> instead. In normal builds, the end result will not change. Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
* Mark as constTakeshi Abe2013-08-151-1/+1
| | | | Change-Id: Ic7ee570935b5d827dc01a483877ea5021da5abea
* fdo#50470: Restore pyuno object method introspection in Python 3David Bolen2013-08-133-24/+45
| | | | | | | | | | | | | Switch to __dir__ entry point for introspection as Python 3 dropped support for __members__/__methods__. This is backwards compatible to Python 2.6. Module initialization adjusted to complete type setup (needed for tp_dict) via PyType_Ready. Change-Id: Ie1f7b9dd4279242de89d009eb7acdc8c786dab8f Reviewed-on: https://gerrit.libreoffice.org/5375 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
* Remove whitespace from line endsStephan Bergmann2013-07-291-18/+18
| | | | Change-Id: Ie894879eaebda32bc4f99e7ad7f810c569e86a7a
* fdo#66025: Improve accuracy of ImportError traceback and messageDavid Bolen2013-07-291-18/+31
| | | | | | | | | | The ImportError raised on an import failure with the uno module loaded now includes a complete traceback and the original Python exception message text, combined with the most relevant (nearest to failure if imports are nested) uno lookup that also failed. Change-Id: Id968d84d7f09d555a81017a99369beb503d61439 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* fdo#66025: Simplify new ImportError logicDavid Bolen2013-07-241-8/+4
| | | | Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* fdo#66025: Minor clean-up of previous patchDavid Bolen2013-07-241-1/+1
| | | | | Change-Id: Idaaf8ebbf419899ba04b77cf10b217c141652a3a Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* fdo#66025: Improve ImportError raised from _uno_importDavid Bolen2013-07-241-8/+31
| | | | | Change-Id: I92301f0c37d69e5977a12ab4d5a360f7a4ff20fe Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* remove last users of gb_Executable_add_noexception_objectBjoern Michaelsen2013-07-171-1/+1
| | | | | | | Change-Id: Iddee238aa800ecfee8f97a7132b38b6446e0b2a4 Reviewed-on: https://gerrit.libreoffice.org/4953 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
* Resolves: #i120788# remove unused members from PyUNO_callable_InternalsHerbert Dürr2013-07-123-13/+1
| | | | | | | | | | | Patch by: Tsutomu Uchino <hanya.runo@gmail.com> (cherry picked from commit 5e2c3fd88906494965979bd20ca852391bee3bac) Conflicts: pyuno/source/module/pyuno_impl.hxx Change-Id: If73d5f7b799f04b79b5cc71d2d44c797851b18d0
* pyuno: Revert 5589c72b88e502bfca045ae38af16c854afdd401Michael Stahl2013-07-081-3/+4
| | | | | | | | ... which was obsoleted by commit c007292ec3eedcf2b1ad673308fa42aad31a7333 and apparently causes breakage for builds with gb_GCOV=YES. Change-Id: I27def9a8b4d003bf82c84e55d36ace37dd8532b0
* remove OUString wrap for string literalsThomas Arnhold2013-06-292-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some functions and all kinds of Exceptions. CannotConvertException CloseVetoException DisposedException EmptyUndoStackException ErrorCodeIOException Exception GridInvalidDataException GridInvalidModelException IOException IllegalAccessException IllegalArgumentException IllegalTypeException IndexOutOfBoundsException NoMasterException NoSuchElementException NoSupportException PropertyVetoException RuntimeException SAXException ScannerException StorageWrappedTargetException UnsupportedFlavorException VetoException WrappedTargetException ZipIOException throwGenericSQLException throwIllegallArgumentException createInstance createInstanceWithContext forName getByName getPackageManager getPropertyValue getUnpackedValueOrDefault getValueByName hasPropertyByName openKey setName setPropertyValue supportsService bash command: for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx' | cut -d ':' -f1 | sort -u | xargs sed -i -e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g" -e "s/\($i.*\)\"+ /\1\" + /g"; done Change-Id: Iaf8e641b0abf28c082906014f87a183517630535 Reviewed-on: https://gerrit.libreoffice.org/4624 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
* reduce some spacingThomas Arnhold2013-06-291-6/+2
| | | | Change-Id: I72d494b1c0ff5ed3c52ae6a078815f497e4dd647
* PyUno fixed crash in function isInstanceOfStructOrException()Xiaoli2013-06-161-2/+4
| | | | | | | | | when we try to call PyUNO_callable object that doesn't have __class__ attribute Change-Id: Ia05f70d70f248d50aa141b09625f7ec50189e1dd Reviewed-on: https://gerrit.libreoffice.org/4309 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
* Deprecated conversion from const wchar_t* to wchar_t*Fridrich Štrba2013-06-101-2/+2
| | | | Change-Id: I8c0a97372f0855543d6207adb0abaa4cc820aabd
* Optional pyuno module should have its own services/pyuno.rdbStephan Bergmann2013-05-282-0/+17
| | | | | | | | | ...this e.g. changes the error message when trying to register an extension that contains an (actively registered) Python component but no pyuno is installed from "Binary URP bridge disposed during call" to a less frightening "The service com.sun.star.loader.Python cannot be instantiated." Change-Id: I10f2b36b11395559ee95ce659878222b5ea99c11
* fdo#46808, Convert script::InvocationAdapterFactory to new styleNoel Grandin2013-05-141-9/+2
| | | | Change-Id: I2fe24c863f4c43471f46032ed15fcd5b98863fc1
* pyuno: remove obsolete makefilesMichael Stahl2013-05-142-37/+0
| | | | | | These should have been removed in b6bcbb675afedba0c47654dd78dc446dac0630d1 Change-Id: Iec28da16542f16c459bf301649260d8b13c1c67d
* More gb_PROGRAMDIRNAME clean upStephan Bergmann2013-05-101-1/+1
| | | | Change-Id: I5af86e15bcb8958a680e7309f13d7a865f29d7a9
* No need for RTLD_NOW hereStephan Bergmann2013-05-081-1/+1
| | | | | | ...it was like that "since the beginning," but for no apparent reason. Change-Id: Ic293739b5cd5de0bfe9e2580a0755af64202e582
* Library_puyuno_wrapper is not built on WNT anywayStephan Bergmann2013-05-081-2/+0
| | | | Change-Id: Ia4e2f9d5f3475b0a7af8b6db80ba4b2cd5f6bfce
* Make sure again pyuno_wrapper does not link against libstdc++Stephan Bergmann2013-05-081-0/+12
| | | | | | ...which got broken with gbuild'ification. Change-Id: Ice2b3ffb81a646c9e542344ca348eb6a16eb4ce2
* copy pyuno files to instdirDavid Tardon2013-05-052-0/+26
| | | | Change-Id: I62fa315b942c5b2383ee83c644ecbcbca3d6c40f
* Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks2013-04-3013-273/+52
|
* gbuild: drop empty use_packages callsDavid Tardon2013-04-241-3/+0
| | | | | | | Change-Id: I8e9f70eb5d929c98b4379416c2259a74e31d587f Reviewed-on: https://gerrit.libreoffice.org/3503 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
* move URE headers to include/David Tardon2013-04-241-2/+0
| | | | | | | Change-Id: Ib48a12e902f2311c295b2007f08f44dee28f431d Reviewed-on: https://gerrit.libreoffice.org/3499 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
* replace python-core zip built in pyuno with direct use of PackageMichael Stahl2013-04-222-17/+3
| | | | | | | | | | | | | | | | | | | - python3: deliver files to INSTDIR, with same layout as instset and do not deliver .lib files - pyuno: remove obsolete python.bin targets - pyuno: remove usage of CustomTarget_zip for WNT and non-Mac UNX platforms (sadly it is apparently still needed for "system" python on MinGW) - scp2: use the python3 filelist There is still a problem here because the installer does not currently allow to preserve the executable bit on files in a filelist - RepositoryExternal: run python executable from INSTDIR and link against libraries in UnpackedTarball dir Change-Id: I931ca0a8be6ff40051b1ca50da1f0770e6057832 Reviewed-on: https://gerrit.libreoffice.org/3525 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* adapt path for test.dll for WNTMichael Stahl2013-04-211-3/+7
| | | | Change-Id: I4d7cb081805213f55ae69c4ade8638bbfc06f0c4
* python3: put an RPATH into python binary ...Michael Stahl2013-04-192-5/+0
| | | | | | ... and get rid of LD_LIBRARY_PATH hack in wrapper shell script. Change-Id: I7d91c6086460504d656de7b018087264165f396b
* pyuno_loader::CreateInstance: delete the initial PyThreadStateMichael Stahl2013-04-181-0/+4
| | | | | | | | | | Don't see how it could be used again, it appears to be leaked and causes the assertion in PyThreadState_Swap to fire. Change-Id: Id6bbb4363928e4fdd8bda1905f6e1f9931dba74c Reviewed-on: https://gerrit.libreoffice.org/3452 Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de> Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
* pyuno_dlopenwrapper: give error message before abort() if dlopen() failsMiklos Vajna2013-04-121-0/+1
| | | | Change-Id: Idf39b33efe4c7838f2669aec8773616416811d57