changeset 864:45cf874221af

Check for nsi file and convert slashes to backslashes on windows
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 05 Aug 2014 15:31:52 +0200
parents 3ae7ad044566
children 478bc3f42a4e
files ui/createinstallerdialog.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ui/createinstallerdialog.cpp	Tue Aug 05 10:06:31 2014 +0200
+++ b/ui/createinstallerdialog.cpp	Tue Aug 05 15:31:52 2014 +0200
@@ -293,6 +293,7 @@
         }
         arguments << QString::fromLatin1("/D%1=%2").arg(key, value);
     }
+    arguments << QString(binDir.path() + "/trustbridge.nsi").replace("/", "\\");
 #else
     arguments << QString::fromLatin1("-Dfiles_dir=") + mCurrentWorkingDir->path();
     arguments << "-Dpath_sep=/";
@@ -304,9 +305,14 @@
         }
         arguments << QString::fromLatin1("-D%1=%2").arg(key, value);
     }
+    arguments << binDir.path() + "/trustbridge.nsi";
 #endif
 
-    arguments << binDir.path() + "/trustbridge.nsi";
+
+    QFileInfo nsiFile (binDir.path() + "/trustbridge.nsi");
+    if (!nsiFile.exists()) {
+        showErrorMessage(tr("Failed to find installer script at: %1 ").arg(nsiFile.filePath()));
+    }
 
     qDebug() << "Starting makensis with arguments: " << arguments;
     mNSISProc.setArguments(arguments);

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