Skip to content

Commit

Permalink
Make engine config writer instead of build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Riey committed Jan 20, 2021
1 parent de5901b commit b9e4cda
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 32 deletions.
9 changes: 8 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
members = [
"engine/core",
"engine/capi",
"engine/config-writer",
"engine/cffi",
"gtk3",
"xim",
Expand Down
4 changes: 0 additions & 4 deletions engine/capi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ crate-type = ["cdylib"]
[dependencies]
kime-engine-core = { path = "../core" }

[build-dependencies]
kime-engine-core = { path = "../core" }
serde_yaml = "0.8.15"

7 changes: 0 additions & 7 deletions engine/capi/build.rs

This file was deleted.

19 changes: 0 additions & 19 deletions engine/capi/data/config.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions engine/config-writer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "kime-engine-config-writer"
version = "0.1.0"
authors = ["Riey <[email protected]>"]
edition = "2018"

[dependencies]
kime-engine-core = { path = "../core" }
serde_yaml = "0.8.15"

6 changes: 6 additions & 0 deletions engine/config-writer/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn main() {
print!(
"{}",
serde_yaml::to_string(&kime_engine_core::RawConfig::default()).unwrap()
);
}
2 changes: 1 addition & 1 deletion pkg/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cp target/release/kime-xim build/out/kime-xim
cp target/release/libkime_gtk3.so build/out/im-kime.so
cp target/release/libkime_engine.so build/out/libkime_engine.so

cp engine/capi/data/config.yaml build/out
cargo run --release -p kime-engine-config-writer > build/out/config.yaml
cp engine/cffi/kime_engine.h build/out

strip -s build/out/kime-xim
Expand Down

0 comments on commit b9e4cda

Please sign in to comment.