make uninstalled lupdate & lrelease find qmake
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thu, 6 Sep 2012 17:21:30 +0000 (19:21 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 20 Sep 2012 12:35:18 +0000 (14:35 +0200)
Change-Id: Ifbbb0be43f20a0def3fed1a32018faa17275a095
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
src/linguist/lrelease/lrelease.pro
src/linguist/lrelease/main.cpp
src/linguist/lupdate/lupdate.pro
src/linguist/lupdate/main.cpp

index ab281e3..debbc98 100644 (file)
@@ -8,4 +8,8 @@ SOURCES += main.cpp
 include(../shared/formats.pri)
 include(../shared/proparser.pri)
 
+qmake.name = QMAKE
+qmake.value = $$shell_path($$QMAKE_QMAKE)
+QT_TOOL_ENV += qmake
+
 load(qt_tool)
index 3ce67ed..0a086a9 100644 (file)
@@ -308,10 +308,12 @@ int main(int argc, char **argv)
 
             evalHandler.verbose = cd.isVerbose();
             ProFileGlobals option;
+            option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE"));
+            if (option.qmake_abslocation.isEmpty())
 #ifdef QT_BOOTSTRAPPED
-            option.qmake_abslocation = binDir + QLatin1String("/qmake");
+                option.qmake_abslocation = binDir + QLatin1String("/qmake");
 #else
-            option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake");
+                option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake");
 #endif
             option.initProperties();
             QMakeParser parser(0, &evalHandler);
index 9744893..40a9daf 100644 (file)
@@ -36,4 +36,8 @@ embed_manifest_exe:win32-msvc2005 {
     QMAKE_POST_LINK += $$quote(mt.exe -updateresource:$$DESTDIR/lupdate.exe -manifest \"$${PWD}\\lupdate.exe.manifest\")
 }
 
+qmake.name = QMAKE
+qmake.value = $$shell_path($$QMAKE_QMAKE)
+QT_TOOL_ENV += qmake
+
 load(qt_tool)
index 191b1d1..d9140ab 100644 (file)
@@ -833,7 +833,9 @@ int main(int argc, char **argv)
 
         evalHandler.verbose = !!(options & Verbose);
         ProFileGlobals option;
-        option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake");
+        option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE"));
+        if (option.qmake_abslocation.isEmpty())
+            option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake");
         option.initProperties();
         option.setCommandLineArguments(QDir::currentPath(),
                                        QStringList() << QLatin1String("CONFIG+=lupdate_run"));