mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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
This commit is contained in:
parent
c9532a2e30
commit
fa84c2fdbf
1 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue