changeset 542:421b69eeffe3 0.6

Actually write the installer to the output folder
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 29 Apr 2014 18:28:13 +0000
parents 1cddf87f8f83
children 629b928893b0
files ui/createinstallerdialog.cpp
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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
 

http://wald.intevation.org/projects/trustbridge/