restructure the rest of the files

This commit is contained in:
2022-08-07 13:12:34 +02:00
parent e7f55a0375
commit 171c4dee12
20 changed files with 359 additions and 319 deletions

21
.editorconfig Normal file
View File

@@ -0,0 +1,21 @@
root = true
[*]
indent_style = space
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
[*.{build,css,doap,scss,ui,xml,xml.in,xml.in.in,yaml,yml}]
indent_size = 2
[*.{json,py,rs}]
indent_size = 4
[*.{c,h,h.in}]
indent_size = 2
max_line_length = 80
[NEWS]
indent_size = 2
max_line_length = 72

12
.gitignore vendored
View File

@@ -1,16 +1,16 @@
/target
/libs
*.AppImage
target/ target/
build/ build/
_build/ _build/
builddir/ builddir/
build-aux/app build-aux/app
build-aux/.flatpak-builder/ .flatpak-builder
src/config.rs src/config.rs
*.ui.in~ *.ui.in~
*.ui~ *.ui~
.json~
.flatpak/ .flatpak/
vendor vendor
.flatpak-builder flatpak_app
*.json~ libs
*.AppImage

198
Cargo.lock generated
View File

@@ -4,9 +4,9 @@ version = 3
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.56" version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" checksum = "c794e162a5eff65c72ef524dfe393eb923c354e350bb78b9c7383df13f3bc142"
[[package]] [[package]]
name = "autocfg" name = "autocfg"
@@ -22,15 +22,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]] [[package]]
name = "bytes" name = "bytes"
version = "1.1.0" version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db"
[[package]] [[package]]
name = "cairo-rs" name = "cairo-rs"
version = "0.15.10" version = "0.15.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "129e928d3eda625f53ce257589efbe5143416875fd01bddd08c8c6feb8b9962b" checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cairo-sys-rs", "cairo-sys-rs",
@@ -52,9 +52,9 @@ dependencies = [
[[package]] [[package]]
name = "cfg-expr" name = "cfg-expr"
version = "0.10.2" version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e068cb2806bbc15b439846dc16c5f89f8599f2c3e4d73d4449d38f9b2f0b6c5" checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db"
dependencies = [ dependencies = [
"smallvec", "smallvec",
] ]
@@ -77,9 +77,9 @@ dependencies = [
[[package]] [[package]]
name = "fragile" name = "fragile"
version = "1.1.0" version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8da1b8f89c5b5a5b7e59405cfcf0bb9588e5ed19f0b57a4cd542bbba3f164a6d" checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab"
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
@@ -134,9 +134,9 @@ dependencies = [
[[package]] [[package]]
name = "gdk-pixbuf" name = "gdk-pixbuf"
version = "0.15.10" version = "0.15.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678516f1baef591d270ca10587c01a12542a731a7879cc62391a18191a470831" checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"gdk-pixbuf-sys", "gdk-pixbuf-sys",
@@ -160,9 +160,9 @@ dependencies = [
[[package]] [[package]]
name = "gdk4" name = "gdk4"
version = "0.4.7" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4a2fc0bd03d59383fc10b71a8cb731a1fac2998732a36a0c03e9b1de1513218" checksum = "4fabb7cf843c26b085a5d68abb95d0c0bf27a9ae2eeff9c4adb503a1eb580876"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cairo-rs", "cairo-rs",
@@ -176,9 +176,9 @@ dependencies = [
[[package]] [[package]]
name = "gdk4-sys" name = "gdk4-sys"
version = "0.4.2" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48a39e34abe35ee2cf54a1e29dd983accecd113ad30bdead5050418fa92f2a1b" checksum = "efe7dcb44f5c00aeabff3f69abfc5673de46559070f89bd3fbb7b66485d9cef2"
dependencies = [ dependencies = [
"cairo-sys-rs", "cairo-sys-rs",
"gdk-pixbuf-sys", "gdk-pixbuf-sys",
@@ -193,9 +193,9 @@ dependencies = [
[[package]] [[package]]
name = "gio" name = "gio"
version = "0.15.10" version = "0.15.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76cd21a7a674ea811749661012512b0ba5237ba404ccbcab2850db5537549b64" checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"futures-channel", "futures-channel",
@@ -223,9 +223,9 @@ dependencies = [
[[package]] [[package]]
name = "glib" name = "glib"
version = "0.15.10" version = "0.15.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a826fad715b57834920839d7a594c3b5e416358c7d790bdaba847a40d7c1d96d" checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"futures-channel", "futures-channel",
@@ -243,9 +243,9 @@ dependencies = [
[[package]] [[package]]
name = "glib-macros" name = "glib-macros"
version = "0.15.10" version = "0.15.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dac4d47c544af67747652ab1865ace0ffa1155709723ac4f32e97587dd4735b2" checksum = "25a68131a662b04931e71891fb14aaf65ee4b44d08e8abc10f49e77418c86c64"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"heck", "heck",
@@ -302,9 +302,9 @@ dependencies = [
[[package]] [[package]]
name = "gsk4" name = "gsk4"
version = "0.4.7" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14d5a47a78c682bb67496b562495ed84972c0512ba0654888c4dc92b80a85bd3" checksum = "05e9020d333280b3aa38d496495bfa9b50712eebf1ad63f0ec5bcddb5eb61be4"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cairo-rs", "cairo-rs",
@@ -318,9 +318,9 @@ dependencies = [
[[package]] [[package]]
name = "gsk4-sys" name = "gsk4-sys"
version = "0.4.2" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e31d21d7ce02ba261bb24c50c4ab238a10b41a2c97c32afffae29471b7cca69b" checksum = "7add39ccf60078508c838643a2dcc91f045c46ed63b5ea6ab701b2e25bda3fea"
dependencies = [ dependencies = [
"cairo-sys-rs", "cairo-sys-rs",
"gdk4-sys", "gdk4-sys",
@@ -334,9 +334,9 @@ dependencies = [
[[package]] [[package]]
name = "gtk4" name = "gtk4"
version = "0.4.7" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb5d40303dabe4608fc260de2bd7563da6f85bc90af956323f0cd8ae0abcfe03" checksum = "c64f0c2a3d80e899dc3febddad5bac193ffcf74a0fd7e31037f30dd34d6f7396"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cairo-rs", "cairo-rs",
@@ -357,9 +357,9 @@ dependencies = [
[[package]] [[package]]
name = "gtk4-macros" name = "gtk4-macros"
version = "0.4.7" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f3c4aa605fb3d78205c7aef0eeaa6db61d8cc4dd05a465dc6ffdfdaee84f825" checksum = "fafbcc920af4eb677d7d164853e7040b9de5a22379c596f570190c675d45f7a7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"proc-macro-crate", "proc-macro-crate",
@@ -372,9 +372,9 @@ dependencies = [
[[package]] [[package]]
name = "gtk4-sys" name = "gtk4-sys"
version = "0.4.5" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c47c075e8f795c38f6e9a47b51a73eab77b325f83c0154979ed4d4245c36490d" checksum = "5bc8006eea634b7c72da3ff79e24606e45f21b3b832a3c5a1f543f5f97eb0f63"
dependencies = [ dependencies = [
"cairo-sys-rs", "cairo-sys-rs",
"gdk-pixbuf-sys", "gdk-pixbuf-sys",
@@ -406,9 +406,9 @@ dependencies = [
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.2" version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
[[package]] [[package]]
name = "libadwaita" name = "libadwaita"
@@ -444,9 +444,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.121" version = "0.2.127"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f" checksum = "505e71a4706fa491e9b1b55f51b95d4037d0821ee40131190475f692b35b009b"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
@@ -460,18 +460,18 @@ dependencies = [
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.14" version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "2.4.1" version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]] [[package]]
name = "memoffset" name = "memoffset"
@@ -484,9 +484,9 @@ dependencies = [
[[package]] [[package]]
name = "mio" name = "mio"
version = "0.8.3" version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf"
dependencies = [ dependencies = [
"libc", "libc",
"log", "log",
@@ -506,9 +506,9 @@ dependencies = [
[[package]] [[package]]
name = "once_cell" name = "once_cell"
version = "1.10.0" version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
[[package]] [[package]]
name = "pango" name = "pango"
@@ -537,9 +537,9 @@ dependencies = [
[[package]] [[package]]
name = "parking_lot" name = "parking_lot"
version = "0.12.0" version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
dependencies = [ dependencies = [
"lock_api", "lock_api",
"parking_lot_core", "parking_lot_core",
@@ -560,18 +560,19 @@ dependencies = [
[[package]] [[package]]
name = "pest" name = "pest"
version = "2.1.3" version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" checksum = "69486e2b8c2d2aeb9762db7b4e00b0331156393555cff467f4163ff06821eef8"
dependencies = [ dependencies = [
"thiserror",
"ucd-trie", "ucd-trie",
] ]
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.8" version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
@@ -581,16 +582,17 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.24" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
[[package]] [[package]]
name = "proc-macro-crate" name = "proc-macro-crate"
version = "1.1.3" version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" checksum = "26d50bfb8c23f23915855a00d98b5a35ef2e0b871bb52937bacadb798fbb66c8"
dependencies = [ dependencies = [
"once_cell",
"thiserror", "thiserror",
"toml", "toml",
] ]
@@ -621,11 +623,11 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.36" version = "1.0.43"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
dependencies = [ dependencies = [
"unicode-xid", "unicode-ident",
] ]
[[package]] [[package]]
@@ -639,27 +641,27 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.16" version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4af2ec4714533fcdf07e886f17025ace8b997b9ce51204ee69b6da831c3da57" checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.2.13" version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [ dependencies = [
"bitflags", "bitflags",
] ]
[[package]] [[package]]
name = "relm4" name = "relm4"
version = "0.4.3" version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c37490ffa536509d10dd6d57cf836b20729568b4cd2507b532445748560ccca" checksum = "6e737555426b35a18e9f6fa8d291ce858d358504d441d1e0a7b06ce6c905cc63"
dependencies = [ dependencies = [
"fragile", "fragile",
"futures-core", "futures-core",
@@ -672,9 +674,9 @@ dependencies = [
[[package]] [[package]]
name = "relm4-macros" name = "relm4-macros"
version = "0.4.3" version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0df3a77e22dee74ce668daa437252e02a19252ae0eda49ebebb20b365afc52a" checksum = "7136d9b9b97dc87198c619587de7bd61aca5ec4bec58a7167404c1edf750a490"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -692,9 +694,9 @@ dependencies = [
[[package]] [[package]]
name = "ryu" name = "ryu"
version = "1.0.10" version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
[[package]] [[package]]
name = "scopeguard" name = "scopeguard"
@@ -722,18 +724,18 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.136" version = "1.0.142"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.136" version = "1.0.142"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -742,9 +744,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.81" version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@@ -762,15 +764,18 @@ dependencies = [
[[package]] [[package]]
name = "slab" name = "slab"
version = "0.4.5" version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
dependencies = [
"autocfg",
]
[[package]] [[package]]
name = "smallvec" name = "smallvec"
version = "1.8.0" version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
[[package]] [[package]]
name = "socket2" name = "socket2"
@@ -784,13 +789,13 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.89" version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea297be220d52398dcc07ce15a209fce436d361735ac1db700cab3b6cdfb9f54" checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"unicode-xid", "unicode-ident",
] ]
[[package]] [[package]]
@@ -808,18 +813,18 @@ dependencies = [
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.30" version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.30" version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -828,10 +833,11 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.18.2" version = "1.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581"
dependencies = [ dependencies = [
"autocfg",
"bytes", "bytes",
"libc", "libc",
"memchr", "memchr",
@@ -848,9 +854,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio-macros" name = "tokio-macros"
version = "1.7.0" version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -859,16 +865,16 @@ dependencies = [
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.5.8" version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
dependencies = [ dependencies = [
"serde", "serde",
] ]
[[package]] [[package]]
name = "toolbx-tuner" name = "toolbx-tuner"
version = "0.0.0" version = "0.0.1"
dependencies = [ dependencies = [
"relm4", "relm4",
"serde", "serde",
@@ -878,15 +884,15 @@ dependencies = [
[[package]] [[package]]
name = "ucd-trie" name = "ucd-trie"
version = "0.1.3" version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-ident"
version = "0.2.2" version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
[[package]] [[package]]
name = "version-compare" name = "version-compare"

View File

@@ -1,6 +1,7 @@
[package] [package]
name = "toolbx-tuner" name = "toolbxtuner"
version = "0.0.0" version = "0.0.1"
authors = ["Hannes Kuchelmeister <hannes@kuchelmeister.org>"]
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@@ -1,24 +0,0 @@
#!/bin/sh
export MESON_BUILD_ROOT="$1"
export MESON_SOURCE_ROOT="$2"
export CARGO_TARGET_DIR="$MESON_BUILD_ROOT"/target
export CARGO_HOME="$MESON_BUILD_ROOT"/cargo-home
export OUTPUT="$3"
export BUILDTYPE="$4"
export APP_BIN="$5"
if [ $BUILDTYPE = "release" ]
then
echo "RELEASE MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --release && \
cp "$CARGO_TARGET_DIR"/release/"$APP_BIN" "$OUTPUT"
else
echo "DEBUG MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml && \
cp "$CARGO_TARGET_DIR"/debug/"$APP_BIN" "$OUTPUT"
fi

10
build-aux/dist-vendor.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
export DIST="$1"
export SOURCE_ROOT="$2"
cd "$SOURCE_ROOT"
mkdir "$DIST"/.cargo
cargo vendor | sed 's/^directory = ".*"/directory = "vendor"/g' > $DIST/.cargo/config
# Move vendor into dist tarball directory
mv vendor "$DIST"

View File

@@ -0,0 +1,46 @@
{
"id": "org.kuchelmeister.ToolbxTuner.Devel",
"runtime": "org.gnome.Platform",
"runtime-version": "42",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command": "toolbxtuner",
"finish-args": [
"--talk-name=org.freedesktop.Flatpak",
"--socket=fallback-x11",
"--socket=wayland",
"--device=dri",
"--env=RUST_LOG=toolbxtuner=debug",
"--env=G_MESSAGES_DEBUG=none",
"--env=RUST_BACKTRACE=1",
"--share=ipc"
],
"build-options": {
"append-path": "/usr/lib/sdk/rust-stable/bin",
"build-args": [
"--share=network"
],
"test-args": [
"--socket=x11",
"--share=network"
]
},
"modules": [
{
"name": "toolbxtuner",
"buildsystem": "meson",
"run-tests": true,
"config-opts": [
"-Dprofile=development"
],
"sources": [
{
"type": "dir",
"path": "../"
}
]
}
]
}

View File

@@ -1,2 +0,0 @@
flatpak run org.flatpak.Builder --user --install --force-clean build-dir org.kuchelmeister.toolbxtuner.json

View File

@@ -1,2 +1,2 @@
flatpak run org.flatpak.Builder --user --install --force-clean build-dir org.kuchelmeister.toolbxtuner.dev.json flatpak run org.flatpak.Builder --user --install --force-clean flatpak_app build-aux/org.kuchelmeister.ToolbxTuner.Devel.json

57
hooks/pre-commit.hook Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/sh
# Source: https://gitlab.gnome.org/GNOME/fractal/blob/master/hooks/pre-commit.hook
install_rustfmt() {
if ! which rustup &> /dev/null; then
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH=$PATH:$HOME/.cargo/bin
if ! which rustup &> /dev/null; then
echo "Failed to install rustup. Performing the commit without style checking."
exit 0
fi
fi
if ! rustup component list|grep rustfmt &> /dev/null; then
echo "Installing rustfmt…"
rustup component add rustfmt
fi
}
if ! which cargo >/dev/null 2>&1 || ! cargo fmt --help >/dev/null 2>&1; then
echo "Unable to check the projects code style, because rustfmt could not be run."
if [ ! -t 1 ]; then
# No input is possible
echo "Performing commit."
exit 0
fi
echo ""
echo "y: Install rustfmt via rustup"
echo "n: Don't install rustfmt and perform the commit"
echo "Q: Don't install rustfmt and abort the commit"
echo ""
while true
do
echo -n "Install rustfmt via rustup? [y/n/Q]: "; read yn < /dev/tty
case $yn in
[Yy]* ) install_rustfmt; break;;
[Nn]* ) echo "Performing commit."; exit 0;;
[Qq]* | "" ) echo "Aborting commit."; exit -1 >/dev/null 2>&1;;
* ) echo "Invalid input";;
esac
done
fi
echo "--Checking style--"
cargo fmt --all -- --check
if test $? != 0; then
echo "--Checking style fail--"
echo "Please fix the above issues, either manually or by running: cargo fmt --all"
exit -1
else
echo "--Checking style pass--"
fi

View File

@@ -1,27 +1,71 @@
project('toolbx-tuner', 'rust', project(
version: '0.1.0', 'toolbxtuner',
meson_version: '>= 0.59.0', 'rust',
default_options: [ 'warning_level=2', version: '0.0.1',
'werror=false', meson_version: '>= 0.59',
], license: 'GPL-3',
) )
i18n = import('i18n') i18n = import('i18n')
gnome = import('gnome') gnome = import('gnome')
base_id = 'org.kuchelmeister.ToolbxTuner'
cargo_sources = files( dependency('glib-2.0', version: '>= 2.66')
'Cargo.toml', dependency('gio-2.0', version: '>= 2.66')
'Cargo.lock', dependency('gtk4', version: '>= 4.0.0')
glib_compile_resources = find_program('glib-compile-resources', required: true)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstream_util = find_program('appstream-util', required: false)
cargo = find_program('cargo', required: true)
version = meson.project_version()
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
localedir = prefix / get_option('localedir')
datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name()
iconsdir = datadir / 'icons'
podir = meson.project_source_root() / 'po'
gettext_package = meson.project_name()
if get_option('profile') == 'development'
profile = 'Devel'
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
if vcs_tag == ''
version_suffix = '-devel'
else
version_suffix = '-@0@'.format(vcs_tag)
endif
application_id = '@0@.@1@'.format(base_id, profile)
else
profile = ''
version_suffix = ''
application_id = base_id
endif
meson.add_dist_script(
'build-aux/dist-vendor.sh',
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + version,
meson.project_source_root()
) )
if get_option('profile') == 'development'
# Setup pre-commit hook for ensuring coding style is always consistent
message('Setting up git pre-commit hook..')
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit')
endif
subdir('data') subdir('data')
subdir('src')
subdir('po') subdir('po')
subdir('src')
gnome.post_install( gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true, gtk_update_icon_cache: true,
glib_compile_schemas: true,
update_desktop_database: true, update_desktop_database: true,
) )

10
meson_options.txt Normal file
View File

@@ -0,0 +1,10 @@
option(
'profile',
type: 'combo',
choices: [
'default',
'development'
],
value: 'default',
description: 'The build profile for Toolbx Tuner. One of "default" or "development".'
)

View File

@@ -1,52 +0,0 @@
{
"app-id" : "org.kuchelmeister.toolbxtuner",
"runtime" : "org.gnome.Platform",
"runtime-version" : "42",
"sdk" : "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command" : "toolbx-tuner",
"finish-args" : [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--device=dri",
"--socket=wayland",
"--talk-name=org.freedesktop.Flatpak"
],
"build-options" : {
"append-path" : "/usr/lib/sdk/rust-stable/bin",
"build-args" : [
"--share=network"
],
"env" : {
"RUST_BACKTRACE" : "1",
"RUST_LOG" : "toolbx-tuner=debug"
}
},
"cleanup" : [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"*.la",
"*.a"
],
"modules" : [
{
"name" : "toolbx-tuner",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
{
"type" : "dir",
"path" : "."
}
]
}
]
}

View File

@@ -1,52 +0,0 @@
{
"app-id" : "org.kuchelmeister.toolbxtuner",
"runtime" : "org.gnome.Platform",
"runtime-version" : "42",
"sdk" : "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command" : "toolbx-tuner",
"finish-args" : [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--device=dri",
"--socket=wayland",
"--talk-name=org.freedesktop.Flatpak"
],
"build-options" : {
"append-path" : "/usr/lib/sdk/rust-stable/bin",
"build-args" : [
"--share=network"
],
"env" : {
"RUST_BACKTRACE" : "1",
"RUST_LOG" : "toolbx-tuner=debug"
}
},
"cleanup" : [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"*.la",
"*.a"
],
"modules" : [
{
"name" : "toolbx-tuner",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "https://github.com/13hannes11/toolbx-tuner.git",
}
]
}
]
}

View File

@@ -1,3 +0,0 @@
data/org.kuchelmeister.toolbxtuner.desktop.in
data/org.kuchelmeister.toolbxtuner.appdata.xml.in
data/org.kuchelmeister.toolbxtuner.gschema.xml

4
po/POTFILES.in Normal file
View File

@@ -0,0 +1,4 @@
data/org.kuchelmeister.ToolbxTuner.desktop.in.in
data/org.kuchelmeister.ToolbxTuner.gschema.xml.in
data/org.kuchelmeister.ToolbxTuner.metainfo.xml.in.in
src/application.rs

View File

@@ -1 +1 @@
i18n.gettext('toolbx-tuner', preset: 'glib') i18n.gettext(gettext_package, preset: 'glib')

View File

@@ -1,4 +1,7 @@
pub static VERSION: &str = @VERSION@; pub const APP_ID: &str = @APP_ID@;
pub static GETTEXT_PACKAGE: &str = @GETTEXT_PACKAGE@; pub const GETTEXT_PACKAGE: &str = @GETTEXT_PACKAGE@;
pub static LOCALEDIR: &str = @LOCALEDIR@; pub const LOCALEDIR: &str = @LOCALEDIR@;
pub static PKGDATADIR: &str = @PKGDATADIR@; pub const PKGDATADIR: &str = @PKGDATADIR@;
pub const PROFILE: &str = @PROFILE@;
pub const RESOURCES_FILE: &str = concat!(@PKGDATADIR@, "/resources.gresource");
pub const VERSION: &str = @VERSION@;

View File

@@ -1,76 +1,52 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) global_conf = configuration_data()
gnome = import('gnome') global_conf.set_quoted('APP_ID', application_id)
global_conf.set_quoted('PKGDATADIR', pkgdatadir)
gnome.compile_resources('toolbx-tuner', global_conf.set_quoted('PROFILE', profile)
'toolbx_tuner.gresource.xml', global_conf.set_quoted('VERSION', version + version_suffix)
gresource_bundle: true, global_conf.set_quoted('GETTEXT_PACKAGE', gettext_package)
install: true, global_conf.set_quoted('LOCALEDIR', localedir)
install_dir: pkgdatadir, config = configure_file(
)
conf = configuration_data()
conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('GETTEXT_PACKAGE', 'toolbx-tuner')
conf.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
conf.set_quoted('PKGDATADIR', pkgdatadir)
configure_file(
input: 'config.rs.in', input: 'config.rs.in',
output: 'config.rs', output: 'config.rs',
configuration: conf configuration: global_conf
) )
# Copy the config.rs output to the source directory. # Copy the config.rs output to the source directory.
run_command( run_command(
'cp', 'cp',
join_paths(meson.project_build_root(), 'src', 'config.rs'), meson.project_build_root() / 'src' / 'config.rs',
join_paths(meson.project_source_root(), 'src', 'config.rs'), meson.project_source_root() / 'src' / 'config.rs',
check: true check: true
) )
rust_sources = files( cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
'main.rs', cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ]
'toolbx/mod.rs',
'ui/mod.rs',
'ui/ui_strings.rs',
'ui/app/mod.rs',
'ui/app/model.rs',
'ui/app/widgets.rs',
'ui/app/workers.rs',
'ui/app/messages.rs',
'ui/app/toolbox_list.rs',
'ui/app/update.rs',
'ui/components/mod.rs',
'ui/components/toolbox_apps/factory.rs',
'ui/components/toolbox_apps/messages.rs',
'ui/components/toolbox_apps/mod.rs',
'ui/components/toolbox_apps/model.rs',
'ui/components/toolbox_apps/update.rs',
'ui/components/toolbox_apps/widgets.rs',
'ui/components/toolbox_settings/messages.rs',
'ui/components/toolbox_settings/mod.rs',
'ui/components/toolbox_settings/model.rs',
'ui/components/toolbox_settings/update.rs',
'ui/components/toolbox_settings/widgets.rs',
)
sources = [cargo_sources, rust_sources] if get_option('profile') == 'default'
cargo_options += [ '--release' ]
rust_target = 'release'
message('Building in release mode')
else
rust_target = 'debug'
message('Building in debug mode')
endif
cargo_script = find_program(join_paths(meson.project_source_root(), 'build-aux/cargo.sh')) cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
cargo_release = custom_target(
cargo_build = custom_target(
'cargo-build', 'cargo-build',
build_by_default: true, build_by_default: true,
input: sources, build_always_stale: true,
output: meson.project_name(), output: meson.project_name(),
console: true, console: true,
install: true, install: true,
install_dir: get_option('bindir'), install_dir: bindir,
depends: resources,
command: [ command: [
cargo_script, 'env',
meson.project_build_root(), cargo_env,
meson.project_source_root(), cargo, 'build',
'@OUTPUT@', cargo_options,
get_option('buildtype'), '&&',
meson.project_name(), 'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
] ]
) )

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/kuchelmeister/toolbxtuner">
</gresource>
</gresources>