No-ui compilation feature
This commit is contained in:
@@ -561,7 +561,7 @@ impl Configuration {
|
||||
}
|
||||
|
||||
pub fn dapps_enabled(&self) -> bool {
|
||||
!self.args.flag_dapps_off && !self.args.flag_no_dapps
|
||||
!self.args.flag_dapps_off && !self.args.flag_no_dapps && cfg!(not(feature = "no-ui"))
|
||||
}
|
||||
|
||||
pub fn signer_enabled(&self) -> bool {
|
||||
|
||||
@@ -21,9 +21,9 @@ use util::panics::PanicHandler;
|
||||
use die::*;
|
||||
use rpc_apis;
|
||||
|
||||
#[cfg(feature = "dapps")]
|
||||
#[cfg(all(feature = "dapps", not(feature = "no-ui")))]
|
||||
pub use ethcore_dapps::Server as WebappServer;
|
||||
#[cfg(not(feature = "dapps"))]
|
||||
#[cfg(any(not(feature = "dapps"), feature = "no-ui"))]
|
||||
pub struct WebappServer;
|
||||
|
||||
pub struct Configuration {
|
||||
@@ -62,7 +62,7 @@ pub fn new(configuration: Configuration, deps: Dependencies) -> Option<WebappSer
|
||||
Some(setup_dapps_server(deps, configuration.dapps_path, &addr, auth))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "dapps"))]
|
||||
#[cfg(any(not(feature = "dapps"), feature = "no-ui"))]
|
||||
pub fn setup_dapps_server(
|
||||
_deps: Dependencies,
|
||||
_dapps_path: String,
|
||||
@@ -72,7 +72,7 @@ pub fn setup_dapps_server(
|
||||
die!("Your Parity version has been compiled without WebApps support.")
|
||||
}
|
||||
|
||||
#[cfg(feature = "dapps")]
|
||||
#[cfg(all(feature = "dapps", not(feature = "no-ui")))]
|
||||
pub fn setup_dapps_server(
|
||||
deps: Dependencies,
|
||||
dapps_path: String,
|
||||
|
||||
@@ -51,7 +51,7 @@ extern crate ethcore_rpc;
|
||||
extern crate ethcore_signer;
|
||||
extern crate ansi_term;
|
||||
|
||||
#[cfg(feature = "dapps")]
|
||||
#[cfg(all(feature = "dapps", not(feature = "no-ui")))]
|
||||
extern crate ethcore_dapps;
|
||||
|
||||
#[macro_use]
|
||||
|
||||
Reference in New Issue
Block a user