Skip to content

Commit

Permalink
build.yml: Run deploy fixer later
Browse files Browse the repository at this point in the history
  • Loading branch information
abraxa committed Aug 23, 2024
1 parent 5d61db3 commit 8a7ffc5
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions ci/macos/sigrok-macos-create-dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,6 @@ fi

"$QT_BIN_DIR"/macdeployqt $ARTIFACT_TITLE.app

# Fix "opt/xz/lib/liblzma.5.dylib cannot be found" error
# See https://stackoverflow.com/questions/62095338/py2app-fails-macos-signing-on-liblzma-5-dylib
#find / -iname "liblzma.5.dylib"
# File is located at e.g. /usr/local/Cellar/xz/5.6.2/lib/liblzma.5.dylib
XZ_VER=$(brew list --versions xz)
XZ_VER_PATH=$(echo $XZ_VER | sed 's# #/#')
cp $(brew --cellar)/$XZ_VER_PATH/lib/liblzma.5.dylib $FRAMEWORKS_DIR/

# Fetch and run macdeployqtfix with some python3 patches until they're merged
# back to original repo at https://github.com/arl/macdeployqtfix
echo $MACOS_DIR
echo $QT_DIR
echo "-----------"
git clone https://github.com/ipsosante/macdeployqtfix.git /tmp/macdeployqtfix
python3 /tmp/macdeployqtfix/macdeployqtfix.py $MACOS_DIR/APP $QT_DIR/
echo "-----------"

# Copy Python framework and fix it up.
cp -R "$PYTHON_FRAMEWORK_DIR" $FRAMEWORKS_DIR
chmod 644 "$PYTHON_DIR"/lib/libpython*.dylib
Expand Down Expand Up @@ -122,6 +105,15 @@ install_name_tool -change \
@executable_path/../Frameworks/Python.framework/Versions/$PYTHON_VERSION/Python \
$FRAMEWORKS_DIR/libsigrokdecode.*.dylib

# Fetch and run macdeployqtfix with some python3 patches until they're merged
# back to original repo at https://github.com/arl/macdeployqtfix
echo $MACOS_DIR
echo $QT_DIR
echo "-----------"
git clone https://github.com/ipsosante/macdeployqtfix.git /tmp/macdeployqtfix
python3 /tmp/macdeployqtfix/macdeployqtfix.py $MACOS_DIR/APP $QT_DIR/
echo "-----------"

# Add wrapper for executable (sets PYTHONHOME/SIGROK_FIRMWARE_DIR/SIGROKDECODE_DIR).
mv $MACOS_DIR/$ARTIFACT_BIN_NAME $MACOS_DIR/$ARTIFACT_BIN_NAME.real
cat > $MACOS_DIR/$ARTIFACT_BIN_NAME << EOF
Expand Down

0 comments on commit 8a7ffc5

Please sign in to comment.