From b2ba257cac1d2ae5287823efc4ee890d65a6a768 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Thu, 10 Aug 2023 19:53:20 -0400 Subject: [PATCH] Added the build scripts for kifu-gtk --- Cargo.lock | 69 ++++++++++++++++++- Cargo.toml | 12 ++-- build.sh | 24 ++++--- kifu/gtk/Cargo.toml | 14 ++-- .../bin => kifu-gtk-screenplay}/screenplay.rs | 0 5 files changed, 94 insertions(+), 25 deletions(-) rename kifu/{gtk/src/bin => kifu-gtk-screenplay}/screenplay.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index b25cc16..a2d7c4a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,6 +233,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "cool_asserts" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee9f254e53f61e2688d3677fa2cbe4e9b950afd56f48819c98817417cf6b28ec" +dependencies = [ + "indent_write", +] + [[package]] name = "coordinates" version = "0.1.0" @@ -339,7 +348,7 @@ dependencies = [ "geo-types", "gio", "glib", - "glib-build-tools", + "glib-build-tools 0.16.3", "gtk4", "ifc", "lazy_static", @@ -841,6 +850,12 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "251935cb159350458a627642b0852a7fb8e027e3c5916dc2cebcd70f025de3fc" +[[package]] +name = "glib-build-tools" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a65d79efe318ef2cbbbb37032b125866fd82c34ea44c816132621bbc552e716" + [[package]] name = "glib-macros" version = "0.17.10" @@ -900,6 +915,15 @@ dependencies = [ "system-deps", ] +[[package]] +name = "grid" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0634107a3a005070dd73e27e74ecb691a94e9e5ba7829f434db7fbf73a6b5c47" +dependencies = [ + "no-std-compat", +] + [[package]] name = "gsk4" version = "0.6.3" @@ -1048,7 +1072,7 @@ dependencies = [ "coordinates", "gio", "glib", - "glib-build-tools", + "glib-build-tools 0.16.3", "gtk4", "image", ] @@ -1185,6 +1209,12 @@ dependencies = [ "tiff", ] +[[package]] +name = "indent_write" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3" + [[package]] name = "indexmap" version = "1.9.3" @@ -1254,6 +1284,35 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "kifu-core" +version = "0.1.0" +dependencies = [ + "chrono", + "cool_asserts", + "grid", + "serde", + "serde_json", + "sgf", + "thiserror", + "typeshare", +] + +[[package]] +name = "kifu-gtk" +version = "0.1.0" +dependencies = [ + "cairo-rs", + "gio", + "glib", + "glib-build-tools 0.17.10", + "gtk4", + "image", + "kifu-core", + "screenplay", + "tokio", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -1419,6 +1478,12 @@ dependencies = [ "tempfile", ] +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + [[package]] name = "nom" version = "7.1.3" diff --git a/Cargo.toml b/Cargo.toml index 6536d9e..59ceddb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,18 @@ [workspace] members = [ + "changeset", + "coordinates", "cyberpunk-splash", "dashboard", + "emseries", + "flow", "fluent-ergonomics", "geo-types", + "hex-grid", "ifc", + "kifu/core", + "kifu/gtk", "memorycache", "screenplay", - "emseries", - "coordinates", - "flow", "sgf", - "changeset", - "hex-grid", ] diff --git a/build.sh b/build.sh index 688d979..1d51186 100755 --- a/build.sh +++ b/build.sh @@ -3,19 +3,21 @@ set -euo pipefail RUST_ALL_TARGETS=( - "dashboard" - "ifc" - "memorycache" - "geo-types" - "fluent-ergonomics" - "cyberpunk-splash" - "screenplay" - "emseries" - "coordinates" - "flow" - "sgf" "changeset" + "coordinates" + "cyberpunk-splash" + "dashboard" + "emseries" + "flow" + "fluent-ergonomics" + "geo-types" "hex-grid" + "ifc" + "kifu-core" + "kifu-gtk" + "memorycache" + "screenplay" + "sgf" ) build_rust_targets() { diff --git a/kifu/gtk/Cargo.toml b/kifu/gtk/Cargo.toml index c66cf17..fe09ef7 100644 --- a/kifu/gtk/Cargo.toml +++ b/kifu/gtk/Cargo.toml @@ -21,12 +21,12 @@ screenplay = { path = "../../screenplay" } [build-dependencies] glib-build-tools = "0.17" -[[bin]] -name = "kifu-gtk" -path = "src/main.rs" +# [[bin]] +# name = "kifu-gtk" +# path = "src/main.rs" -[[bin]] -name = "screenplay" -path = "src/bin/screenplay.rs" -required-features = [ "screenplay" ] +# [[bin]] +# name = "screenplay" +# path = "src/bin/screenplay.rs" +# required-features = [ "screenplay" ] diff --git a/kifu/gtk/src/bin/screenplay.rs b/kifu/kifu-gtk-screenplay/screenplay.rs similarity index 100% rename from kifu/gtk/src/bin/screenplay.rs rename to kifu/kifu-gtk-screenplay/screenplay.rs