Perl check for windows configure.

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>
This commit is contained in:
Markku Heikkila 2011-09-07 20:08:34 +02:00 committed by Qt by Nokia
parent 289ed56cc9
commit acb28484b0

View 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";
}
}