PICARD-2395: Fixed building for macOS

This commit is contained in:
Philipp Wolfer
2022-01-12 08:24:18 +01:00
parent c511137ef6
commit 29ed9d79d2

View File

@@ -57,10 +57,16 @@ mv "$APP_BUNDLE.tmp" "$APP_BUNDLE"
# Fix placing text files in Resources instead of Contents to avoid signatures ending up in extended attributes.
# This fixes the signature breaking if extended attributes get removed or modified.
# Fixes https://tickets.metabrainz.org/browse/PICARD-1943 and related issues.
mkdir "$APP_BUNDLE/Contents/Resources/Qt/"
mv "$APP_BUNDLE/Contents/MacOS/PyQt5/Qt/translations" "$APP_BUNDLE/Contents/Resources/Qt/"
pushd "$APP_BUNDLE/Contents/MacOS/PyQt5/Qt/"
ln -s ../../../Resources/Qt/translations .
echo "Fixing location of Qt5 translation resources for code signing..."
if [[ -d "$APP_BUNDLE/Contents/MacOS/PyQt5/Qt5/" ]]; then
QT5_DIR=Qt5
else # For older PyQt5 installs
QT5_DIR=Qt
fi
mkdir "$APP_BUNDLE/Contents/Resources/$QT5_DIR/"
mv "$APP_BUNDLE/Contents/MacOS/PyQt5/$QT5_DIR/translations" "$APP_BUNDLE/Contents/Resources/$QT5_DIR/"
pushd "$APP_BUNDLE/Contents/MacOS/PyQt5/$QT5_DIR/"
ln -s "../../../Resources/$QT5_DIR/translations" .
popd
if [ "$CODESIGN" = '1' ]; then