From 3f8daf26079eaa1fa397a467e9ff66ee31d31128 Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 Date: Wed, 3 Dec 2025 21:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=9B=E5=BC=83=E5=AF=B9Windows=E7=9A=84?= =?UTF-8?q?=E6=8E=A2=E6=B5=8B=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=B8=A2=E8=BF=9B?= =?UTF-8?q?Unsupported=E9=87=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- language.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/language.cpp b/language.cpp index 69c17d7..1f4a7d7 100644 --- a/language.cpp +++ b/language.cpp @@ -27,7 +27,6 @@ LC_ALL="zh_CN.UTF-8" enum class System{ WSL, - Windows, Linux, Unsupported }; enum class User{ @@ -58,9 +57,6 @@ auto GetCurrentSystemType(){ if (getenv("WSL_INTEROP") != nullptr){ return System::WSL; } #pragma warning(suppress : 4996) - if (getenv("OS") != nullptr){ - return System::Windows;} - #pragma warning(suppress : 4996) else if (getenv("HOME") != nullptr){ return System::Linux;} else{ @@ -158,10 +154,7 @@ auto Debian(){ int main() { auto OSType = GetCurrentSystemType(); - if (OSType == System::Windows){ - cout << "Windows请在“设置”应用中调整语言(❁´◡`❁)。" << endl; - throw runtime_error("不支持的操作系统"); } - else if (OSType == System::WSL) { + if (OSType == System::WSL) { auto OS = GetCurrentSystem(); cout << "检测到您使用的系统为:" << OS << endl; cout << "并且该系统工作于WSL环境" << endl;