Add Qt Assistant to mac app

This commit is contained in:
Peter Lama
2018-03-26 12:58:47 -07:00
committed by wmayer
parent 7c19cee3c6
commit 9d75752a36
2 changed files with 6 additions and 4 deletions

View File

@@ -30,6 +30,7 @@
# include <QMessageBox>
# include <QProcess>
# include <QTextStream>
# include <QCoreApplication>
#endif
#include "Assistant.h"
@@ -86,14 +87,12 @@ bool Assistant::startAssistant()
QString app;
app = QDir::toNativeSeparators(QString::fromUtf8
(App::GetApplication().getHomePath()) + QLatin1String("bin/"));
#elif defined(Q_OS_MAC)
QString app = QCoreApplication::applicationDirPath() + QDir::separator();
#else
QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
#endif
#if !defined(Q_OS_MAC)
app += QLatin1String("assistant");
#else
app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");
#endif
// get the name of the executable and the doc path
QString exe = QString::fromUtf8(App::GetApplication().getExecutableName());

View File

@@ -57,6 +57,9 @@ if(BUILD_QT5)
string(STRIP ${XCODE_PATH} XCODE_PATH)
set(XCTEST_PATH "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/Current")
# add qt assistant to bundle
install(PROGRAMS "${Qt5Core_DIR}/../../../libexec/Assistant.app/Contents/MacOS/Assistant" DESTINATION ${CMAKE_INSTALL_PREFIX}/MacOS)
endif(BUILD_QT5)
# Ensure the actual plugin files are installed instead of symlinks.