[PATCH] Actually write the installer to the output folder

Wald Commits scm-commit at wald.intevation.org
Tue Apr 29 20:28:16 CEST 2014


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1398796093 0
# Node ID 421b69eeffe31d9d2ed5c6f6eb45c3856d8323ae
# Parent  1cddf87f8f8303440224572575f80311ff4936f5
Actually write the installer to the output folder

diff -r 1cddf87f8f83 -r 421b69eeffe3 ui/createinstallerdialog.cpp
--- a/ui/createinstallerdialog.cpp	Tue Apr 29 18:08:51 2014 +0000
+++ b/ui/createinstallerdialog.cpp	Tue Apr 29 18:28:13 2014 +0000
@@ -163,7 +163,7 @@
 void CreateInstallerDialog::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
 {
     FinishedDialog *fin = new FinishedDialog(0, tr("Created installer in %1.")
-            .arg(mBinaryFolder->text()), mNSISProc.readAll(), false);
+            .arg(mSaveFile->text()), mNSISProc.readAll(), false);
     qDebug() << "Finished: " << mNSISProc.readAll();
     mProgress.cancel();
     fin->show();
@@ -210,15 +210,21 @@
     arguments << QString::fromLatin1("/Dfiles_dir=") + binDir.path().replace("/", "\\") + "\\windows";
     arguments << "/Dpath_sep=\\";
     foreach (const QString &key, keys) {
-        arguments << QString::fromLatin1("/D%1=%2").arg(key,
-                options.value(key, QString()).toString());
+        QString value = options.value(key, QString()).toString();
+        if (key == "setupname") {
+            value = value.arg(outDir.path().replace("/", "\\") + "\\");
+        }
+        arguments << QString::fromLatin1("/D%1=%2").arg(key, value);
     }
 #else
     arguments << QString::fromLatin1("-Dfiles_dir=") + binDir.path() + "/windows";
     arguments << "-Dpath_sep=/";
     foreach (const QString &key, keys) {
-        arguments << QString::fromLatin1("-D%1=%2").arg(key,
-                options.value(key, QString()).toString());
+        QString value = options.value(key, QString()).toString();
+        if (key == "setupname") {
+            value = value.arg(outDir.path() + "/");
+        }
+        arguments << QString::fromLatin1("-D%1=%2").arg(key, value);
     }
 #endif
 


More information about the Trustbridge-commits mailing list