Perl check for windows configure.
authorMarkku Heikkila <markku.heikkila@digia.com>
Wed, 7 Sep 2011 18:08:34 +0000 (20:08 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Sep 2011 14:03:47 +0000 (16:03 +0200)
Works for Windows, *nix check is done by bash shell.

Task-number: QTBUG-5710
Merge-request: 1362
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit b3de52be29a54aa23a446c7689a48f73206a7cbc)

Change-Id: I6c0ee22e354724c08fb4070b370254223fd5a431
Reviewed-on: http://codereview.qt-project.org/4590
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
tools/configure/configureapp.cpp

index bb0d206..24284a3 100644 (file)
@@ -3561,17 +3561,21 @@ void Configure::displayConfig()
 #if !defined(EVAL)
 void Configure::generateHeaders()
 {
-    if (dictionary["SYNCQT"] == "yes"
-        && findFile("perl.exe")) {
-        cout << "Running syncqt..." << endl;
-        QStringList args;
-        args += buildPath + "/bin/syncqt.bat";
-        QStringList env;
-        env += QString("QTDIR=" + sourcePath);
-        env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH"));
-        int retc = Environment::execute(args, env, QStringList());
-        if (retc) {
-            cout << "syncqt failed, return code " << retc << endl << endl;
+    if (dictionary["SYNCQT"] == "yes") {
+        if (findFile("perl.exe")) {
+            cout << "Running syncqt..." << endl;
+            QStringList args;
+            args += buildPath + "/bin/syncqt.bat";
+            QStringList env;
+            env += QString("QTDIR=" + sourcePath);
+            env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH"));
+            int retc = Environment::execute(args, env, QStringList());
+            if (retc) {
+                cout << "syncqt failed, return code " << retc << endl << endl;
+                dictionary["DONE"] = "error";
+            }
+        } else {
+            cout << "Perl not found in environment - cannot run syncqt." << endl;
             dictionary["DONE"] = "error";
         }
     }