Skip to content

Commit

Permalink
added flatpak support
Browse files Browse the repository at this point in the history
  • Loading branch information
mariinkys committed Jun 28, 2024
1 parent 80a1af8 commit 395256f
Show file tree
Hide file tree
Showing 6 changed files with 8,637 additions and 27 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ Cargo.lock
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Development Database File
oboete.db
# Flatpak Support
.flatpak-builder
flatpak-cargo-generator.py
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ readme = "https://github.com/mariinkys/oboete/blob/main/README.md"
repository = "https://github.com/mariinkys/oboete"
license = "GPL-3.0"

[[bin]]
path = "src/main.rs"
name = "oboete"

[dependencies]
i18n-embed-fl = "0.8"
once_cell = "1.19.0"
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,29 @@ I still have to add the Import/Export features. This project is related to my [o
```
git clone https://github.com/mariinkys/oboete.git
cd oboete
just build-release
cargo build --release
sudo just install
```

# Development Notes
In order to build the Flatpak, first you need to create the 'cargo-sources.json' file, for that we'll use [this python script, from flatpak-builder-tools](https://github.com/flatpak/flatpak-builder-tools/tree/master/cargo), remember that the 'toml' and 'aiohttp' python modules are needed (they can be installed with pip).

Once you have that, with the python script in the root of the project, you can start with:
```
python3 flatpak-cargo-generator.py Cargo.lock -o cargo-sources.json
```
This will create the needed 'cargo-sources.json' file.
Then you already can build and install the Flatpak with:
```
flatpak-builder --user --install --force-clean build-dir dev.mariinkys.Oboete.json
```
You can also build the Flatpak and not install it with:
```
flatpak-builder --force-clean build-dir dev.mariinkys.Oboete.json
```
Useful resources include:
[Flatpak Docs](https://docs.flatpak.org/en/latest/first-build.html). Remember that whenever the dependencies change/are updated the 'cargo-sources.json' file needs to be rebuilt.

# Copyright and Licensing

Copyright 2024 © Alex Marín
Expand Down
Loading

0 comments on commit 395256f

Please sign in to comment.