diff ui/createinstallerdialog.cpp @ 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 637948e9e32d
children ecdc279dea15
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/