From f29efc2892243313dd6b40070062328ace7e4bfc Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 31 Aug 2013 21:37:06 +0200 Subject: [PATCH] More Mac OS fixes for Qt5. --- mac_post_make.sh | 2 +- src/pokerth.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mac_post_make.sh b/mac_post_make.sh index b594f061..f0aa99b1 100755 --- a/mac_post_make.sh +++ b/mac_post_make.sh @@ -84,7 +84,7 @@ if [ "$1" != "--without-qt" ] ; then QTWIDGETS_LINK=$(otool -L $BINARY | grep QtWidgets | cut -d"(" -f1 | cut -f2) QTSQL_LINK=$(otool -L $BINARY | grep QtSql | cut -d"(" -f1 | cut -f2) QTNETWORK_LINK=$(otool -L $BINARY | grep QtNetwork | cut -d"(" -f1 | cut -f2) - QTPRINT_LINK=$(otool -L $BINARY | grep QtPrintSupport | cut -d"(" -f1 | cut -f2) + QTPRINT_LINK=$(otool -L $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib | grep QtPrintSupport | cut -d"(" -f1 | cut -f2) install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY diff --git a/src/pokerth.cpp b/src/pokerth.cpp index 4a96bd84..127ab125 100755 --- a/src/pokerth.cpp +++ b/src/pokerth.cpp @@ -89,7 +89,8 @@ int main( int argc, char **argv ) #ifdef __APPLE__ // The following needs to be done directly after the application is created. - QDir dir(QApplication::applicationDirPath()); + QDir dir(argv[0]); + dir.cdUp(); dir.cdUp(); dir.cd("plugins"); QApplication::setLibraryPaths(QStringList(dir.absolutePath()));