diff --git a/.github/workflows/macOSBuild.yml b/.github/workflows/macOSBuild.yml index 3c2a7208..39a94178 100644 --- a/.github/workflows/macOSBuild.yml +++ b/.github/workflows/macOSBuild.yml @@ -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