From dbe4a73e87a75244d4bf8d66600fe080433bdc57 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Fri, 15 May 2026 08:45:55 +0900 Subject: [PATCH 1/2] feat: upgrade avalonia for minimal MacOS Support --- TuneLab/Program.cs | 14 +++++++++++++- TuneLab/TuneLab.csproj | 16 ++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/TuneLab/Program.cs b/TuneLab/Program.cs index ca8f53e9..55321c86 100644 --- a/TuneLab/Program.cs +++ b/TuneLab/Program.cs @@ -85,12 +85,24 @@ public static AppBuilder BuildAvaloniaApp() .UseReactiveUI() .With(new FontManagerOptions() { + DefaultFamilyName = Settings.Language.Value == "ja-JP" ? JapaneseUIFontFamilyName() : null, FontFallbacks = [ (Settings.Language.Value == "ja-JP") ? - new FontFallback() { FontFamily = "Yu Gothic UI" } : + OperatingSystem.IsWindows() ? + new FontFallback() { FontFamily = "Yu Gothic UI" } : + OperatingSystem.IsMacOS() ? + new FontFallback() { FontFamily = JapaneseUIFontFamilyName() } : + new FontFallback() { FontFamily = "Noto Sans CJK JP" } : new FontFallback() { FontFamily = "Microsoft YaHei" }, ] }); } + + static string JapaneseUIFontFamilyName() + { + return OperatingSystem.IsWindows() ? "Yu Gothic UI" : + OperatingSystem.IsMacOS() ? "Hiragino Sans" : + "Noto Sans CJK JP"; + } } diff --git a/TuneLab/TuneLab.csproj b/TuneLab/TuneLab.csproj index b6debf39..bc422b8a 100644 --- a/TuneLab/TuneLab.csproj +++ b/TuneLab/TuneLab.csproj @@ -22,14 +22,14 @@ - - - - - - + + + + + + - + @@ -41,7 +41,7 @@ - + From b49a4733982d0511ff3b31e6b97aab996b687931 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Fri, 15 May 2026 21:41:15 +0900 Subject: [PATCH 2/2] fix: use TuneLab for executable on non-windows platform --- ExtensionInstaller/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ExtensionInstaller/Program.cs b/ExtensionInstaller/Program.cs index 38f8f727..ad108865 100644 --- a/ExtensionInstaller/Program.cs +++ b/ExtensionInstaller/Program.cs @@ -124,7 +124,10 @@ static void Main(string[] args) Console.WriteLine(name + " has been successfully installed!\n"); } - if (restart) Process.Start(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TuneLab.exe")); + if (restart) { + var tunelabExeName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "TuneLab.exe" : "TuneLab"; + Process.Start(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, tunelabExeName)); + } } catch (Exception ex) {