Skip to content

Commit 8f9bc3d

Browse files
authored
Incorporate feedback from Flathub review (#559)
1 parent f5e0e20 commit 8f9bc3d

File tree

17 files changed

+341
-15
lines changed

17 files changed

+341
-15
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Desktop Entry]
2+
Name=Serial Loops
3+
Comment=Editor for Suzumiya Haruhi no Chokuretsu
4+
Exec=SerialLoops
5+
Icon=club.haroohie.SerialLoops
6+
Terminal=false
7+
Type=Application
8+
Categories=Development;GUIDesigner
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop">
3+
<id>club.haroohie.SerialLoops</id>
4+
<metadata_license>CC0-1.0</metadata_license>
5+
<project_license>GPL-3.0-or-later</project_license>
6+
<name>Serial Loops</name>
7+
<launchable type="desktop-id">club.haroohie.SerialLoops.desktop</launchable>
8+
<summary>Editor for Suzumiya Haruhi no Chokuretsu</summary>
9+
<description>
10+
<p>
11+
Serial Loops is a full-fledged editor for the Nintendo DS game Suzumiya Haruhi no Chokuretsu (The Series of Haruhi Suzumiya).
12+
In its current state, it allows you to edit nearly everything about the game, and more is planned for the future. Please check
13+
our documentation on our website for more information on how to use it!
14+
</p>
15+
<ul>
16+
<li>Fully edit the game's scripts, completely rewriting your own Haruhi visual novel with a powerful preview feature!</li>
17+
<li>Completely change the game's scenario, moving events around in the order you'd like them to occur!</li>
18+
<li>Replace the game's graphics, including backgrounds, CGs, character sprites, chibis, and more!</li>
19+
<li>Edit the game's soundtrack, swapping out background music and voice lines! (SFX coming in a future release!)</li>
20+
<li>Edit character nameplates, topics, UI text, tutorial mappings, and dialogue colors!</li>
21+
<li>Apply pre-written assembly hacks for even greater control of the game!</li>
22+
<li>Partial editing of group selections, puzzles, and chess puzzles, and viewable maps!</li>
23+
<li>A full save editor for editing save games as well!</li>
24+
</ul>
25+
</description>
26+
<branding>
27+
<color type="primary" scheme_preference="light">#9accfe</color>
28+
<color type="primary" scheme_preference="dark">#042058</color>
29+
</branding>
30+
<screenshots>
31+
<screenshot>
32+
<screenshot type="default">
33+
<caption>Serial Loops script editor</caption>
34+
<image>https://raw.githubusercontent.com/haroohie-club/SerialLoops/0.3.3/install/linux/flatpak/screenshots/script_editor.png</image>
35+
</screenshot>
36+
</screenshot>
37+
<screenshot type="default">
38+
<caption>Serial Loops startup screen</caption>
39+
<image>https://raw.githubusercontent.com/haroohie-club/SerialLoops/0.3.3/install/linux/flatpak/screenshots/main_screen.png</image>
40+
</screenshot>
41+
<screenshot>
42+
<screenshot type="default">
43+
<caption>Serial Loops map editor</caption>
44+
<image>https://raw.githubusercontent.com/haroohie-club/SerialLoops/0.3.3/install/linux/flatpak/screenshots/map_editor.png</image>
45+
</screenshot>
46+
</screenshot>
47+
</screenshots>
48+
<developer_name>The Haroohie Translation Club</developer_name>
49+
<url type="homepage">https://haroohie.club/chokuretsu/serial-loops</url>
50+
<content_rating type="oars-1.1" />
51+
<releases>
52+
<release version="v0.3.3" date="2025-08-20">
53+
<description>
54+
<p>
55+
We removed our dependencies on devkitARM and make and have switched to using LLVM and ninja. This makes it easier
56+
to use Serial Loops on all platforms as it significantly easier to install and use these dependencies.
57+
</p>
58+
<p>This is also our initial release on Flathub!</p>
59+
</description>
60+
</release>
61+
</releases>
62+
</component>

src/SerialLoops.Lib/ConfigUser.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class ConfigUser
4141
public bool CheckForUpdates { get; set; }
4242
public bool PreReleaseChannel { get; set; }
4343
public string DisplayFont { get; set; }
44+
public bool FirstTimeFlatpak { get; set; }
4445

4546
public void Save(ILogger log)
4647
{
@@ -72,16 +73,16 @@ public void InitializeHacks(ILogger log)
7273

7374
// Pull in new hacks in case we've updated the program with more
7475
List<AsmHack> builtinHacks = JsonSerializer.Deserialize<List<AsmHack>>(File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Sources", "hacks.json")));
75-
IEnumerable<AsmHack> missingHacks = builtinHacks.Where(h => !Hacks.Contains(h));
76-
if (missingHacks.Any())
76+
AsmHack[] missingHacks = builtinHacks.Where(h => !Hacks.Contains(h)).ToArray();
77+
if (missingHacks.Length != 0)
7778
{
7879
IO.CopyFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Sources", "Hacks"), HacksDirectory, log);
7980
Hacks.AddRange(missingHacks);
8081
File.WriteAllText(Path.Combine(HacksDirectory, "hacks.json"), JsonSerializer.Serialize(Hacks));
8182
}
8283

83-
IEnumerable<AsmHack> updatedHacks = builtinHacks.Where(h => !Hacks.FirstOrDefault(o => h.Name == o.Name)?.DeepEquals(h) ?? false);
84-
if (updatedHacks.Any())
84+
AsmHack[] updatedHacks = builtinHacks.Where(h => !Hacks.FirstOrDefault(o => h.Name == o.Name)?.DeepEquals(h) ?? false).ToArray();
85+
if (updatedHacks.Length != 0)
8586
{
8687
IO.CopyFiles(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Sources", "Hacks"), HacksDirectory, log);
8788
foreach (AsmHack updatedHack in updatedHacks)

src/SerialLoops.Lib/EnvironmentVariables.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ public static class EnvironmentVariables
88
public const string BundledEmulator = "SL_BUNDLED_EMULATOR";
99
public const string StoreSysConfig = "SL_STORE_SYS_CONFIG";
1010
public const string UseUpdater = "SL_USE_UPDATER";
11+
public const string Flatpak = "SL_FLATPAK";
1112
}

src/SerialLoops.Lib/Factories/ConfigFactory.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ public static ConfigUser GetDefault(ConfigSystem sysConfig, ILogger log)
244244
RemoveMissingProjects = false,
245245
CheckForUpdates = true,
246246
PreReleaseChannel = false,
247+
FirstTimeFlatpak = (Environment.GetEnvironmentVariable(EnvironmentVariables.Flatpak) ?? bool.FalseString)
248+
.Equals(bool.TrueString, StringComparison.OrdinalIgnoreCase),
247249
};
248250
}
249251
}

src/SerialLoops/App.axaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml" />
4141
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml" />
4242
<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml" />
43+
<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml" />
4344

4445
<!-- Toolbar styling -->
4546
<Style Selector="toolbar|Toolbar">
@@ -173,6 +174,10 @@
173174
<Setter Property="FontSize" Value="24" />
174175
<Setter Property="FontWeight" Value="Bold" />
175176
</Style>
177+
<Style Selector="TextBlock.h3">
178+
<Setter Property="FontSize" Value="20" />
179+
<Setter Property="FontWeight" Value="Bold" />
180+
</Style>
176181
<Style Selector="TextBlock.b">
177182
<Setter Property="FontWeight" Value="Bold" />
178183
</Style>

src/SerialLoops/Assets/Strings.Designer.cs

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/SerialLoops/Assets/Strings.resx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3726,4 +3726,31 @@ item in the dropdown!</value>
37263726
<data name="ObjcopyExitedWithFailureMessage" xml:space="preserve">
37273727
<value>llvm-objcopy exited with code {0}</value>
37283728
</data>
3729+
<data name="SandboxedLogLocationMboxTitle" xml:space="preserve">
3730+
<value>Sandboxed App Cannot Launch Log Viewer</value>
3731+
</data>
3732+
<data name="SandboxedLogLocationMboxMessage" xml:space="preserve">
3733+
<value>Application is sandboxed so logs cannot be directly opened. Logs are located in the Flatpak data directory, which is typically ~/.var/app/club.haroohie.SerialLoops/SerialLoops</value>
3734+
</data>
3735+
<data name="LogViewerTitleFormatString" xml:space="preserve">
3736+
<value>{0} - Log Viewer</value>
3737+
</data>
3738+
<data name="CrashLogName" xml:space="preserve">
3739+
<value>Crash Log</value>
3740+
</data>
3741+
<data name="LogName" xml:space="preserve">
3742+
<value>Serial Loops Log</value>
3743+
</data>
3744+
<data name="FirstTimeFlatpakTitleMessage" xml:space="preserve">
3745+
<value>Looking for your projects?</value>
3746+
</data>
3747+
<data name="FirstTimeFlatpakMainMessage" xml:space="preserve">
3748+
<value>The Flatpak version of Serial Loops is sandboxed, so if you used a previous version, your projects won't show up here. Click the button below to import them!</value>
3749+
</data>
3750+
<data name="FirstTimeFlatpakButton" xml:space="preserve">
3751+
<value>Import Projects</value>
3752+
</data>
3753+
<data name="FirstTimeFlatpakImportProjectsFolder" xml:space="preserve">
3754+
<value />
3755+
</data>
37293756
</root>

src/SerialLoops/Program.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
using System;
2+
using System.Reflection;
3+
using System.Runtime.InteropServices;
24
using Avalonia;
35
using Avalonia.ReactiveUI;
6+
using SerialLoops.Lib;
47
using SerialLoops.Utility;
58

69
namespace SerialLoops;
@@ -15,6 +18,13 @@ public static int Main(string[] args)
1518
{
1619
try
1720
{
21+
#if !WINDOWS
22+
if ((Environment.GetEnvironmentVariable(EnvironmentVariables.Flatpak) ?? bool.FalseString).Equals(
23+
bool.TrueString, StringComparison.OrdinalIgnoreCase))
24+
{
25+
NativeLibrary.SetDllImportResolver(Assembly.GetAssembly(typeof(NAudio.Sdl2.WaveInSdl))!, DllImportResolver);
26+
}
27+
#endif
1828
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
1929
}
2030
catch (Exception ex)
@@ -34,4 +44,11 @@ public static AppBuilder BuildAvaloniaApp()
3444
.UseReactiveUI()
3545
.WithInterFont()
3646
.LogToTrace();
47+
48+
private static IntPtr DllImportResolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
49+
{
50+
return libraryName.Equals("SDL2") ?
51+
// Flatpak runtime doesn't have libSDL2.so, so we make do
52+
NativeLibrary.Load("libSDL2-2.0.so.0", assembly, searchPath) : IntPtr.Zero;
53+
}
3754
}

src/SerialLoops/SerialLoops.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494

9595
<ItemGroup>
9696
<PackageReference Include="Avalonia" Version="11.3.3" />
97+
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.3.0" />
9798
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.3" />
9899
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.5" />
99100
<PackageReference Include="Avalonia.Controls.PanAndZoom" Version="11.3.0" />

0 commit comments

Comments
 (0)