CurseForge client for Linux
Go to file
Tine Jozelj 33b6f9b0e3
CI / Rustfmt (push) Failing after 58s Details
CI / Flatpak (push) Failing after 7m32s Details
ci: try to make it work
2024-01-27 10:20:37 +01:00
.github/workflows ci: try to make it work 2024-01-27 10:20:37 +01:00
build-aux feat: intial work 2023-12-21 12:30:30 +01:00
data feat: card design improvements 2024-01-11 21:36:44 +01:00
hooks Init with GTK Rust Template 2023-12-21 10:38:30 +01:00
po Init with GTK Rust Template 2023-12-21 10:38:30 +01:00
src feat: card design improvements 2024-01-11 21:36:44 +01:00
.editorconfig Init with GTK Rust Template 2023-12-21 10:38:30 +01:00
.gitignore ci: try to make it work 2024-01-27 10:20:37 +01:00
.gitlab-ci.yml Init with GTK Rust Template 2023-12-21 10:38:30 +01:00
COPYING feat: intial work 2023-12-21 12:30:30 +01:00
Cargo.lock feat: image loading on different thread 2024-01-11 19:14:06 +01:00
Cargo.toml feat: image loading on different thread 2024-01-11 19:14:06 +01:00
README.md Init with GTK Rust Template 2023-12-21 10:38:30 +01:00
meson.build feat: intial work 2023-12-21 12:30:30 +01:00
meson_options.txt Init with GTK Rust Template 2023-12-21 10:38:30 +01:00

README.md

GTK + Rust + Meson + Flatpak = <3

A boilerplate template to get started with GTK, Rust, Meson, Flatpak made for GNOME. It can be adapted for other desktop environments like elementary.

![Main window](data/resources/screenshots/screenshot1.png "Main window")

What does it contains?

  • A simple window with a headerbar
  • Bunch of useful files that you SHOULD ship with your application on Linux:
    • Metainfo: describe your application for the different application stores out there;
    • Desktop: the application launcher;
    • Icons: This repo contains three icons, a normal, a nightly & monochromatic icon (symbolic) per the GNOME HIG, exported using App Icon Preview.
  • Flatpak Manifest for nightly builds
  • Dual installation support
  • Uses Meson for building the application
  • Bundles the UI files & the CSS using gresources
  • A pre-commit hook to run rustfmt on your code
  • Tests to validate your Metainfo, Schemas & Desktop files
  • Gsettings to store the window state, more settings could be added
  • Gitlab CI to produce flatpak nightlies
  • i18n support

How to init a project ?

The template ships a simple python script to init a project easily. It asks you a few questions and replaces & renames all the necessary files.

The script requires having git installed on your system.

You can run it with,

python3 create-project.py
➜ python3 create-project.py
Welcome to GTK Rust Template
Name: Contrast
Project Name: contrast
Application ID (e.g. org.domain.MyAwesomeApp, see: https://developer.gnome.org/ChooseApplicationID/): org.gnome.design.Contrast
Author: Bilal Elmoussaoui
Email: bil.elmoussaoui@gmail.com

A new directory named contrast containing the generated project

Building the project

Make sure you have flatpak and flatpak-builder installed. Then run the commands below. Replace <application_id> with the value you entered during project creation. Please note that these commands are just for demonstration purposes. Normally this would be handled by your IDE, such as GNOME Builder or VS Code with the Flatpak extension.

flatpak install --user org.gnome.Sdk//43 org.freedesktop.Sdk.Extension.rust-stable//22.08 org.gnome.Platform//43 org.freedesktop.Sdk.Extension.llvm14//22.08
flatpak-builder --user flatpak_app build-aux/<application_id>.Devel.json

Running the project

Once the project is build, run the command below. Replace Replace <application_id> and <project_name> with the values you entered during project creation. Please note that these commands are just for demonstration purposes. Normally this would be handled by your IDE, such as GNOME Builder or VS Code with the Flatpak extension.

flatpak-builder --run flatpak_app build-aux/<application_id>.Devel.json <project_name>

Community

Join the GNOME and gtk-rs community!

  • Matrix chat: chat with other developers using gtk-rs
  • Discourse forum: topics tagged with rust on the GNOME forum.
  • GNOME circle: take inspiration from applications and libraries already extending the GNOME ecosystem.

Credits