mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-07 22:04:03 -05:00
app: use cargo features to enable switching between schema layouts
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user