Contributions and questions are always welcome! Here's just a couple of things to keep in mind:
- Remember to search the GitHub Issues before making a bug report or feature request.
- Please open an issue to discuss changes before creating a pull request.
OneLauncher uses uv for dependency management. Run uv run onelauncher in the root folder of this repository to install and start OneLauncher. Alternatively, Nix can be used.
For game patching support, extra C code must be compiled with mingw-w64. Run make -C src/run_patch_client && mv src/run_patch_client/run_ptch_client.exe src/onelauncher/external/. Your mingw-w64 installation must have support for i686 builds.
innoextract is needed for game installation support.
OneLauncher comes with a Nix flake for easily replicating the standard development environment. It can be used with direnv or the nix develop command.
The compiled builds can be tested on NixOS with nix run .#fhs-run build/out/onelauncher.bin. Similarly, nix run .#fhs-run onelauncher can be used while in the development shell to start OneLauncher from source with support for the WINE binaries it downloads.
Build by running uv run python -m build in the project's root directory. This will output everything to "build/out".
Individual scripts can also be called to skip parts of the build or pass arguments to the build tool.
The .NET CLI is required for building the Windows installer.
OneLauncher uses Weblate for translations. You can make an account and contribute translations through their site. See the project page here.
All code is strictly type checked with Mypy and both linted and formatted with Ruff. Pytest unit tests are encouraged.
User interfaces are defined in .ui files that can be visually edited in pyside6-designer. You can use the command onelauncher designer to launch pyside6-designer with OneLauncher's plugins enabled.
UI files must be compiled into Python to be used in OneLauncher. This can be done with pyside6-uic src/onelauncher/ui/example_window.ui -o src/onelauncher/ui/example_window_uic.py, replacing "example_window" with the one being updated.
OneLauncher uses a system similar to Tailwind CSS for styling UIs responsively.
Here's how it works:
- The dynamic property
qssClassis added to the widget that needs to be styled. This property should always be of the typeStringList. - Each string in
qssClassis a "class" that will affect the widget's styling. This works by selecting for them in dynamically generated Qt Style Sheets. - The classes are mainly used to set sizes and margins relative to the system font size. Changes can be previewed live in pyside6-designer.
- See the Tailwind Docs for specific class names. The currently supported types are padding, margin, width, min-width, max-width, height, min-height, max-height, font-size, and icon-size.