Browse Source

Changed veloren-server-cli to run in interactive basic mode as default. Removed -b and added -t which enables the tui.

merge-requests/2599/head
Ben Wallis 2 months ago
parent
commit
73b5c03510
  1. 4
      .cargo/config
  2. 1
      server-cli/Dockerfile
  3. 7
      server-cli/src/cli.rs
  4. 2
      server-cli/src/main.rs

4
.cargo/config

@ -6,9 +6,9 @@ rustflags = [
[alias]
csv-export = "run --manifest-path common/Cargo.toml --features=bin_csv --bin csv_export"
csv-import = "run --manifest-path common/Cargo.toml --features=bin_csv --bin csv_import"
test-server = "run --bin veloren-server-cli --no-default-features -- -b"
test-server = "run --bin veloren-server-cli --no-default-features"
tracy-server = "-Zunstable-options run --bin veloren-server-cli --no-default-features --features tracy,simd --profile no_overflow"
tracy-world-server = "-Zunstable-options run --bin veloren-server-cli --features tracy,simd --profile no_overflow -- -b"
tracy-world-server = "-Zunstable-options run --bin veloren-server-cli --features tracy,simd --profile no_overflow"
test-voxygen = "run --bin veloren-voxygen --no-default-features --features simd,egui-ui"
tracy-voxygen = "-Zunstable-options run --bin veloren-voxygen --no-default-features --features tracy,simd,egui-ui --profile no_overflow"
server = "run --bin veloren-server-cli"

1
server-cli/Dockerfile

@ -22,4 +22,3 @@ WORKDIR /opt
ENV RUST_BACKTRACE=full
ENTRYPOINT ["/opt/veloren-server-cli"]
CMD ["-b"]

7
server-cli/src/cli.rs

@ -99,15 +99,14 @@ pub enum ArgvCommand {
)]
pub struct ArgvApp {
#[structopt(long, short)]
/// Disables the tui
pub basic: bool,
/// Enables the tui
pub tui: bool,
#[structopt(long, short)]
/// Doesn't listen on STDIN
///
/// Useful if you want to send the server in background, and your kernels
/// terminal driver will send SIGTTIN to it otherwise. (https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Redirections) and you dont want to use `stty -tostop`
/// or `nohub` or `tmux` or `screen` or `<<< \"\\004\"` to the programm.
/// This implies `-b`.
/// or `nohub` or `tmux` or `screen` or `<<< \"\\004\"` to the program.
pub non_interactive: bool,
#[structopt(long)]
/// Run without auth enabled

2
server-cli/src/main.rs

@ -36,7 +36,7 @@ const TPS: u64 = 30;
fn main() -> io::Result<()> {
let app = ArgvApp::from_args();
let basic = app.basic || app.command.is_some();
let basic = !app.tui || app.command.is_some();
let noninteractive = app.non_interactive;
let no_auth = app.no_auth;
let sql_log_mode = app.sql_log_mode;

Loading…
Cancel
Save