mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -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
|
opt-level = 3
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
default = ["enable-plugins", "schema-app"]
|
||||||
emulate-android = []
|
emulate-android = []
|
||||||
enable-plugins = []
|
enable-plugins = []
|
||||||
enable-filelog = []
|
enable-filelog = []
|
||||||
# Network debugging. Should be disabled in release.
|
# Network debugging. Should be disabled in release.
|
||||||
enable-netdebug = []
|
enable-netdebug = []
|
||||||
|
|
||||||
|
# Main app schema layout
|
||||||
|
schema-app = []
|
||||||
|
# Dev schema for testing
|
||||||
|
schema-test = []
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
# We can remove these patches. But unfortunately harfbuzz-sys is still linking
|
# We can remove these patches. But unfortunately harfbuzz-sys is still linking
|
||||||
# the old freetype libs so we need to fix that first.
|
# 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(window.clone());
|
||||||
self.sg_root.link(setting_root.clone());
|
self.sg_root.link(setting_root.clone());
|
||||||
|
|
||||||
|
#[cfg(feature = "schema-app")]
|
||||||
schema::make(&self, window.clone(), &i18n_fish).await;
|
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;
|
//settings::make(&self, window, self.ex.clone()).await;
|
||||||
|
|
||||||
d!("Schema loaded");
|
d!("Schema loaded");
|
||||||
|
|||||||
Reference in New Issue
Block a user