Revert "make wsl work"

This reverts commit 5779f20fa1.
This commit is contained in:
Lenny McLennington 2022-02-13 18:47:54 +00:00
parent 5779f20fa1
commit 929a035f96
No known key found for this signature in database
GPG Key ID: F0467078ECA45FCB

View File

@ -192,6 +192,27 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
#endif #endif
startTime = QDateTime::currentDateTime(); startTime = QDateTime::currentDateTime();
#ifdef Q_OS_LINUX
{
QFile osrelease("/proc/sys/kernel/osrelease");
if (osrelease.open(QFile::ReadOnly | QFile::Text)) {
QTextStream in(&osrelease);
auto contents = in.readAll();
if(
contents.contains("WSL", Qt::CaseInsensitive) ||
contents.contains("Microsoft", Qt::CaseInsensitive)
) {
showFatalErrorMessage(
"Unsupported system detected!",
"Linux-on-Windows distributions are not supported.\n\n"
"Please use the Windows binary when playing on Windows."
);
return;
}
}
}
#endif
// Don't quit on hiding the last window // Don't quit on hiding the last window
this->setQuitOnLastWindowClosed(false); this->setQuitOnLastWindowClosed(false);