summaryrefslogtreecommitdiffstats
path: root/TOOLS/dylib-unhell.py
Commit message (Collapse)AuthorAgeFilesLines
* osxbundle: use dylib script directly instead of in a subprocessder richter2024-02-241-261/+0
| | | | | | | | | | | | before errors and outputs where ignored from the subscript and the main script didn't fail nor did it output anything. with this change the script properly outputs everything to stdout and stderr. in the case the dylib script fails the whole script fails now. the main function in dylib_unhell was kept since it can still be used individually without the oscbundle script. the script had to be renamed with an underscore to make it importable.
* osxbundle: add homebrew vulkan loader location to search pathder richter2024-02-241-0/+4
|
* osxbundle: resolve loader_path on rpath retrievalder richter2024-02-241-1/+6
| | | | | rpaths can be relative to the current object folder path. resolve those paths.
* osxbundle: remove unused importder richter2024-02-241-1/+0
|
* osxbundle: fix syntax warning with python 3.12der richter2024-02-241-3/+3
|
* osxbundle: bundle vulkan driver and layersder richter2024-02-201-0/+72
| | | | | | | only bundle synchronization2 layer for older vulkan/MoltenVK versions where it is needed. Fixes #13232
* osxbundle: resolve relative linked dependency pathsder richter2023-11-151-12/+63
| | | | | | | | | | not all dependencies are linked with an absolute path but rather are relatively linked via @rpath or @loader_path. in those cases we have to resolve the paths to those dependencies ourselves and change the linking with install_name_tool to be relative to the @executable_path of the binary within bundle. Fixes #11897
* various: remove trailing whitespaceGuido Cella2022-05-141-1/+1
|
* osxbundle: use python3Kiracus2021-07-171-1/+1
|
* 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).