app: use cargo features to enable switching between schema layouts

This commit is contained in:
jkds
2026-01-04 05:35:06 +01:00
parent 4378ea4845
commit 8028ea9b10
2 changed files with 13 additions and 0 deletions

View File

@@ -71,12 +71,18 @@ indoc = "2.0.7"
opt-level = 3
[features]
default = ["enable-plugins", "schema-app"]
emulate-android = []
enable-plugins = []
enable-filelog = []
# Network debugging. Should be disabled in release.
enable-netdebug = []
# Main app schema layout
schema-app = []
# Dev schema for testing
schema-test = []
[patch.crates-io]
# We can remove these patches. But unfortunately harfbuzz-sys is still linking
# the old freetype libs so we need to fix that first.

View File

@@ -141,8 +141,15 @@ impl App {
self.sg_root.link(window.clone());
self.sg_root.link(setting_root.clone());
#[cfg(feature = "schema-app")]
schema::make(&self, window.clone(), &i18n_fish).await;
#[cfg(feature = "schema-test")]
schema::test::make(&self, window.clone(), &i18n_fish).await;
#[cfg(all(feature = "schema-app", feature = "schema-test"))]
compile_error!("Only one schema can be selected");
//settings::make(&self, window, self.ex.clone()).await;
d!("Schema loaded");