summaryrefslogtreecommitdiff
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
parentc9532a2e3002c11bc176640dacf1f9b10d99f941 (diff)
downloadrockbox-fa84c2fdbf5d24109e2671a5acae16522f71db68.tar.gz
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
-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)
83 this->setWindowIcon(windowIcon); 83 this->setWindowIcon(windowIcon);
84#endif 84#endif
85 85
86#if defined(Q_OS_WIN32)
87 long ret;
88 HKEY hk;
89 ret = RegOpenKeyEx(HKEY_CURRENT_USER, _TEXT("Software\\Wine"),
90 0, KEY_QUERY_VALUE, &hk);
91 if(ret == ERROR_SUCCESS) {
92 QMessageBox::warning(this, tr("Wine detected!"),
93 tr("It seems you are trying to run this program under Wine. "
94 "Please don't do this, running under Wine will fail. "
95 "Use the native Linux binary instead."),
96 QMessageBox::Ok, QMessageBox::Ok);
97 qDebug() << "[RbUtil] WINE DETECTED!";
98 RegCloseKey(hk);
99 }
100#endif
86 downloadInfo(); 101 downloadInfo();
87 102
88 m_gotInfo = false; 103 m_gotInfo = false;