From: Ian Jackson Date: Thu, 24 Dec 2020 22:01:47 +0000 (+0000) Subject: wip prepare game X-Git-Tag: otter-0.2.0~134 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ffef766f92639ab6d7df5966db429e9bdd578836;p=otter.git wip prepare game Signed-off-by: Ian Jackson --- diff --git a/wdriver.rs b/wdriver.rs index fd3486c9..9b59a9a1 100644 --- a/wdriver.rs +++ b/wdriver.rs @@ -32,6 +32,8 @@ pub type AE = anyhow::Error; pub const URL : &str = "http://localhost:8000"; +const CONFIG : &str = "server-config.toml"; + pub trait AlwaysContext { fn always_context(self, msg: &'static str) -> anyhow::Result; fn just_warn(self, msg: &'static str) -> Option; @@ -384,8 +386,6 @@ _ = "error" # rocket "game::updates" = 'trace' "##); - const CONFIG : &str = "server-config.toml"; - fs::write(CONFIG, &config) .context(CONFIG).context("create server config")?; @@ -406,6 +406,10 @@ _ = "error" # rocket .context(server_exe).context("game server")?; } +#[throws(AE)] +pub fn prepare_game(_ds: &DirSubst) { +} + #[throws(AE)] fn prepare_geckodriver(cln: &cleanup_notify::Handle) { const EXPECTED : &str = "Listening on 127.0.0.1:4444"; @@ -476,6 +480,7 @@ pub fn setup(exe_module_path: &str) -> Setup { prepare_xserver(&cln, &ds).always_context("setup X server")?; prepare_gameserver(&cln, &ds).always_context("setup game server")?; + prepare_game(&ds).context("setup game")?; let final_hook = FinalInfoCollection;