1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
21 #include "kdenlivesettings.h"
22 #include "profilesdialog.h"
23 #include "kdenlive-config.h"
25 #include <KStandardDirs>
28 #include <kmimetype.h>
31 #include <KMimeTypeTrader>
35 #include <QXmlStreamWriter>
38 const double recommendedMltVersion = 46;
39 static const char version[] = VERSION;
41 Wizard::Wizard(bool upgrade, QWidget *parent) :
44 setWindowTitle(i18n("Config Wizard"));
45 setPixmap(QWizard::WatermarkPixmap, QPixmap(KStandardDirs::locate("appdata", "banner.png")));
47 QWizardPage *page1 = new QWizardPage;
48 page1->setTitle(i18n("Welcome"));
51 label = new QLabel(i18n("Your Kdenlive version was upgraded to version %1. Please take some time to review the basic settings", QString(version).section(' ', 0, 0)));
53 label = new QLabel(i18n("This is the first time you run Kdenlive. This wizard will let you adjust some basic settings, you will be ready to edit your first movie in a few seconds..."));
54 label->setWordWrap(true);
55 m_startLayout = new QVBoxLayout;
56 m_startLayout->addWidget(label);
57 QPushButton *but = new QPushButton(KIcon("help-about"), i18n("Discover the features of this Kdenlive release"), this);
58 connect(but, SIGNAL(clicked()), this, SLOT(slotShowWebInfos()));
59 m_startLayout->addStretch();
60 m_startLayout->addWidget(but);
63 page1->setLayout(m_startLayout);
66 QWizardPage *page4 = new QWizardPage;
67 page4->setTitle(i18n("Checking MLT engine"));
68 m_mltCheck.setupUi(page4);
71 WizardDelegate *listViewDelegate = new WizardDelegate(m_mltCheck.programList);
72 m_mltCheck.programList->setItemDelegate(listViewDelegate);
74 QWizardPage *page2 = new QWizardPage;
75 page2->setTitle(i18n("Video Standard"));
76 m_standard.setupUi(page2);
78 m_okIcon = KIcon("dialog-ok");
79 m_badIcon = KIcon("dialog-close");
81 // build profiles lists
82 QMap<QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
83 QMap<QString, QString>::const_iterator i = profilesInfo.constBegin();
84 while (i != profilesInfo.constEnd()) {
85 QMap< QString, QString > profileData = ProfilesDialog::getSettingsFromFile(i.value());
86 if (profileData.value("width") == "720") m_dvProfiles.insert(i.key(), i.value());
87 else if (profileData.value("width").toInt() >= 1080) m_hdvProfiles.insert(i.key(), i.value());
88 else m_otherProfiles.insert(i.key(), i.value());
92 m_standard.button_all->setChecked(true);
93 connect(m_standard.button_all, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
94 connect(m_standard.button_hdv, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
95 connect(m_standard.button_dv, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
97 connect(m_standard.profiles_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckSelectedItem()));
99 // select default profile
100 if (!KdenliveSettings::default_profile().isEmpty()) {
101 for (int i = 0; i < m_standard.profiles_list->count(); i++) {
102 if (m_standard.profiles_list->item(i)->data(Qt::UserRole).toString() == KdenliveSettings::default_profile()) {
103 m_standard.profiles_list->setCurrentRow(i);
104 m_standard.profiles_list->scrollToItem(m_standard.profiles_list->currentItem());
112 QWizardPage *page3 = new QWizardPage;
113 page3->setTitle(i18n("Additional Settings"));
114 m_extra.setupUi(page3);
115 m_extra.projectfolder->setMode(KFile::Directory);
116 m_extra.projectfolder->setUrl(KUrl(KdenliveSettings::defaultprojectfolder()));
117 m_extra.videothumbs->setChecked(KdenliveSettings::videothumbnails());
118 m_extra.audiothumbs->setChecked(KdenliveSettings::audiothumbnails());
119 m_extra.autosave->setChecked(KdenliveSettings::crashrecovery());
120 connect(m_extra.videothumbs, SIGNAL(stateChanged(int)), this, SLOT(slotCheckThumbs()));
121 connect(m_extra.audiothumbs, SIGNAL(stateChanged(int)), this, SLOT(slotCheckThumbs()));
126 QWizardPage *page5 = new QWizardPage;
127 page5->setTitle(i18n("Checking system"));
128 m_check.setupUi(page5);
131 listViewDelegate = new WizardDelegate(m_check.programList);
132 m_check.programList->setItemDelegate(listViewDelegate);
134 QTimer::singleShot(500, this, SLOT(slotCheckMlt()));
138 void Wizard::checkMltComponents()
140 QSize itemSize(20, fontMetrics().height() * 2.5);
141 m_mltCheck.programList->setColumnWidth(0, 30);
142 m_mltCheck.programList->setIconSize(QSize(24, 24));
145 QTreeWidgetItem *mltitem = new QTreeWidgetItem(m_mltCheck.programList);
147 QTreeWidgetItem *meltitem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Melt") + " (" + KdenliveSettings::rendererpath() + ')');
148 meltitem->setData(1, Qt::UserRole, i18n("Required for rendering (part of MLT package)"));
149 meltitem->setSizeHint(0, itemSize);
150 meltitem->setIcon(0, m_okIcon);
152 // Check MLT's installed producers
153 QProcess checkProcess;
154 checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
155 if (!checkProcess.waitForStarted()) {
156 meltitem->setIcon(0, m_badIcon);
157 meltitem->setData(1, Qt::UserRole, i18n("Error starting MLT's command line player (melt)"));
158 button(QWizard::NextButton)->setEnabled(false);
160 checkProcess.waitForFinished();
161 QByteArray result = checkProcess.readAllStandardError();
163 // Check MLT avformat module
164 QTreeWidgetItem *avformatItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Avformat module (FFmpeg)"));
165 avformatItem->setData(1, Qt::UserRole, i18n("Required to work with various video formats (hdv, mpeg, flash, ...)"));
166 avformatItem->setSizeHint(0, itemSize);
167 if (!result.contains("- avformat")) {
168 avformatItem->setIcon(0, m_badIcon);
169 m_mltCheck.tabWidget->setTabEnabled(1, false);
171 avformatItem->setIcon(0, m_okIcon);
172 // Make sure we have MLT > 0.3.4
175 QString exepath = KStandardDirs::findExe("pkg-config");
176 if (!exepath.isEmpty()) {
177 checkProcess.start(exepath, QStringList() << "--variable=version" << "mlt++");
178 if (!checkProcess.waitForStarted()) {
179 kDebug() << "// Error querying MLT's version";
181 checkProcess.waitForFinished();
182 mltVersion = checkProcess.readAllStandardOutput();
183 version = 100 * mltVersion.section('.', 0, 0).toInt() + 10 * mltVersion.section('.', 1, 1).toInt() + mltVersion.section('.', 2, 2).toInt();
184 kDebug() << "// FOUND MLT's pkgconfig version: " << version;
188 checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "--version");
189 if (!checkProcess.waitForStarted()) {
190 kDebug() << "// Error querying MLT's version";
192 checkProcess.waitForFinished();
193 mltVersion = checkProcess.readAllStandardError();
194 mltVersion = mltVersion.section('\n', 0, 0).simplified();
195 mltVersion = mltVersion.section(' ', -1).simplified();
196 version = 100 * mltVersion.section('.', 0, 0).toInt() + 10 * mltVersion.section('.', 1, 1).toInt() + mltVersion.section('.', 2, 2).toInt();
197 kDebug() << "// FOUND MLT version: " << version;
201 mltitem->setText(1, i18n("MLT version: %1", mltVersion.simplified()));
202 mltitem->setSizeHint(0, itemSize);
204 mltitem->setData(1, Qt::UserRole, i18n("Your MLT version is unsupported!!!"));
205 mltitem->setIcon(0, m_badIcon);
207 if (version < recommendedMltVersion) {
208 mltitem->setData(1, Qt::UserRole, i18n("Please upgrade to the latest MLT version"));
209 mltitem->setIcon(0, m_badIcon);
211 mltitem->setData(1, Qt::UserRole, i18n("MLT version is correct"));
212 mltitem->setIcon(0, m_okIcon);
214 // Check installed audio codecs
215 QProcess checkProcess2;
216 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "acodec=list");
217 if (!checkProcess2.waitForStarted()) {
218 m_mltCheck.tabWidget->setTabEnabled(1, false);
219 kDebug() << "// Error parsing MLT's avformat codecs";
221 checkProcess2.waitForFinished();
222 QByteArray codecList = checkProcess2.readAllStandardError();
223 QString acodecList(codecList);
225 QStringList alist = acodecList.split('\n', QString::SkipEmptyParts);
226 for (int i = 0; i < alist.count(); i++) {
227 if (alist.at(i).contains("- ")) result.append(alist.at(i).section("- ", 1).simplified().toLower());
229 m_mltCheck.acodecs_list->addItems(result);
230 KdenliveSettings::setAudiocodecs(result);
231 //kDebug()<<"// FOUND LIST:\n\n"<<m_audioCodecs<<"\n\n++++++++++++++++++++";
233 // Check video codecs
234 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "vcodec=list");
235 if (!checkProcess2.waitForStarted()) {
236 kDebug() << "// Error parsing MLT's avformat codecs";
238 checkProcess2.waitForFinished();
239 QByteArray codecList = checkProcess2.readAllStandardError();
240 QString vcodecList(codecList);
242 QStringList vlist = vcodecList.split('\n', QString::SkipEmptyParts);
243 for (int i = 0; i < vlist.count(); i++) {
244 if (vlist.at(i).contains("- ")) result.append(vlist.at(i).section("- ", 1).simplified().toLower());
246 m_mltCheck.vcodecs_list->addItems(result);
247 KdenliveSettings::setVideocodecs(result);
248 //kDebug()<<"// FOUND LIST:\n\n"<<m_videoCodecs<<"\n\n++++++++++++++++++++";
251 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "f=list");
252 if (!checkProcess2.waitForStarted()) {
253 kDebug() << "// Error parsing MLT's avformat codecs";
255 checkProcess2.waitForFinished();
256 QByteArray codecList = checkProcess2.readAllStandardError();
257 QString vcodecList(codecList);
259 QStringList vlist = vcodecList.split('\n', QString::SkipEmptyParts);
260 for (int i = 0; i < vlist.count(); i++) {
261 if (vlist.at(i).contains("- ")) {
262 QString format = vlist.at(i).section("- ", 1).simplified().toLower();
263 if (format.contains(',')) {
264 QStringList sub = format.split(',', QString::SkipEmptyParts);
265 for (int j = 0; j < sub.count(); j++)
266 result.append(sub.at(j));
267 } else result.append(format);
270 m_mltCheck.formats_list->addItems(result);
271 KdenliveSettings::setSupportedformats(result);
272 //kDebug()<<"// FOUND LIST:\n\n"<<m_videoCodecs<<"\n\n++++++++++++++++++++";
278 // Check MLT dv module
279 QTreeWidgetItem *dvItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("DV module (libdv)"));
280 dvItem->setData(1, Qt::UserRole, i18n("Required to work with dv files if avformat module is not installed"));
281 dvItem->setSizeHint(0, itemSize);
282 if (!result.contains("- libdv")) {
283 dvItem->setIcon(0, m_badIcon);
285 dvItem->setIcon(0, m_okIcon);
288 // Check MLT image format module
289 QTreeWidgetItem *imageItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("QImage module"));
290 imageItem->setData(1, Qt::UserRole, i18n("Required to work with images"));
291 imageItem->setSizeHint(0, itemSize);
292 if (!result.contains("- qimage")) {
293 imageItem->setIcon(0, m_badIcon);
294 imageItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Pixbuf module"));
295 imageItem->setData(1, Qt::UserRole, i18n("Required to work with images"));
296 imageItem->setSizeHint(0, itemSize);
297 if (!result.contains("- pixbuf")) imageItem->setIcon(0, m_badIcon);
298 else imageItem->setIcon(0, m_okIcon);
300 imageItem->setIcon(0, m_okIcon);
305 void Wizard::slotCheckPrograms()
307 QSize itemSize(20, fontMetrics().height() * 2.5);
308 m_check.programList->setColumnWidth(0, 30);
309 m_check.programList->setIconSize(QSize(24, 24));
311 QTreeWidgetItem *item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("FFmpeg & ffplay"));
312 item->setData(1, Qt::UserRole, i18n("Required for webcam capture"));
313 item->setSizeHint(0, itemSize);
314 QString exepath = KStandardDirs::findExe("ffmpeg");
315 if (exepath.isEmpty()) item->setIcon(0, m_badIcon);
316 else if (KStandardDirs::findExe("ffplay").isEmpty()) item->setIcon(0, m_badIcon);
317 else item->setIcon(0, m_okIcon);
320 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("recordmydesktop"));
321 item->setData(1, Qt::UserRole, i18n("Required for screen capture"));
322 item->setSizeHint(0, itemSize);
323 if (KStandardDirs::findExe("recordmydesktop").isEmpty()) item->setIcon(0, m_badIcon);
324 else item->setIcon(0, m_okIcon);
326 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("dvgrab"));
327 item->setData(1, Qt::UserRole, i18n("Required for firewire capture"));
328 item->setSizeHint(0, itemSize);
329 if (KStandardDirs::findExe("dvgrab").isEmpty()) item->setIcon(0, m_badIcon);
330 else item->setIcon(0, m_okIcon);
333 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("dvdauthor"));
334 item->setData(1, Qt::UserRole, i18n("Required for creation of DVD"));
335 item->setSizeHint(0, itemSize);
336 if (KStandardDirs::findExe("dvdauthor").isEmpty()) item->setIcon(0, m_badIcon);
337 else item->setIcon(0, m_okIcon);
340 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("genisoimage or mkisofs"));
341 item->setData(1, Qt::UserRole, i18n("Required for creation of DVD ISO images"));
342 item->setSizeHint(0, itemSize);
343 if (KStandardDirs::findExe("genisoimage").isEmpty()) {
344 // no GenIso, check for mkisofs
345 if (!KStandardDirs::findExe("mkisofs").isEmpty()) {
346 item->setIcon(0, m_okIcon);
347 } else item->setIcon(0, m_badIcon);
348 } else item->setIcon(0, m_okIcon);
350 // set up some default applications
352 if (KdenliveSettings::defaultimageapp().isEmpty()) {
353 program = KStandardDirs::findExe("gimp");
354 if (program.isEmpty()) program = KStandardDirs::findExe("krita");
355 if (!program.isEmpty()) KdenliveSettings::setDefaultimageapp(program);
357 if (KdenliveSettings::defaultaudioapp().isEmpty()) {
358 program = KStandardDirs::findExe("audacity");
359 if (program.isEmpty()) program = KStandardDirs::findExe("traverso");
360 if (!program.isEmpty()) KdenliveSettings::setDefaultaudioapp(program);
362 if (KdenliveSettings::defaultplayerapp().isEmpty()) {
363 KService::Ptr offer = KMimeTypeTrader::self()->preferredService("video/mpeg");
365 KdenliveSettings::setDefaultplayerapp(KRun::binaryName(offer->exec(), true));
369 void Wizard::installExtraMimes(QString baseName, QStringList globs)
371 QString mimefile = baseName;
372 mimefile.replace('/', '-');
373 KMimeType::Ptr mime = KMimeType::mimeType(baseName);
375 kDebug() << "KMimeTypeTrader: mimeType " << baseName << " not found";
377 QStringList extensions = mime->patterns();
378 QString comment = mime->comment();
379 foreach(const QString &glob, globs) {
380 if (!extensions.contains(glob)) extensions << glob;
382 kDebug() << "EXTS: " << extensions;
383 QString packageFileName = KStandardDirs::locateLocal("xdgdata-mime", "packages/" + mimefile + ".xml");
384 kDebug() << "INSTALLING NEW MIME TO: " << packageFileName;
385 QFile packageFile(packageFileName);
386 if (!packageFile.open(QIODevice::WriteOnly)) {
387 kError() << "Couldn't open" << packageFileName << "for writing";
390 QXmlStreamWriter writer(&packageFile);
391 writer.setAutoFormatting(true);
392 writer.writeStartDocument();
394 const QString nsUri = "http://www.freedesktop.org/standards/shared-mime-info";
395 writer.writeDefaultNamespace(nsUri);
396 writer.writeStartElement("mime-info");
397 writer.writeStartElement(nsUri, "mime-type");
398 writer.writeAttribute("type", baseName);
400 if (!comment.isEmpty()) {
401 writer.writeStartElement(nsUri, "comment");
402 writer.writeCharacters(comment);
403 writer.writeEndElement(); // comment
406 foreach(const QString& pattern, extensions) {
407 writer.writeStartElement(nsUri, "glob");
408 writer.writeAttribute("pattern", pattern);
409 writer.writeEndElement(); // glob
412 writer.writeEndElement(); // mime-info
413 writer.writeEndElement(); // mime-type
414 writer.writeEndDocument();
418 void Wizard::runUpdateMimeDatabase()
420 const QString localPackageDir = KStandardDirs::locateLocal("xdgdata-mime", QString());
421 //Q_ASSERT(!localPackageDir.isEmpty());
423 proc << "update-mime-database";
424 proc << localPackageDir;
425 const int exitCode = proc.execute();
427 kWarning() << proc.program() << "exited with error code" << exitCode;
431 void Wizard::slotCheckThumbs()
433 QString pixname = "timeline_vthumbs.png";
434 if (!m_extra.audiothumbs->isChecked() && !m_extra.videothumbs->isChecked()) {
435 pixname = "timeline_nothumbs.png";
436 } else if (m_extra.audiothumbs->isChecked()) {
437 if (m_extra.videothumbs->isChecked())
438 pixname = "timeline_avthumbs.png";
439 else pixname = "timeline_athumbs.png";
442 m_extra.timeline_preview->setPixmap(QPixmap(KStandardDirs::locate("appdata", pixname)));
445 void Wizard::slotCheckStandard()
447 m_standard.profiles_list->clear();
448 QStringList profiles;
449 if (!m_standard.button_hdv->isChecked()) {
451 QMapIterator<QString, QString> i(m_dvProfiles);
452 while (i.hasNext()) {
454 QListWidgetItem *item = new QListWidgetItem(i.key(), m_standard.profiles_list);
455 item->setData(Qt::UserRole, i.value());
458 if (!m_standard.button_dv->isChecked()) {
460 QMapIterator<QString, QString> i(m_hdvProfiles);
461 while (i.hasNext()) {
463 QListWidgetItem *item = new QListWidgetItem(i.key(), m_standard.profiles_list);
464 item->setData(Qt::UserRole, i.value());
467 if (m_standard.button_all->isChecked()) {
468 QMapIterator<QString, QString> i(m_otherProfiles);
469 while (i.hasNext()) {
471 QListWidgetItem *item = new QListWidgetItem(i.key(), m_standard.profiles_list);
472 item->setData(Qt::UserRole, i.value());
474 //m_standard.profiles_list->sortItems();
477 for (int i = 0; i < m_standard.profiles_list->count(); i++) {
478 QListWidgetItem *item = m_standard.profiles_list->item(i);
480 QMap< QString, QString > values = ProfilesDialog::getSettingsFromFile(item->data(Qt::UserRole).toString());
481 const QString infoString = ("<strong>" + i18n("Frame size:") + " </strong>%1x%2<br /><strong>" + i18n("Frame rate:") + " </strong>%3/%4<br /><strong>" + i18n("Pixel aspect ratio:") + "</strong>%5/%6<br /><strong>" + i18n("Display aspect ratio:") + " </strong>%7/%8").arg(values.value("width"), values.value("height"), values.value("frame_rate_num"), values.value("frame_rate_den"), values.value("sample_aspect_num"), values.value("sample_aspect_den"), values.value("display_aspect_num"), values.value("display_aspect_den"));
482 item->setToolTip(infoString);
485 m_standard.profiles_list->setSortingEnabled(true);
486 m_standard.profiles_list->setCurrentRow(0);
489 void Wizard::slotCheckSelectedItem()
491 // Make sure we always have an item highlighted
492 m_standard.profiles_list->setCurrentRow(m_standard.profiles_list->currentRow());
496 void Wizard::adjustSettings()
498 if (m_extra.installmimes->isChecked()) {
500 globs << "*.mts" << "*.m2t" << "*.mod" << "*.ts" << "*.m2ts";
501 installExtraMimes("video/mpeg", globs);
504 installExtraMimes("video/dv", globs);
505 runUpdateMimeDatabase();
507 KdenliveSettings::setAudiothumbnails(m_extra.audiothumbs->isChecked());
508 KdenliveSettings::setVideothumbnails(m_extra.videothumbs->isChecked());
509 KdenliveSettings::setCrashrecovery(m_extra.autosave->isChecked());
510 if (m_standard.profiles_list->currentItem()) {
511 QString selectedProfile = m_standard.profiles_list->currentItem()->data(Qt::UserRole).toString();
512 if (selectedProfile.isEmpty()) selectedProfile = "dv_pal";
513 KdenliveSettings::setDefault_profile(selectedProfile);
515 QString path = m_extra.projectfolder->url().path();
516 if (KStandardDirs::makeDir(path) == false) {
517 kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
518 } else KdenliveSettings::setDefaultprojectfolder(path);
522 void Wizard::slotCheckMlt()
524 QString errorMessage;
525 if (KdenliveSettings::rendererpath().isEmpty()) {
526 errorMessage.append(i18n("Your MLT installation cannot be found. Install MLT and restart Kdenlive.\n"));
528 /*QProcess checkProcess;
529 checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
530 if (!checkProcess.waitForStarted())
531 errorMessage.append(i18n("Error starting MLT's command line player (melt)") + ".\n");
533 checkProcess.waitForFinished();
535 QByteArray result = checkProcess.readAllStandardError();
536 if (!result.contains("- avformat")) errorMessage.append(i18n("MLT's avformat (FFMPEG) module not found. Please check your FFMPEG and MLT install. Kdenlive will not work until this issue is fixed.") + "\n");*/
538 QProcess checkProcess2;
539 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "consumer");
540 if (!checkProcess2.waitForStarted())
541 errorMessage.append(i18n("Error starting MLT's command line player (melt).") + '\n');
543 checkProcess2.waitForFinished();
545 QByteArray result = checkProcess2.readAllStandardError();
546 if (!result.contains("sdl") || !result.contains("sdl_preview")) errorMessage.append(i18n("MLT's SDL module not found. Please check your MLT install. Kdenlive will not work until this issue is fixed.") + '\n');
548 if (!errorMessage.isEmpty()) {
549 errorMessage.prepend(QString("<b>%1</b><br>").arg(i18n("Fatal Error")));
550 QLabel *pix = new QLabel();
551 pix->setPixmap(KIcon("dialog-error").pixmap(30));
552 QLabel *label = new QLabel(errorMessage);
553 label->setWordWrap(true);
554 m_startLayout->addSpacing(40);
555 m_startLayout->addWidget(pix);
556 m_startLayout->addWidget(label);
557 m_systemCheckIsOk = false;
558 button(QWizard::NextButton)->setEnabled(false);
559 } else m_systemCheckIsOk = true;
561 if (m_systemCheckIsOk) checkMltComponents();
565 bool Wizard::isOk() const
567 return m_systemCheckIsOk;
570 void Wizard::slotShowWebInfos()
572 KRun::runUrl(KUrl("http://kdenlive.org/discover/" + QString(version).section(' ', 0, 0)), "text/html", this);
575 #include "wizard.moc"