summaryrefslogtreecommitdiffstats
path: root/TOOLS/dylib-unhell.py
Commit message (Collapse)AuthorAgeFilesLines
* osxbundle: simplify process_libraries() to eliminate leafs()Down Thomas2019-12-151-22/+8
| | | | | | | | | | | | | | Instead of traversing across leafs() which can lead to an infinite loop issue with cross-linked libraries, use the dictionary (libs_dict) created by libraries() to create a set (libs_set) of every unique library. Every value in libs_dict is also a key in libs_dict, so every unique library linked to mpv will be a key in libs_dict. Use set() on libs_dict to return a set of the keys from libs_dict, and remove binary from the set so that a duplicate of the binary is not added to the libs directory. Iterate over libs_set to bundle dylibs while using the libs_dict to determine which install_names to change.
* osxbundle: remove rpath definitions towards dev toolsder richter2019-09-221-1/+22
| | | | | | | | since the loading order of rpaths is system wide lib path, dev tool path and then bundle lib path it's possible for the xcode swift libs to be incompatible with the libs the bundle was build with. this leads to possible segfaults. if we distribute the bundle we don't want to load the libs from the dev tools anyway.
* build: fix swift linking with upcoming xcode 11der richter2019-09-221-0/+8
| | | | | | | in xcode 11 the dynamic swift libraries were moved to a separated versioned swift folder, which can't be used for linking and only for distribution. additional to the std dynamic swift lib folder the system wide folder is needed for linking too.
* osxbundle: bundle the dynamic swift std library when neededder richter2019-07-211-1/+20
|
* osxbundle: fix bundle creation with python3Akemi2018-03-081-6/+8
| | | | | | | | | | | | | | there were several problems that had to be fixed because of differences between python2 to python3: - subprocess.check_output returned an unicode instead of a string - filter() returns an iterator instead of a list - recursion limit was reached first two were fixed by explicitly converting to the needed type or using the proper function invocation. third was fixed by changing the recursive process_libraries function to an iterative one. Fixes #5600, #3316
* osxbundle: don't try to package PythonStefano Pigozzi2015-02-021-0/+1
| | | | | | | | This fixes usage when the bundle is used on the same machine that Python/Cython was compiled on. It doesn't fix the harder problem of packaging a full Python installation in the mpv app bundle (and I'm not sure we actually want that). Fixes #1549
* osxbundle: fix detection of user librariesTsukasa OMOTO2014-07-161-4/+4
| | | | | Previous code would detect for example `libcaca.0.dylib` as a system library, because it matched the `libc` condition.
* osxbundle: fix recursion terminationTsukasa OMOTO2014-05-251-1/+1
| | | | Prevents the binary from being copied over to the lib directory.
* osxbundle: split and optimize bundling scriptStefano Pigozzi2014-05-091-0/+93
Move the code that copies the dylib's to the bundle to a new script (dylib-unhell.py) which is called by osxbundle.py. dylib-unhell is about 20x faster than the previous implementation. This is accomplished by removing superflous shell-out operations which are kept track of using an in memory tree of all the needed dependencies. Moreover the shell-outs have been further optimized by not requiring a complete shell for every operation and just using subprocess.call (which is equivalent to Popen).