diff --git a/bin/app/Cargo.toml b/bin/app/Cargo.toml index 47fc927e4..b9d4db911 100644 --- a/bin/app/Cargo.toml +++ b/bin/app/Cargo.toml @@ -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. diff --git a/bin/app/src/app/mod.rs b/bin/app/src/app/mod.rs index ac4a40609..7930a26f9 100644 --- a/bin/app/src/app/mod.rs +++ b/bin/app/src/app/mod.rs @@ -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");