[PATCH 1 of 3] Actually set the arguments for makensis process. Fix escaping

Wald Commits scm-commit at wald.intevation.org
Tue Apr 29 11:33:25 CEST 2014


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1398763551 0
# Node ID 31e0a86f5a359a01a9eea9c0a31108d6b55a9d5f
# Parent  a3e027cd0683d29e8bc13d0351758d941e794a41
Actually set the arguments for makensis process. Fix escaping

diff -r a3e027cd0683 -r 31e0a86f5a35 ui/createinstallerdialog.cpp
--- a/ui/createinstallerdialog.cpp	Mon Apr 28 17:15:48 2014 +0000
+++ b/ui/createinstallerdialog.cpp	Tue Apr 29 09:25:51 2014 +0000
@@ -159,11 +159,13 @@
 
 void CreateInstallerDialog::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
 {
+    qDebug() << "Finished: " << mNSISProc.readAll();
     mProgress.cancel();
 }
 
 void CreateInstallerDialog::processError(QProcess::ProcessError error)
 {
+    qDebug() << "Error: " << mNSISProc.readAll();
     mProgress.cancel();
 }
 
@@ -195,16 +197,18 @@
     /* Copy windows directory contents to tmpdir */
     QStringList arguments;
     mNSISProc.setProgram("makensis");
+    mNSISProc.setProcessChannelMode(QProcess::MergedChannels);
     mNSISProc.setWorkingDirectory(outDir.path());
     arguments << QString::fromLatin1("-Dfiles_dir=") + binDir.path() + "/windows";
-
     foreach (const QString &key, keys) {
-        arguments << QString::fromLatin1("-D%1=\"%2\"").arg(key,
+        arguments << QString::fromLatin1("-D%1=%2").arg(key,
                 options.value(key, QString()).toString());
     }
 
     arguments << binDir.path() + "/trustbridge.nsi";
 
+    qDebug() << "Starting makensis with arguments: " << arguments;
+    mNSISProc.setArguments(arguments);
     mNSISProc.start();
     mProgress.show();
 
@@ -213,8 +217,4 @@
         showErrorMessage(tr("Failed to start makensis.\n"
             "Please ensure that makensis is installed and in your PATH variable."));
     }
-
-
-
-
 }


More information about the Trustbridge-commits mailing list