]> sigrok.org Git - sigrok-util.git/commitdiff
macosx: create_dmg: also install the C language IRMP shared library
authorGerhard Sittig <redacted>
Mon, 3 Jan 2022 20:28:37 +0000 (21:28 +0100)
committerGerhard Sittig <redacted>
Mon, 3 Jan 2022 20:28:37 +0000 (21:28 +0100)
Have the install_name_tool also massage the libirmp.la build output and
thus have the shared library added to the resulting package. It was
missing before and the Python part of IR_IRMP failed to load.

Add a comment for developers' awareness, the application's executable
and the data files are handled in a different section of the script than
the shared libraries were. Drop trailing whitespace from a text line.

cross-compile/macosx/create_dmg

index b8c5749dba3ecdb1028c90d03bb58fe16981ae3d..effe378cf08c39026317d3ba5f456761d618b2fb 100755 (executable)
@@ -69,6 +69,7 @@ PYDIR="$FRAMEWORKSDIR/Python.framework/Versions/$PYVER"
 mkdir -p $MACOSDIR $FRAMEWORKSDIR $SHARE_DIR
 
 cp $PREFIX/bin/$APPNAME_BINARY $MACOSDIR
+# Implementation detail: Shared libraries are handled below.
 cp -R $PREFIX/share/libsigrokdecode $SHARE_DIR
 rm -rf $SHARE_DIR/libsigrokdecode/decoders/**/__pycache__
 rm -rf $SHARE_DIR/libsigrokdecode/decoders/common/**/__pycache__
@@ -79,7 +80,7 @@ if [ "x$APPNAME_BINARY" = "xpulseview" ]; then
        cp $BOOSTLIBDIR/libboost_timer-mt.dylib $FRAMEWORKSDIR
        cp $BOOSTLIBDIR/libboost_chrono-mt.dylib $FRAMEWORKSDIR
        chmod 644 $FRAMEWORKSDIR/*boost*
-       
+
        # Manually copy translations ("macdeployqt" won't copy them).
        mkdir -p $CONTENTSDIR/translations
        cp $QTTRANSLATIONSDIR/qt_*.qm $CONTENTSDIR/translations
@@ -112,6 +113,10 @@ install_name_tool -change \
        /usr/local/opt/python/Frameworks/Python.framework/Versions/$PYVER/Python \
        @executable_path/../Frameworks/Python.framework/Versions/$PYVER/Python \
        $FRAMEWORKSDIR/libsigrokdecode.*.dylib
+install_name_tool -change \
+       /usr/local/opt/python/Frameworks/Python.framework/Versions/$PYVER/Python \
+       @executable_path/../Frameworks/Python.framework/Versions/$PYVER/Python \
+       $FRAMEWORKSDIR/libirmp.*.dylib
 
 # Add wrapper (sets PYTHONHOME/SIGROK_FIRMWARE_DIR/SIGROKDECODE_DIR).
 mv $MACOSDIR/$APPNAME_BINARY $MACOSDIR/$APPNAME_BINARY.real