summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2020-05-28 23:17:50 +0200
committerPetr Mrázek <peterix@gmail.com>2020-05-28 23:17:50 +0200
commitba6a97557a0d90d77e9eba560931414e39042447 (patch)
tree917bc84eb7eb8b9bb34cb891d0a670774acd335b /application
parente7f79c90764e03b3ba41af8352bdd167cd1db2b2 (diff)
downloadMultiMC-ba6a97557a0d90d77e9eba560931414e39042447.tar
MultiMC-ba6a97557a0d90d77e9eba560931414e39042447.tar.gz
MultiMC-ba6a97557a0d90d77e9eba560931414e39042447.tar.lz
MultiMC-ba6a97557a0d90d77e9eba560931414e39042447.tar.xz
MultiMC-ba6a97557a0d90d77e9eba560931414e39042447.zip
NOISSUE prevent evil from winning
Diffstat (limited to 'application')
-rw-r--r--application/MultiMC.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 393ea046..6ab3ad26 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -146,6 +146,28 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
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) ||
+ true
+ ) {
+ showFatalErrorMessage(
+ "Unsupported system detected!",
+ "It seems you are supporting the exploitation of Free Software.\n\n"
+ "You smell bad and you should feel bad."
+ );
+ return;
+ }
+ }
+ }
+#endif
+
// Don't quit on hiding the last window
this->setQuitOnLastWindowClosed(false);