From d5d226d9f93a8a255ba9dfe608c2bcb12945879a Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 9 Apr 2021 10:03:55 +0200 Subject: [PATCH] Makefile: simplified macOS building --- Makefile.in | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Makefile.in b/Makefile.in index 09e10aada..78ecae6d0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -602,22 +602,7 @@ $(GUI_BUNDLE)/Contents/libs: $(BUNDLE)/Contents/libs $(GUI_BUNDLE) [ -d $(BUNDLE)/Contents/libs ] && cp $(BUNDLE)/Contents/libs/* $(GUI_BUNDLE)/Contents/libs cp -R $(BUNDLE)/Contents/Frameworks/* $(GUI_BUNDLE)/Contents/Frameworks # add Qt frameworks - command -v macdeployqt && macdeployqt $(GUI_BUNDLE) -verbose=2 - # then fix links also for other binaries than uv-qt, namely uv itself - for n in $(GUI_BUNDLE)/Contents/MacOS/*; do \ - for m in $$(otool -L $$n | tail -n +2 | grep -v '^\ *@' | grep 'Qt[a-zA-Z]*\.framework' | sed -n 's/[^/]*\([^ ]*\).*/\1/p'); do \ - FRAMEWORK_D=$$(echo $$m | sed 's/\(.*\.framework\).*/\1/'); \ - FRAMEWORK_N=$$(basename $$FRAMEWORK_D); \ - SUFFIX=$$(echo $$m | sed 's/.*\/\([^/]*\.framework.*\)/\1/'); \ - install_name_tool -change $$m @executable_path/../Frameworks/$$SUFFIX $$n; \ - [ -d $(GUI_BUNDLE)/Contents/Frameworks/$$FRAMEWORK_N ] && continue; \ - cp -R $$FRAMEWORK_D $(GUI_BUNDLE)/Contents/Frameworks; \ - install_name_tool -id @executable_path/../Frameworks/$$(echo $$m | sed 's/.*\(Qt[a-zA-Z]*\.framework\)/\1/') $(GUI_BUNDLE)/Contents/Frameworks/$$SUFFIX; \ - for i in $$(otool -L $(GUI_BUNDLE)/Contents/Frameworks/$$SUFFIX | tail -n +2 | sed -n '/^[^@]*Qt[a-zA-Z]*\.framework/s/[^/]*\([^ ]*\).*/\1/p'); do \ - install_name_tool -change $$i @executable_path/../Frameworks/$$(echo $$i | sed 's/.*\(Qt[a-zA-Z]*\.framework\)/\1/') $(GUI_BUNDLE)/Contents/Frameworks/$$SUFFIX; \ - done ; \ - done; \ - done + command -v macdeployqt && macdeployqt $(GUI_BUNDLE) -verbose=2 -executable=$(GUI_BUNDLE)/Contents/MacOS/uv -executable=$(GUI_BUNDLE)/Contents/MacOS/hd-rum-transcode test -d $(GUI_BUNDLE)/Contents/Resources || mkdir $(GUI_BUNDLE)/Contents/Resources cp data/icon.icns $(GUI_BUNDLE)/Contents/Resources cp data/update.mac $(GUI_BUNDLE)/Contents/MacOS/update