From 929a035f96ed1fbeeae2515f7d54fd9b004af4f6 Mon Sep 17 00:00:00 2001 From: Lenny McLennington Date: Sun, 13 Feb 2022 18:47:54 +0000 Subject: [PATCH] Revert "make wsl work" This reverts commit 5779f20fa1633577889b7bda839c5486eb2ba922. --- launcher/Application.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 6bf090e1..a3d6216e 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -192,6 +192,27 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) #endif 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 this->setQuitOnLastWindowClosed(false);