diff --git a/TODO b/TODO
index 1f280792f..8d9efd9c2 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,7 @@
⚫计划中
⚫2024.8.8
+√ 修复macos启动问题
√ 修改文件打开方式
√ 添加窗口状态保存
diff --git a/src/ColorMC.Core/CoreMain.cs b/src/ColorMC.Core/CoreMain.cs
index dd9b13329..8eb19194d 100644
--- a/src/ColorMC.Core/CoreMain.cs
+++ b/src/ColorMC.Core/CoreMain.cs
@@ -217,6 +217,8 @@ public static void Init(CoreInitArg arg)
WebClient.Init();
Logs.Info(LanguageHelper.Get("Core.Info1"));
+ Logs.Info(SystemInfo.SystemName);
+ Logs.Info(SystemInfo.System);
}
///
diff --git a/src/ColorMC.Core/Game/GameLaunch.cs b/src/ColorMC.Core/Game/GameLaunch.cs
index 19ff0b883..04240067b 100644
--- a/src/ColorMC.Core/Game/GameLaunch.cs
+++ b/src/ColorMC.Core/Game/GameLaunch.cs
@@ -273,9 +273,10 @@ public static List MakeV2JvmArg(this GameSettingObj obj)
{
arg.Add(item2!);
}
- else if (obj2.value is List list)
+ else if (obj2.value is JArray list)
{
- arg.AddRange(list);
+ var list1 = list.ToObject>()!;
+ arg.AddRange(list1);
}
}
}
diff --git a/src/ColorMC.Core/Helpers/CheckHelpers.cs b/src/ColorMC.Core/Helpers/CheckHelpers.cs
index f7f9fa8a2..fac169714 100644
--- a/src/ColorMC.Core/Helpers/CheckHelpers.cs
+++ b/src/ColorMC.Core/Helpers/CheckHelpers.cs
@@ -21,7 +21,7 @@ public static class CheckHelpers
///
public static bool CheckAllow(List list)
{
- bool download = true;
+ bool allow = true;
if (list == null)
{
return true;
@@ -34,57 +34,69 @@ public static bool CheckAllow(List list)
{
if (item2.os == null)
{
- download = true;
+ allow = true;
continue;
}
var os = item2.os.name;
if (os == "osx" && SystemInfo.Os == OsType.MacOS)
{
- download = true;
+ allow = true;
}
else if (os == "windows" && SystemInfo.Os == OsType.Windows)
{
- download = true;
+ allow = true;
}
else if (os == "linux" && SystemInfo.Os == OsType.Linux)
{
- download = true;
+ allow = true;
}
else
{
- download = false;
+ allow = false;
+ }
+
+ var arch = item2.os.arch;
+ if (arch == "x86" && !SystemInfo.IsArm)
+ {
+ allow = true;
}
}
else if (action == "disallow")
{
if (item2.os == null)
{
- download = false;
+ allow = false;
continue;
}
var os = item2.os.name;
if (os == "osx" && SystemInfo.Os == OsType.MacOS)
{
- download = false;
+ allow = false;
}
else if (os == "windows" && SystemInfo.Os == OsType.Windows)
{
- download = false;
+ allow = false;
}
else if (os == "linux" && SystemInfo.Os == OsType.Linux)
{
- download = false;
+ allow = false;
}
else
{
- download = true;
+ allow = true;
+ }
+
+ var arch = item2.os.arch;
+ if (arch == "x86" && !SystemInfo.IsArm)
+ {
+ allow = false;
}
}
}
- return download;
+ return allow;
}
public static bool IsGameVersionV2(this GameSettingObj obj)
diff --git a/src/ColorMC.Core/Objs/Minecraft/GameArgObj.cs b/src/ColorMC.Core/Objs/Minecraft/GameArgObj.cs
index a03853b47..da0f18e58 100644
--- a/src/ColorMC.Core/Objs/Minecraft/GameArgObj.cs
+++ b/src/ColorMC.Core/Objs/Minecraft/GameArgObj.cs
@@ -53,6 +53,7 @@ public record OS
{
public string name { get; set; }
public string version { get; set; }
+ public string arch { get; set; }
}
public string action { get; set; }
public OS os { get; set; }
diff --git a/src/ColorMC.Gui/App.axaml.cs b/src/ColorMC.Gui/App.axaml.cs
index 822363ddd..110d12567 100644
--- a/src/ColorMC.Gui/App.axaml.cs
+++ b/src/ColorMC.Gui/App.axaml.cs
@@ -40,8 +40,6 @@ public App()
}
}
- //public static TopLevel? TopLevel { get; set; }
-
public static readonly SelfCrossFade CrossFade300 = new(TimeSpan.FromMilliseconds(300));
public static readonly SelfCrossFade CrossFade200 = new(TimeSpan.FromMilliseconds(200));
public static readonly SelfCrossFade CrossFade100 = new(TimeSpan.FromMilliseconds(100));