comparison ui/createinstallerdialog.cpp @ 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 6c4fff146999
comparison
equal deleted inserted replaced
541:1cddf87f8f83 542:421b69eeffe3
161 } 161 }
162 162
163 void CreateInstallerDialog::processFinished(int exitCode, QProcess::ExitStatus exitStatus) 163 void CreateInstallerDialog::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
164 { 164 {
165 FinishedDialog *fin = new FinishedDialog(0, tr("Created installer in %1.") 165 FinishedDialog *fin = new FinishedDialog(0, tr("Created installer in %1.")
166 .arg(mBinaryFolder->text()), mNSISProc.readAll(), false); 166 .arg(mSaveFile->text()), mNSISProc.readAll(), false);
167 qDebug() << "Finished: " << mNSISProc.readAll(); 167 qDebug() << "Finished: " << mNSISProc.readAll();
168 mProgress.cancel(); 168 mProgress.cancel();
169 fin->show(); 169 fin->show();
170 close(); 170 close();
171 } 171 }
208 mNSISProc.setWorkingDirectory(outDir.path()); 208 mNSISProc.setWorkingDirectory(outDir.path());
209 #ifdef Q_OS_WIN 209 #ifdef Q_OS_WIN
210 arguments << QString::fromLatin1("/Dfiles_dir=") + binDir.path().replace("/", "\\") + "\\windows"; 210 arguments << QString::fromLatin1("/Dfiles_dir=") + binDir.path().replace("/", "\\") + "\\windows";
211 arguments << "/Dpath_sep=\\"; 211 arguments << "/Dpath_sep=\\";
212 foreach (const QString &key, keys) { 212 foreach (const QString &key, keys) {
213 arguments << QString::fromLatin1("/D%1=%2").arg(key, 213 QString value = options.value(key, QString()).toString();
214 options.value(key, QString()).toString()); 214 if (key == "setupname") {
215 value = value.arg(outDir.path().replace("/", "\\") + "\\");
216 }
217 arguments << QString::fromLatin1("/D%1=%2").arg(key, value);
215 } 218 }
216 #else 219 #else
217 arguments << QString::fromLatin1("-Dfiles_dir=") + binDir.path() + "/windows"; 220 arguments << QString::fromLatin1("-Dfiles_dir=") + binDir.path() + "/windows";
218 arguments << "-Dpath_sep=/"; 221 arguments << "-Dpath_sep=/";
219 foreach (const QString &key, keys) { 222 foreach (const QString &key, keys) {
220 arguments << QString::fromLatin1("-D%1=%2").arg(key, 223 QString value = options.value(key, QString()).toString();
221 options.value(key, QString()).toString()); 224 if (key == "setupname") {
225 value = value.arg(outDir.path() + "/");
226 }
227 arguments << QString::fromLatin1("-D%1=%2").arg(key, value);
222 } 228 }
223 #endif 229 #endif
224 230
225 arguments << binDir.path() + "/trustbridge.nsi"; 231 arguments << binDir.path() + "/trustbridge.nsi";
226 232

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