Skip to content

Commit

Permalink
OS X: fix github workflow with updated icu4c library
Browse files Browse the repository at this point in the history
By-default icu4c library version was hardcoded to v74. It appears, that
the updated version number is greater than that. This fix makes the
version number lookup more flexible. As soon as it's the only version in
the path (apparently there should only be one icu4c library QLog links
against).
  • Loading branch information
gerbert committed Nov 13, 2024
1 parent 3e1f2df commit 5f8d9fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/macOSBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,19 @@ jobs:
- name: Build dmg
run: |
cd build
ICU4C_LIB_PATH="$(brew --prefix icu4c)/lib"
ICU4C_LIB_NAME="$(ls ${ICU4C_LIB_PATH} | grep -E '^libicui18n\.[0-9]+\.dylib$')"
ICU4C_LIB="${ICU4C_LIB_PATH}/${ICU4C_LIB_NAME}"
macdeployqt qlog.app -executable=./qlog.app/Contents/MacOS/qlog
cp `brew --prefix`/lib/libhamlib.dylib qlog.app/Contents/Frameworks/libhamlib.dylib
cp `brew --prefix`/lib/libqt6keychain.dylib qlog.app/Contents/Frameworks/libqt6keychain.dylib
cp `brew --prefix`/lib/libdbus-1.dylib qlog.app/Contents/Frameworks/libdbus-1.dylib
cp `brew --prefix brotli`/lib/libbrotlicommon.1.dylib qlog.app/Contents/Frameworks/libbrotlicommon.1.dylib
cp `brew --prefix`/opt/icu4c/lib/libicui18n.74.dylib qlog.app/Contents/Frameworks/libicui18n.74.dylib
cp ${ICU4C_LIB} qlog.app/Contents/Frameworks/${ICU4C_LIB_NAME}
install_name_tool -change `brew --prefix`/lib/libhamlib.dylib @executable_path/../Frameworks/libhamlib.dylib qlog.app/Contents/MacOS/qlog
install_name_tool -change `brew --prefix`/lib/libqt6keychain.dylib @executable_path/../Frameworks/libqt6keychain.dylib qlog.app/Contents/MacOS/qlog
install_name_tool -change @loader_path/libbrotlicommon.1.dylib @executable_path/../Frameworks/libbrotlicommon.1.dylib qlog.app/Contents/MacOS/qlog
install_name_tool -change /usr/local/opt/icu4c/lib/libicui18n.74.dylib @executable_path/../Frameworks/libicui18n.74.dylib qlog.app/Contents/MacOS/qlog
install_name_tool -change ${ICU4C_LIB} @executable_path/../Frameworks/${ICU4C_LIB_NAME} qlog.app/Contents/MacOS/qlog
otool -L qlog.app/Contents/MacOS/qlog
macdeployqt qlog.app -dmg
- name: Copy artifact
Expand Down

0 comments on commit 5f8d9fa

Please sign in to comment.