settings.setValue(autoUpdateAttemptedC, true);
settings.sync();
qCInfo(lcUpdater) << "Running updater" << updateFile;
- QProcess::startDetached(updateFile, QStringList() << "/S"
- << "/launch");
+
+ if(updateFile.endsWith(".exe")) {
+ QProcess::startDetached(updateFile, QStringList() << "/S"
+ << "/launch");
+ } else {
+ QDesktopServices::openUrl(QUrl("file:///" + updateFile, QUrl::TolerantMode));
+ }
}
void OCUpdater::checkForUpdate()
urlQuery.addQueryItem(QLatin1String("sparkle"), QLatin1String("true"));
#endif
+#if defined(Q_OS_WIN)
+ urlQuery.addQueryItem(QLatin1String("msi"), QLatin1String("true"));
+#endif
+
updateBaseUrl.setQuery(urlQuery);
return updateBaseUrl;