Developing Ameko

This section will cover developing for the Ameko application itself.

Building

I would strongly recommend using JetBrains Rider or Visual Studio for development, especially if you plan on contributing to the GUI.

C#

  • Make sure you have the .net SDK installed.
  • Run dotnet restore to collect the required NuGet packages.
  • To build, either click the Build button in your IDE, or run dotnet build.
  • To test, either click the Run Tests button in your IDE, or run dotnet test.
  • To build a release binary, use dotnet publish.
  • The final output for debugging and running is the Ameko project.

Zig

  • Make sure you have Zig installed.
  • You may need to build FFMS2 and libass yourself.
  • To build, run zig build. To run the main method, use zig build run.
  • To test, run zig test.
  • To build a release binary, use zig build --release=safe.

Project Components

The Ameko project is currently comprised of four components working in tandem:

  • AssCS: The backbone of the operation. AssCS is responsible for everything involving the subtitle document itself. Managing events and styles, parsing tags, and reading/writing files are just part of what AssCS does. Eventually, AssCS will likely be split into its own project so anyone can use it for their C# projects.
  • Holo: The middleware layer, primarily linking the GUI to AssCS and Mizuki. It also manages the Package Manager, projects, configuration, and pretty much everything that's not immediately GUI-related.
  • Mizuki: A high-performance interop library and Holo's first A/V plugin. Mizuki facilitates communication between Holo and A/V libraries like FFMS and libass. By doing most of the work in a low-level language like Zig, Mizuki is able to reduce the amount of calls across the managed-unmanaged border.
  • Ameko: Despite being the namesake of the project, effort has been made to make Ameko a thin GUI. Theoretically, one should theoretically be able to build their own GUI and plug it right into Holo. Ameko's primary purpose is to facilitate data transfer between the user and Holo.

Contributing

Thank you for your interest in contributing to Ameko!

Code

Before submitting a pull request, please make sure your code is properly formatted:

  • C# code is automatically formatted using CSharpier as part of the build process.
  • Zig code should be formatted using zig fmt.

Additionally, there are some testing guidelines:

  • Unit tests are required for contributions to the Holo and AssCS projects.
  • Tests are optional, but highly appreciated, for Ameko's ViewModels and for Mizuki.

Localization

If you are interested in localizing Ameko into your language (Thank you!), please see the Crowdin project. Note: Ameko is localized via the ResX format, which is quite limited, such as lacking support for plurals.

© 2024 9volt.