Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ExtensionInstaller/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
14 changes: 13 additions & 1 deletion TuneLab/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}
16 changes: 8 additions & 8 deletions TuneLab/TuneLab.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.2.5" />
<PackageReference Include="Avalonia.Svg.Skia" Version="11.2.0.2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.5" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.5" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.5" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.5" />
<PackageReference Include="Avalonia" Version="11.3.15" />
<PackageReference Include="Avalonia.Svg.Skia" Version="11.3.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.15" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.15" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.3.8" />
<PackageReference Include="Avalonia.Desktop" Version="11.3.15" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.5" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.3.15" />
<PackageReference Include="BunLabs.NAudio.Flac" Version="2.0.1" />
<PackageReference Include="csharp-kana" Version="1.0.1" />
<PackageReference Include="csharp-pinyin" Version="1.0.1" />
Expand All @@ -41,7 +41,7 @@
<PackageReference Include="NLayer.NAudioSupport" Version="1.4.0" />
<PackageReference Include="PinYinConverterCore" Version="1.0.2" />
<PackageReference Include="ppy.SDL2-CS" Version="1.0.741-alpha" />
<PackageReference Include="Svg.Skia" Version="2.0.0.4" />
<PackageReference Include="Svg.Skia" Version="3.0.2" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="Tomlyn" Version="0.18.0" />
Expand Down
Loading