comparison 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
comparison
equal deleted inserted replaced
861:3ae7ad044566 864:45cf874221af
291 value = value.arg(outDir.path().replace("/", "\\") + "\\"); 291 value = value.arg(outDir.path().replace("/", "\\") + "\\");
292 mInstallerPath = value; 292 mInstallerPath = value;
293 } 293 }
294 arguments << QString::fromLatin1("/D%1=%2").arg(key, value); 294 arguments << QString::fromLatin1("/D%1=%2").arg(key, value);
295 } 295 }
296 arguments << QString(binDir.path() + "/trustbridge.nsi").replace("/", "\\");
296 #else 297 #else
297 arguments << QString::fromLatin1("-Dfiles_dir=") + mCurrentWorkingDir->path(); 298 arguments << QString::fromLatin1("-Dfiles_dir=") + mCurrentWorkingDir->path();
298 arguments << "-Dpath_sep=/"; 299 arguments << "-Dpath_sep=/";
299 foreach (const QString &key, keys) { 300 foreach (const QString &key, keys) {
300 QString value = options.value(key, QString()).toString(); 301 QString value = options.value(key, QString()).toString();
302 value = value.arg(outDir.path() + "/"); 303 value = value.arg(outDir.path() + "/");
303 mInstallerPath = value; 304 mInstallerPath = value;
304 } 305 }
305 arguments << QString::fromLatin1("-D%1=%2").arg(key, value); 306 arguments << QString::fromLatin1("-D%1=%2").arg(key, value);
306 } 307 }
308 arguments << binDir.path() + "/trustbridge.nsi";
307 #endif 309 #endif
308 310
309 arguments << binDir.path() + "/trustbridge.nsi"; 311
312 QFileInfo nsiFile (binDir.path() + "/trustbridge.nsi");
313 if (!nsiFile.exists()) {
314 showErrorMessage(tr("Failed to find installer script at: %1 ").arg(nsiFile.filePath()));
315 }
310 316
311 qDebug() << "Starting makensis with arguments: " << arguments; 317 qDebug() << "Starting makensis with arguments: " << arguments;
312 mNSISProc.setArguments(arguments); 318 mNSISProc.setArguments(arguments);
313 mNSISProc.start(); 319 mNSISProc.start();
314 mProgress.show(); 320 mProgress.show();

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