From 2d4b6b391880f92608dd90dd4f065f7a65fff05e Mon Sep 17 00:00:00 2001 From: xiaoyifang <105986+xiaoyifang@users.noreply.github.com> Date: Sun, 13 Aug 2023 17:53:39 +0800 Subject: [PATCH] action: macos zim dependencies fix with dylibbundler (#1066) * action:macos ,manually otool package * action: macos fix dylib --- .github/workflows/macos-homebrew.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-homebrew.yml b/.github/workflows/macos-homebrew.yml index 8ab9ead3..01a8db3a 100644 --- a/.github/workflows/macos-homebrew.yml +++ b/.github/workflows/macos-homebrew.yml @@ -80,6 +80,11 @@ jobs: brew install dylibbundler find /opt -name libicudata.72.dylib find /usr/local -name libicudata.72.dylib + find /opt -name libzstd.1.dylib + find /usr/local -name libzstd.1.dylib + brew install dylibbundler + find /opt -name liblzma.5.dylib + find /usr/local -name liblzma.5.dylib - name: version-file shell: bash env: @@ -120,8 +125,22 @@ jobs: macdeployqt ${targetName}.app -qmldir=. -verbose=1 otool -L GoldenDict.app/Contents/MacOS/GoldenDict ls -al GoldenDict.app/Contents/Frameworks - # otool -L GoldenDict.app/Contents/Frameworks/libicu*.dylib - # cp -r /usr/local/Cellar/icu4c/7*/lib/libicudata.*.dylib GoldenDict.app/Contents/Frameworks + otool -L GoldenDict.app/Contents/Frameworks/libzim.8.dylib + cp -r /usr/local/Cellar/icu4c/7*/lib/libicu*.dylib GoldenDict.app/Contents/Frameworks + cp -r /usr/local/Cellar/zstd/1.5.5/lib/libzstd.1.dylib GoldenDict.app/Contents/Frameworks + # dylibbundler -of -x GoldenDict.app/Contents/Frameworks/libzim.8.dylib -d GoldenDict.app/Contents/Frameworks/ -p @executable_path/../Frameworks + install_name_tool -change "@loader_path/../../../../opt/zstd/lib/libzstd.1.dylib" "@executable_path/../Frameworks/libzstd.1.dylib" GoldenDict.app/Contents/Frameworks/libzim.8.dylib + install_name_tool -change "@loader_path/../../../../opt/xz/lib/liblzma.5.dylib" "@executable_path/../Frameworks/liblzma.5.dylib" GoldenDict.app/Contents/Frameworks/libzim.8.dylib + install_name_tool -change "@loader_path/../../../../opt/xapian/lib/libxapian.30.dylib" "@executable_path/../Frameworks/libxapian.30.dylib" GoldenDict.app/Contents/Frameworks/libzim.8.dylib + install_name_tool -change "@loader_path/../../../../opt/icu4c/lib/libicui18n.73.dylib" "@executable_path/../Frameworks/libicui18n.73.dylib" GoldenDict.app/Contents/Frameworks/libzim.8.dylib + install_name_tool -change "@loader_path/../../../../opt/icu4c/lib/libicuuc.73.dylib" "@executable_path/../Frameworks/libicuuc.73.dylib" GoldenDict.app/Contents/Frameworks/libzim.8.dylib + + + dylibbundler -of -x GoldenDict.app/Contents/Frameworks/libicui18n.73.dylib -x GoldenDict.app/Contents/Frameworks/libicudata.73.dylib -x GoldenDict.app/Contents/Frameworks/libicuuc.73.dylib -d GoldenDict.app/Contents/Frameworks/ -p @executable_path/../Frameworks + + otool -L GoldenDict.app/Contents/Frameworks/libzim.8.dylib + otool -L GoldenDict.app/Contents/Frameworks/libxapian.30.dylib + otool -L GoldenDict.app/Contents/Frameworks/liblzma.5.dylib codesign --force --deep -s - GoldenDict.app