windeployqt: Deploy software rasterizer for dynamic Open GL builds.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Fri, 26 Sep 2014 12:20:03 +0000 (14:20 +0200)
committerFriedemann Kleint <Friedemann.Kleint@digia.com>
Fri, 26 Sep 2014 19:45:28 +0000 (21:45 +0200)
Change-Id: I0bb260c7c8992ae24dda6f84eaf304329eb4159c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
src/windeployqt/main.cpp

index eb2e689..d0d40a8 100644 (file)
@@ -1085,14 +1085,11 @@ static DeployResult deploy(const Options &options,
         if (isDebug)
             libEglName += QLatin1Char('d');
         libEglName += QLatin1String(windowsSharedLibrarySuffix);
-        bool deployAngle = options.angleDetection == Options::AngleDetectionForceOn;
-        if (options.angleDetection == Options::AngleDetectionAuto) {
-            // Deploy ANGLE if direct dependency is there or dynamic build (no dependency to any GL library).
-            const QStringList platformPluginLibraries = findDependentLibraries(platformPlugin, options.platform, errorMessage);
-            deployAngle = !platformPluginLibraries.filter(libEglName, Qt::CaseInsensitive).isEmpty()
-                || platformPluginLibraries.filter(QStringLiteral("opengl32"), Qt::CaseInsensitive).isEmpty();
-        }
-        if (deployAngle) {
+        const QStringList platformPluginLibraries = findDependentLibraries(platformPlugin, options.platform, errorMessage);
+        const bool dependsOnAngle = !platformPluginLibraries.filter(libEglName, Qt::CaseInsensitive).isEmpty();
+        const bool dependsOnOpenGl = !platformPluginLibraries.filter(QStringLiteral("opengl32"), Qt::CaseInsensitive).isEmpty();
+        if (options.angleDetection != Options::AngleDetectionForceOff
+            && (dependsOnAngle || !dependsOnOpenGl || options.angleDetection == Options::AngleDetectionForceOn)) {
             const QString libEglFullPath = qtBinDir + slash + libEglName;
             deployedQtLibraries.push_back(libEglFullPath);
             const QStringList libGLESv2 = findDependentLibraries(libEglFullPath, options.platform, errorMessage).filter(QStringLiteral("libGLESv2"), Qt::CaseInsensitive);
@@ -1111,6 +1108,11 @@ static DeployResult deploy(const Options &options,
                 }
             }
         } // deployAngle
+        if (!dependsOnOpenGl) {
+            const QFileInfo softwareRasterizer(qtBinDir + slash + QStringLiteral("opengl32sw") + QLatin1String(windowsSharedLibrarySuffix));
+            if (softwareRasterizer.isFile())
+                deployedQtLibraries.append(softwareRasterizer.absoluteFilePath());
+        }
     } // Windows
 
     // Update libraries