diff --git a/Stardust/Models/OSKindHelper.cs b/Stardust/Models/OSKindHelper.cs
index fd31f05a..9d0e1116 100644
--- a/Stardust/Models/OSKindHelper.cs
+++ b/Stardust/Models/OSKindHelper.cs
@@ -49,7 +49,7 @@ public static OSKinds ParseWindows(String osName, String osVersion)
if (osName.StartsWithIgnoreCase("Windows 8.1")) return OSKinds.Win81;
if (osName.StartsWithIgnoreCase("Windows 8")) return OSKinds.Win8;
- if (osName.StartsWithIgnoreCase("Windows 7")) return osVersion.StartsWith("6.1.7601") ? OSKinds.Win71 : OSKinds.Win7;
+ if (osName.StartsWithIgnoreCase("Windows 7")) return osVersion.Contains("7601") ? OSKinds.Win71 : OSKinds.Win7;
if (osName.StartsWithIgnoreCase("Windows Vista")) return OSKinds.WinVista;
@@ -64,6 +64,8 @@ public static OSKinds ParseWindows(String osName, String osVersion)
{
if (str.StartsWith("5.")) return OSKinds.Win2003;
if (str.StartsWith("6.")) return OSKinds.Win2008;
+
+ return OSKinds.WinServer;
}
return str switch
@@ -89,34 +91,49 @@ public static OSKinds ParseLinux(String osName, String osVersion)
// 优先识别新系统
if (osName.StartsWithIgnoreCase("Alpine") || osName.EndsWithIgnoreCase("(Alpine)")) return OSKinds.Alpine;
+ if (osName.StartsWithIgnoreCase("Arch")) return OSKinds.ArchLinux;
+
if (osName.StartsWithIgnoreCase("Ubuntu")) return OSKinds.Ubuntu;
if (osName.StartsWithIgnoreCase("Debian")) return OSKinds.Debian;
- if (osName.StartsWithIgnoreCase("Deepin")) return OSKinds.Deepin;
+ if (osName.Contains("Armbian")) return OSKinds.Armbian;
if (osName.StartsWithIgnoreCase("Raspbian")) return OSKinds.Raspbian;
if (osName.StartsWithIgnoreCase("Red Hat")) return OSKinds.RedHat;
if (osName.StartsWithIgnoreCase("CentOS")) return OSKinds.CentOS;
- if (osName.StartsWithIgnoreCase("Alibaba")) return OSKinds.AlibabaLinux;
- if (osName.StartsWithIgnoreCase("Anolis")) return OSKinds.Anolis;
+ if (osName.StartsWithIgnoreCase("Fedora")) return OSKinds.Fedora;
+ if (osName.StartsWithIgnoreCase("Deepin")) return OSKinds.Deepin;
if (osName.StartsWithIgnoreCase("UOS", "UnionTech OS")) return OSKinds.UOS;
- if (osName.StartsWithIgnoreCase("Kylin", "NeoKylin")) return OSKinds.Kylin;
+ if (osName.StartsWithIgnoreCase("Kylin")) return OSKinds.Kylin;
if (osName.StartsWithIgnoreCase("OpenKylin")) return OSKinds.OpenKylin;
+ if (osName.StartsWithIgnoreCase("Loongnix")) return OSKinds.Loongnix;
+ if (osName.StartsWithIgnoreCase("Red Flag")) return OSKinds.RedFlag;
+ if (osName.StartsWithIgnoreCase("StartOS")) return OSKinds.StartOS;
+
+ if (osName.StartsWithIgnoreCase("Alibaba")) return OSKinds.AlibabaLinux;
+ if (osName.StartsWithIgnoreCase("NeoKylin")) return OSKinds.NeoKylin;
+ if (osName.StartsWithIgnoreCase("Anolis")) return OSKinds.Anolis;
if (osName.StartsWithIgnoreCase("Linx")) return OSKinds.Linx;
if (osName.StartsWithIgnoreCase("openEuler")) return OSKinds.OpenEuler;
if (osName.Contains("EulerOS")) return OSKinds.EulerOS;
+ if (osName.StartsWithIgnoreCase("KylinSec")) return OSKinds.KylinSec;
+ if (osName.StartsWithIgnoreCase("PuhuaOS")) return OSKinds.PuhuaOS;
+ if (osName.StartsWithIgnoreCase("FangdeOS")) return OSKinds.FangdeOS;
+ if (osName.StartsWithIgnoreCase("NewStartOS")) return OSKinds.NewStartOS;
+
+ if (osName.StartsWithIgnoreCase("LoongOS")) return OSKinds.LoongOS;
+ if (osName.Contains("OpenWrt")) return OSKinds.OpenWrt;
+ if (osName.Contains("Buildroot")) return OSKinds.Buildroot;
+ if (osName.Contains("Arch")) return OSKinds.ArchLinux;
if (osName.Contains("Linux")) return OSKinds.Linux;
- if (osName.Contains("Buildroot")) return OSKinds.Linux;
- if (osName.Contains("OpenWrt")) return OSKinds.Linux;
- if (osName.Contains("Armbian")) return OSKinds.Debian;
if (osName.StartsWithIgnoreCase("Orange Pi"))
{
- if (osName.EndsWithIgnoreCase("Jammy")) return OSKinds.Ubuntu;
- if (osName.EndsWithIgnoreCase("Bullseye")) return OSKinds.Debian;
+ //if (osName.EndsWithIgnoreCase("Jammy")) return OSKinds.Ubuntu;
+ //if (osName.EndsWithIgnoreCase("Bullseye")) return OSKinds.Debian;
- return OSKinds.Linux;
+ return OSKinds.Armbian;
}
if (Runtime.Linux) return OSKinds.Linux;
diff --git a/Stardust/Models/OSKinds.cs b/Stardust/Models/OSKinds.cs
index 7a26269c..d0bd465c 100644
--- a/Stardust/Models/OSKinds.cs
+++ b/Stardust/Models/OSKinds.cs
@@ -9,6 +9,7 @@ public enum OSKinds
/// SmartOS by NewLife
SmartOS = 40,
+ #region Windows
/// WinXP, 5.1.2600
WinXP = 51,
@@ -48,11 +49,15 @@ public enum OSKinds
/// Win2022
Win2022 = 72,
+ /// Windows服务器
+ WinServer = 70,
+
/// Win10, 10.0.10240
Win10 = 10,
/// Win11, 10.0.22000
Win11 = 11,
+ #endregion
/// Alpine
Alpine = 90,
@@ -60,51 +65,105 @@ public enum OSKinds
/// Linux
Linux = 100,
+ /// ArchLinux
+ ArchLinux = 101,
+
+ /// OpenWrt
+ OpenWrt = 102,
+
+ /// Buildroot
+ Buildroot = 103,
+
+ #region Debian系
/// Ubuntu
Ubuntu = 110,
/// Debian
Debian = 111,
- /// 深度
- Deepin = 112,
+ /// Armbian
+ Armbian = 112,
/// 树莓派
Raspbian = 113,
+ #endregion
+ #region RedHat系
/// 红帽
RedHat = 120,
/// Centos
CentOS = 121,
- /// Alibaba Cloud Linux
- AlibabaLinux = 122,
+ /// Fedora
+ Fedora = 122,
+ #endregion
- /// 龙蜥
- Anolis = 123,
+ #region 国产DEB系
+ /// 深度
+ Deepin = 130,
/// 统信UOS
- UOS = 130,
+ UOS = 131,
- /// 麒麟
- Kylin = 140,
+ /// 银河麒麟
+ Kylin = 132,
/// 优麒麟
- OpenKylin = 141,
+ OpenKylin = 133,
+
+ /// 龙芯操作系统
+ Loongnix = 134,
+
+ /// 红旗Linux
+ RedFlag = 135,
+
+ /// 起点操作系统
+ StartOS = 136,
+ #endregion
+
+ #region 国产RPM系
+ /// Alibaba Cloud Linux
+ AlibabaLinux = 140,
+
+ /// 中标麒麟
+ NeoKylin = 141,
+
+ /// 龙蜥
+ Anolis = 142,
/// 凝思
- Linx = 150,
+ Linx = 143,
/// 开源欧拉
- OpenEuler = 160,
+ OpenEuler = 144,
/// 欧拉
- EulerOS = 161,
+ EulerOS = 145,
+
+ /// 麒麟信安
+ KylinSec = 146,
+
+ /// 普华操作系统
+ PuhuaOS = 147,
+
+ /// 方德操作系统
+ FangdeOS = 148,
+
+ /// 新支点操作系统
+ NewStartOS = 149,
+ #endregion
+
+ #region 国产独立
+ /// 龙芯嵌入式OS。具备精简、高效、实时特征的工控类操作系统
+ /// 基于通用Linux内核,利用RT-Linux技术实现实时性
+ LoongOS = 160,
+
+ #endregion
/// MacOS
- MacOSX = 200,
+ MacOSX = 400,
/// Android
- Android = 300,
+ Android = 500,
}
\ No newline at end of file