Fixed GUI/NoGUI logic in builds.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "alfis"
|
name = "alfis"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
authors = ["Revertron <alfis@revertron.com>"]
|
authors = ["Revertron <alfis@revertron.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|||||||
+5
-6
@@ -18,7 +18,7 @@ use winapi::um::wincon::{ATTACH_PARENT_PROCESS, AttachConsole, FreeConsole};
|
|||||||
use alfis::{Block, Bytes, Chain, Miner, Context, Network, Settings, dns_utils, Keystore};
|
use alfis::{Block, Bytes, Chain, Miner, Context, Network, Settings, dns_utils, Keystore};
|
||||||
use alfis::blockchain::BLOCK_DIFFICULTY;
|
use alfis::blockchain::BLOCK_DIFFICULTY;
|
||||||
|
|
||||||
#[cfg(webui)]
|
#[cfg(feature = "webgui")]
|
||||||
mod web_ui;
|
mod web_ui;
|
||||||
|
|
||||||
const SETTINGS_FILENAME: &str = "alfis.toml";
|
const SETTINGS_FILENAME: &str = "alfis.toml";
|
||||||
@@ -38,8 +38,7 @@ fn main() {
|
|||||||
|
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
opts.optflag("h", "help", "Print this help menu");
|
opts.optflag("h", "help", "Print this help menu");
|
||||||
#[cfg(webui)]
|
opts.optflag("n", "nogui", "Run without graphic user interface (default for no gui builds)");
|
||||||
opts.optflag("n", "nogui", "Run without graphic user interface");
|
|
||||||
opts.optflag("v", "verbose", "Show more debug messages");
|
opts.optflag("v", "verbose", "Show more debug messages");
|
||||||
opts.optflag("d", "debug", "Show trace messages, more than debug");
|
opts.optflag("d", "debug", "Show trace messages, more than debug");
|
||||||
opts.optflag("l", "list", "List blocks from DB and exit");
|
opts.optflag("l", "list", "List blocks from DB and exit");
|
||||||
@@ -56,9 +55,9 @@ fn main() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(webui)]
|
#[cfg(feature = "webgui")]
|
||||||
let no_gui = opt_matches.opt_present("n");
|
let no_gui = opt_matches.opt_present("n");
|
||||||
#[cfg(not(webui))]
|
#[cfg(not(feature = "webgui"))]
|
||||||
let no_gui = true;
|
let no_gui = true;
|
||||||
|
|
||||||
let mut level = LevelFilter::Info;
|
let mut level = LevelFilter::Info;
|
||||||
@@ -116,7 +115,7 @@ fn main() {
|
|||||||
thread::sleep(sleep);
|
thread::sleep(sleep);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#[cfg(webui)]
|
#[cfg(feature = "webgui")]
|
||||||
web_ui::run_interface(context.clone(), miner.clone());
|
web_ui::run_interface(context.clone(), miner.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user