From fa84c2fdbf5d24109e2671a5acae16522f71db68 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 4 Apr 2010 21:08:17 +0000 Subject: Try to detect Wine. Make the Windoes binary try to detect if it's running under Wine. Display a warning if so, as Rockbox Utility is likely to fail in all kind of strange ways when running on Wine. We do provide Linux binaries, so it's not even a good idea to try running under Wine at all. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25471 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/rbutilqt.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'rbutil') diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 56d66115c1..6754e8f933 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -83,6 +83,21 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) this->setWindowIcon(windowIcon); #endif +#if defined(Q_OS_WIN32) + long ret; + HKEY hk; + ret = RegOpenKeyEx(HKEY_CURRENT_USER, _TEXT("Software\\Wine"), + 0, KEY_QUERY_VALUE, &hk); + if(ret == ERROR_SUCCESS) { + QMessageBox::warning(this, tr("Wine detected!"), + tr("It seems you are trying to run this program under Wine. " + "Please don't do this, running under Wine will fail. " + "Use the native Linux binary instead."), + QMessageBox::Ok, QMessageBox::Ok); + qDebug() << "[RbUtil] WINE DETECTED!"; + RegCloseKey(hk); + } +#endif downloadInfo(); m_gotInfo = false; -- cgit