X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=blobdiff_plain;f=cross-compile%2Fmacosx%2Fcreate_dmg;h=fd36a273da475e556bfc0ca51d581fe302184133;hp=d08cd7e14aa26da59f30e18a9a7a001c8365180d;hb=b1181fe12749e653f74285f71edd09dd6fc859ff;hpb=c6ed5a3a77da544ccbbd82aee45d8622ac1ce77e diff --git a/cross-compile/macosx/create_dmg b/cross-compile/macosx/create_dmg index d08cd7e..fd36a27 100755 --- a/cross-compile/macosx/create_dmg +++ b/cross-compile/macosx/create_dmg @@ -26,11 +26,15 @@ PREFIX=$HOME/sr_macosx # The path where to download files to and where to build packages. BUILDDIR=./build_app +# We use Qt 5.5 in order to remain compatible with more versions of Mac OS X. +QTVER=qt@5.5 + # Path to Qt5 binaries. -QTBINDIR=`brew list qt5 | grep bin | head -n 1 | xargs dirname` +QTBINDIR=`brew list $QTVER | grep bin | head -n 1 | xargs dirname` +QTTRANSLATIONSDIR=`brew --prefix $QTVER`/translations # Path to boost libraries. -BOOSTLIBDIR=`brew list boost | grep libboost_system | head -n 1 | xargs dirname` +BOOSTLIBDIR=`brew list boost | grep libboost_system | grep -v cmake | head -n 1 | xargs dirname` # Path to Python 3 framework. PYTHONFRAMEWORKDIR=`brew list python3 | grep Python.framework | head -n 1 | xargs dirname`/../../../.. @@ -48,7 +52,7 @@ cd $BUILDDIR APPNAME="PulseView" APPNAME_BINARY="pulseview" -APPVER="nightly" +APPVER="NIGHTLY" CONTENTSDIR="$APPNAME.app/Contents" MACOSDIR="$CONTENTSDIR/MacOS" @@ -69,6 +73,13 @@ 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 +for lang in "de"; do + cp $QTTRANSLATIONSDIR/qt_$lang.qm $CONTENTSDIR/translations + cp $QTTRANSLATIONSDIR/qtbase_$lang.qm $CONTENTSDIR/translations +done + $QTBINDIR/macdeployqt $APPNAME.app # Copy Python framework and fix it up. @@ -104,5 +115,5 @@ chmod 755 $MACOSDIR/$APPNAME_BINARY cp ../contrib/Info.plist $CONTENTSDIR cp ../contrib/pulseview.icns $CONTENTSDIR/Resources -hdiutil create "${APPNAME}_${APPVER}.dmg" -volname "$APPNAME $APPVER" \ +hdiutil create "${APPNAME}-${APPVER}.dmg" -volname "$APPNAME $APPVER" \ -fs HFS+ -srcfolder "$APPNAME.app"