summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-04-04 21:08:17 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-04-04 21:08:17 +0000
commitfa84c2fdbf5d24109e2671a5acae16522f71db68 (patch)
treefaf5cf0c7362c71ce667f2e3ec6d07ee74e68614 /rbutil
parentc9532a2e3002c11bc176640dacf1f9b10d99f941 (diff)
downloadrockbox-fa84c2fdbf5d24109e2671a5acae16522f71db68.tar.gz
rockbox-fa84c2fdbf5d24109e2671a5acae16522f71db68.tar.bz2
rockbox-fa84c2fdbf5d24109e2671a5acae16522f71db68.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp15
1 files changed, 15 insertions, 0 deletions
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;