Commit 05e1793d authored by Boudewijn Rempt's avatar Boudewijn Rempt

Re-add Qt to the 3rparty deps

This adds the disable-wintab diff for Windows
parent e86898d3
......@@ -74,8 +74,6 @@ if (UNIX AND NOT APPLE)
set(PATCH_COMMAND patch)
endif ()
# this list must be dependency-ordered
if (MSVC)
add_subdirectory( ext_patch )
......@@ -108,6 +106,7 @@ add_subdirectory( ext_freetype)
if (LINUX)
add_subdirectory( ext_fontconfig)
endif()
add_subdirectory( ext_qt )
add_subdirectory( ext_poppler )
add_subdirectory( ext_libraw )
add_subdirectory( ext_frameworks )
SET(EXTPREFIX_qt "${EXTPREFIX}")
if (WIN32)
ExternalProject_Add(
ext_qt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.zip
URL_MD5 d0c366ddf9796256e168ccce6b087175
PATCH_COMMAND myptch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/disable-wintab.diff
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND <SOURCE_DIR>/configure.bat -no-sql-sqlite -opensource -nomake examples -confirm-license -no-dbus -prefix ${EXTPREFIX_qt} -I ${EXTPREFIX_qt}/include -L ${EXTPREFIX_qt}/lib -nomake tools -no-compile-examples -opengl desktop -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia-skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -qt-zlib -qt-pcre -no-icu -qt-libpng -qt-libjpeg -no-pch
BUILD_COMMAND nmake
INSTALL_COMMAND nmake install
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
ALWAYS 0
#DEPENDS ext_perl
)
else()
if (APPLE)
ExternalProject_Add(
ext_qt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.tar.gz
URL_MD5 d0c366ddf9796256e168ccce6b087175
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND "<SOURCE_DIR>/configure -confirm-license -opensource -nomake examples \
-no-pch -no-dbus -no-icu -no-iconv -no-openssl -no-nis \
-no-compile-examples -qt-freetype -qt-harfbuzz -opengl desktop \
-qt-zlib -qt-pcre -qt-libpng -qt-libjpeg
-skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity \
-skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia \
-skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets \
-skip qtwebview -skip qtxmlpatterns \
-prefix ${EXTPREFIX_qt} "
BUILD_COMMAND make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
ALWAYS 0
)
else()
ExternalProject_Add(
ext_qt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.tar.gz
URL_MD5 d0c366ddf9796256e168ccce6b087175
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND "<SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -I ${EXTPREFIX_qt}/include -L ${EXTPREFIX_qt}/lib \
-opensource -confirm-license -nomake examples \
-no-sql-sqlite -no-openssl -no-qml-debug -no-mtdev -no-journald -no-syslog -no-glib -no-pulseaudio -no-alsa -no-gtkstyle \
-no-nis -no-cups -no-iconv -no-tslib -no-icu -no-directfb -no-linuxfb -no-gstreamer -no-pch \
-qt-zlib -qt-pcre -no-icu -qt-libpng -qt-libjpeg -qt-harfbuzz -no-libproxy -qt-freetype -qt-xcb -qt-xkbcommon-x11 \
-optimized-qmake \
-skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity \
-skip qtenginio -skip qtgraphicaleffects -skip qtlocation \
-skip qtmultimedia -skip qtwayland -skip qtwebchannel \
-skip qtwebengine -skip qtwebsockets -skip qtwebview \
-skip qtxmlpatterns"
BUILD_COMMAND gmake
INSTALL_COMMAND gmake install
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
ALWAYS 0
)
endif()
endif()
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index f2f6402..09abbbf 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -300,7 +300,6 @@ struct QWindowsContextPrivate {
QWindowsScreenManager m_screenManager;
QSharedPointer<QWindowCreationContext> m_creationContext;
#if !defined(QT_NO_TABLETEVENT) && !defined(Q_OS_WINCE)
- QScopedPointer<QWindowsTabletSupport> m_tabletSupport;
#endif
const HRESULT m_oleInitializeResult;
const QByteArray m_eventType;
@@ -347,15 +346,12 @@ QWindowsContext::QWindowsContext() :
if (!bv.isEmpty())
QLoggingCategory::setFilterRules(QString::fromLocal8Bit(bv));
#if !defined(QT_NO_TABLETEVENT) && !defined(Q_OS_WINCE)
- d->m_tabletSupport.reset(QWindowsTabletSupport::create());
- qCDebug(lcQpaTablet) << "Tablet support: " << (d->m_tabletSupport.isNull() ? QStringLiteral("None") : d->m_tabletSupport->description());
#endif
}
QWindowsContext::~QWindowsContext()
{
#if !defined(QT_NO_TABLETEVENT) && !defined(Q_OS_WINCE)
- d->m_tabletSupport.reset(); // Destroy internal window before unregistering classes.
#endif
unregisterWindowClasses();
if (d->m_oleInitializeResult == S_OK || d->m_oleInitializeResult == S_FALSE)
@@ -397,12 +393,7 @@ bool QWindowsContext::initTouch(unsigned integrationOptions)
void QWindowsContext::setTabletAbsoluteRange(int a)
{
-#if !defined(QT_NO_TABLETEVENT) && !defined(Q_OS_WINCE)
- if (!d->m_tabletSupport.isNull())
- d->m_tabletSupport->setAbsoluteRange(a);
-#else
Q_UNUSED(a)
-#endif
}
void QWindowsContext::setProcessDpiAwareness(QtWindows::ProcessDpiAwareness dpiAwareness)
@@ -777,11 +768,7 @@ QWindowsScreenManager &QWindowsContext::screenManager()
QWindowsTabletSupport *QWindowsContext::tabletSupport() const
{
-#if !defined(QT_NO_TABLETEVENT) && !defined(Q_OS_WINCE)
- return d->m_tabletSupport.data();
-#else
return 0;
-#endif
}
/*!
@@ -1152,8 +1139,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
return true;
}
#ifndef QT_NO_TABLETEVENT
- if (!d->m_tabletSupport.isNull())
- d->m_tabletSupport->notifyActivate();
#endif // !QT_NO_TABLETEVENT
if (platformWindow->testFlag(QWindowsWindow::BlockedByModal))
if (const QWindow *modalWindow = QGuiApplication::modalWindow())
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 81639f2..a7b28d1 100644
--- a/src/macdeployqt/macdeployqt/main.cpp
+++ b/src/macdeployqt/macdeployqt/main.cpp
@@ -57,6 +57,7 @@ int main(int argc, char **argv)
qDebug() << " -always-overwrite : Copy files even if the target file exists";
qDebug() << " -codesign=<ident> : Run codesign with the given identity on all executables";
qDebug() << " -appstore-compliant: Skip deployment of components that use private API";
+ qDebug() << " -extra-plugins=<d> : Deploy plugins from given extra directory";
qDebug() << "";
qDebug() << "macdeployqt takes an application bundle as input and makes it";
qDebug() << "self-contained by copying in the Qt frameworks and plugins that";
@@ -96,6 +97,7 @@ int main(int argc, char **argv)
extern bool runCodesign;
extern QString codesignIdentiy;
extern bool appstoreCompliant;
+ QStringList extraPluginDirectories;
for (int i = 2; i < argc; ++i) {
QByteArray argument = QByteArray(argv[i]);
@@ -151,6 +153,13 @@ int main(int argc, char **argv)
} else if (argument == QByteArray("-appstore-compliant")) {
LogDebug() << "Argument found:" << argument;
appstoreCompliant = true;
+ } else if (argument.startsWith(QByteArray("-extra-plugins"))) {
+ LogDebug() << "Argument found:" << argument;
+ int index = argument.indexOf('=');
+ if (index == -1)
+ LogError() << "Missing extra plugins directory";
+ else
+ extraPluginDirectories << argument.mid(index+1);
} else if (argument.startsWith("-")) {
LogError() << "Unknown argument" << argument << "\n";
return 1;
@@ -178,10 +187,13 @@ int main(int argc, char **argv)
deploymentInfo.deployedFrameworks = deploymentInfo.deployedFrameworks.toSet().toList();
}
- if (plugins && !deploymentInfo.qtPath.isEmpty()) {
+ if ((plugins && !deploymentInfo.qtPath.isEmpty()) || !extraPluginDirectories.isEmpty()) {
deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins";
LogNormal();
- deployPlugins(appBundlePath, deploymentInfo, useDebugLibs);
+ if (plugins && !deploymentInfo.qtPath.isEmpty())
+ deployPlugins(appBundlePath, deploymentInfo, useDebugLibs);
+ if (!extraPluginDirectories.isEmpty())
+ deployExtraPlugins(appBundlePath, deploymentInfo, useDebugLibs, extraPluginDirectories);
createQtConf(appBundlePath);
}
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index d20b219..4a9aa1f 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -1020,6 +1020,43 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
}
}
+void deployExtraPlugins(const ApplicationBundleInfo &appBundleInfo,
+ const QString pluginDestinationPath, DeploymentInfo deploymentInfo, bool useDebugLibs, const QStringList &extraPluginDirectories)
+{
+ foreach (const QString &extraPluginDir, extraPluginDirectories) {
+ LogNormal() << "Deploying plugins from" << extraPluginDir;
+
+ // search for dylib and so files, both work as plugins on mac os
+ QDir dir(extraPluginDir);
+ dir.setFilter(QDir::Files);
+ dir.setNameFilters(QStringList() << "*.dylib" << "*.so");
+ QDirIterator dirIterator(dir, QDirIterator::Subdirectories);
+ QStringList pluginList;
+ while (dirIterator.hasNext()) {
+ dirIterator.next();
+ if (!QFileInfo(dirIterator.filePath()).isFile())
+ continue;
+ pluginList.append(dir.relativeFilePath(dirIterator.filePath()));
+ }
+
+ // deploy all found plugins
+ foreach (const QString &plugin, pluginList) {
+ QString sourcePath = extraPluginDir + "/" + plugin;
+ const QString destinationPath = pluginDestinationPath + "/" + plugin;
+ QDir dir;
+ dir.mkpath(QFileInfo(destinationPath).path());
+
+ if (copyFilePrintStatus(sourcePath, destinationPath)) {
+ runStrip(destinationPath);
+
+ QList<FrameworkInfo> frameworks = getQtFrameworks(destinationPath, appBundleInfo.path, deploymentInfo.rpathsUsed, useDebugLibs);
+ deployQtFrameworks(frameworks, appBundleInfo.path, QStringList() << destinationPath, useDebugLibs, deploymentInfo.useLoaderPath);
+
+ }
+ }
+ }
+}
+
void createQtConf(const QString &appBundlePath)
{
// Set Plugins and imports paths. These are relative to App.app/Contents.
@@ -1061,6 +1098,16 @@ void deployPlugins(const QString &appBundlePath, DeploymentInfo deploymentInfo,
deployPlugins(applicationBundle, deploymentInfo.pluginPath, pluginDestinationPath, deploymentInfo, useDebugLibs);
}
+void deployExtraPlugins(const QString &appBundlePath, DeploymentInfo deploymentInfo, bool useDebugLibs, const QStringList &extraPluginDirectories)
+{
+ ApplicationBundleInfo applicationBundle;
+ applicationBundle.path = appBundlePath;
+ applicationBundle.binaryPath = findAppBinary(appBundlePath);
+
+ const QString pluginDestinationPath = appBundlePath + "/" + "Contents/PlugIns";
+ deployExtraPlugins(applicationBundle, pluginDestinationPath, deploymentInfo, useDebugLibs, extraPluginDirectories);
+}
+
void deployQmlImport(const QString &appBundlePath, const QSet<QString> &rpaths, const QString &importSourcePath, const QString &importName)
{
QString importDestinationPath = appBundlePath + "/Contents/Resources/qml/" + importName;
diff --git a/src/macdeployqt/shared/shared.h b/src/macdeployqt/shared/shared.h
index ea678c2..f10efd3 100644
--- a/src/macdeployqt/shared/shared.h
+++ b/src/macdeployqt/shared/shared.h
@@ -100,6 +100,7 @@ DeploymentInfo deployQtFrameworks(const QString &appBundlePath, const QStringLis
DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks,const QString &bundlePath, const QStringList &binaryPaths, bool useDebugLibs, bool useLoaderPath);
void createQtConf(const QString &appBundlePath);
void deployPlugins(const QString &appBundlePath, DeploymentInfo deploymentInfo, bool useDebugLibs);
+void deployExtraPlugins(const QString &appBundlePath, DeploymentInfo deploymentInfo, bool useDebugLibs, const QStringList &extraPluginDirectories);
bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, QStringList &qmlDirs);
void changeIdentification(const QString &id, const QString &binaryPath);
void changeInstallName(const QString &oldName, const QString &newName, const QString &binaryPath);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment